githubapi

package
v0.0.0-...-d4a8086 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2021 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 Client

type Client struct {
	// contains filtered or unexported fields
}

func NewGitHubAPIClient

func NewGitHubAPIClient(httpClients ...*http.Client) *Client

NewGitHubAPIClient creates and returns a new GitHub API client.

func (*Client) GetContributors

func (c *Client) GetContributors(ctx context.Context, owner, repo string) ([]*github.Contributor, error)

GetContributors returns the contributors of the given owner and repository. It only returns the first 5 pages.

func (*Client) GetOrgRepositories

func (c *Client) GetOrgRepositories(ctx context.Context, organization string, opts GetOrgRepositoriesOptions) ([]*github.Repository, error)

GetOrgRepositories returns the repositories of the given organization.

func (*Client) GetRepository

func (c *Client) GetRepository(ctx context.Context, owner, repo string) (*github.Repository, error)

GetRepository returns the repository by given owner and name.

func (*Client) GetUserRepositories

func (c *Client) GetUserRepositories(ctx context.Context, user string, opts GetUserRepositoriesOptions) ([]*github.Repository, error)

GetUserRepositories returns the repositories of the given user.

type GetOrgRepositoriesOptions

type GetOrgRepositoriesOptions struct {
	Fork bool
}

type GetUserRepositoriesOptions

type GetUserRepositoriesOptions struct {
	Fork bool
}

Jump to

Keyboard shortcuts

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