provider

package
v0.0.0-...-24a16b5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 15, 2018 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GitHub

type GitHub struct {
	Client *http.Client
}

GitHub provider

func NewGitHub

func NewGitHub(c *http.Client) *GitHub

NewGitHub create a new GitHub API provider

func (*GitHub) GetProfile

func (gh *GitHub) GetProfile(accessToken string) (*GitHubProfile, error)

GetProfile returns a profile for a user from GitHub

type GitHubProfile

type GitHubProfile struct {
	ID        int       `json:"id"`
	Login     string    `json:"login"`
	Name      string    `json:"name"`
	Email     string    `json:"email"`
	TwoFactor bool      `json:"two_factor_authentication"`
	CreatedAt time.Time `json:"created_at"`
	UpdatedAt time.Time `json:"updated_at"`
}

GitHubProfile represents a GitHub profile

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL