github

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrAccessBlocked = errors.New("repository access blocked.")
View Source
var ErrNotFound = errors.New("not found on GitHub.")

Functions

This section is empty.

Types

type Client

type Client struct {
	Token string // the personal acesss token, if set, the common rate limit is 5000 reqs/hour, otherwise, it will be 60 reqs/hour.
}

GitHub rest api client

func NewClient

func NewClient(token string) *Client

func (*Client) GetDeveloper

func (ghClient *Client) GetDeveloper(ctx context.Context, username string) (model.Developer, error)

func (*Client) GetRepository

func (ghClient *Client) GetRepository(ctx context.Context, fullName string) (model.GhRepository, error)

Jump to

Keyboard shortcuts

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