githubsdk

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GitHubSDK

type GitHubSDK struct {
	Client *httpclient.Client
}

func New

func New() GitHubSDK

func NewWithClient

func NewWithClient(c *httpclient.Client) GitHubSDK

func (GitHubSDK) GetUserByUsername

func (g GitHubSDK) GetUserByUsername(ctx context.Context, username string) (User, error)

GetUserByUsername retrieves a user based on their public username. See https://docs.github.com/en/rest/users/users

type User

type User struct {
	ID        int       `json:"id"`
	Bio       string    `json:"bio"`
	Blog      string    `json:"blog"`
	CreatedAt time.Time `json:"created_at"`
	Login     string    `json:"login"`
	Name      string    `json:"name"`
}

Jump to

Keyboard shortcuts

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