GitHub

GitHub

GitHub encapsulates the functionality to create various API wrapper objects.

Constructor

new GitHub(authopt, apiBaseopt)

Create a new GitHub.

Parameters:
Name Type Attributes Default Description
auth Requestable.auth <optional>

the credentials to authenticate to Github. If auth is not provided requests will be made unauthenticated

apiBase string <optional>
https://api.github.com

the base Github API URL

Source:

Methods

getGist(idopt) → {Gist}

Create a new Gist wrapper

Parameters:
Name Type Attributes Description
id number <optional>

the id for the gist, leave undefined when creating a new gist

Source:
Returns:
Type
Gist

getIssues(user, repo) → {Issue}

Create a new Issue wrapper

Parameters:
Name Type Description
user string

the user who owns the respository

repo string

the name of the repository

Source:
Returns:
Type
Issue

getMarkdown() → {Markdown}

Create a new Markdown wrapper

Source:
Returns:
Type
Markdown

getOrganization(organization) → {Organization}

Create a new Organization wrapper

Parameters:
Name Type Description
organization string

the name of the organization

Source:
Returns:
Type
Organization

getRateLimit() → {RateLimit}

Create a new RateLimit wrapper

Source:
Returns:
Type
RateLimit

getRepo(user, repo) → {Repository}

Create a new Repository wrapper

Parameters:
Name Type Description
user string

the user who owns the respository

repo string

the name of the repository

Source:
Returns:
Type
Repository

getUser(useropt) → {User}

Create a new User wrapper

Parameters:
Name Type Attributes Description
user string <optional>

the name of the user to get information about leave undefined for the authenticated user

Source:
Returns:
Type
User

Create a new Search wrapper

Parameters:
Name Type Description
query string

the query to search for

Source:
Returns:
Type
Search