A simple project that can help you in using the GitHub API.
npm install Zhiro990/GitHub-Infoconst GitHubInfo = require("GitHub-Info");const githubinfo = new GitHubInfo("YOUR_GITHUB_TOKEN");Your GitHub personal access token.
| Parameter | Description | Type | Optional | Default |
|---|
searchRepo() : Promise<Repository[]>
| Parameter | Description | Type | Optional | Default |
|---|---|---|---|---|
name |
The repository name. | string | No | None |
max |
The maximum amount of data. (between 1-100) | number | Yes | 30 |
getRepo() : Promise<Repository>
| Parameter | Description | Type | Optional | Default |
|---|---|---|---|---|
owner |
The repository owner username. | string | No | None |
name |
The repository name. | string | No | None |
| Parameter | Description | Type | Optional | Default |
|---|---|---|---|---|
owner |
The repository owner username. | string | No | None |
name |
The repository name. | string | No | None |
getRepoContributors() : Promise<Contributor[]>
| Parameter | Description | Type | Optional | Default |
|---|---|---|---|---|
owner |
The repository owner username. | string | No | None |
name |
The repository name. | string | No | None |
| Parameter | Description | Type | Optional | Default |
|---|---|---|---|---|
owner |
The repository owner username. | string | No | None |
name |
The repository name. | string | No | None |
| Parameter | Description | Type | Optional | Default |
|---|---|---|---|---|
owner |
The repository owner username. | string | No | None |
name |
The repository name. | string | No | None |
| Parameter | Description | Type | Optional | Default |
|---|---|---|---|---|
owner |
The repository owner username. | string | No | None |
name |
The repository name. | string | No | None |
| Parameter | Description | Type | Optional | Default |
|---|---|---|---|---|
name |
The user username. | string | No | None |
max |
The maximum amount of data. (between 1-100) | number | Yes | 30 |
| Parameter | Description | Type | Optional | Default |
|---|---|---|---|---|
name |
The user username. | string | No | None |
getUserRepos() : Promise<Repository[]>
| Parameter | Description | Type | Optional | Default |
|---|---|---|---|---|
name |
The user username. | string | No | None |
getUserStarredRepos() : Promise<Repository[]>
| Parameter | Description | Type | Optional | Default |
|---|---|---|---|---|
name |
The user username. | string | No | None |
getUserSocialAccounts() : Promise<SocialAccount[]>
| Parameter | Description | Type | Optional | Default |
|---|---|---|---|---|
name |
The user username. | string | No | None |
| Parameter | Description | Type | Optional | Default |
|---|
| Property | Description | Type |
|---|---|---|
name |
The repository name. | string |
fullName |
The repository full name. | string |
description |
The repository description. | string | null |
url |
The repository url. | string |
owner |
The repository owner. | Owner | null |
private |
Is the repository private? | boolean |
visibility |
The repository visibility. | string | null |
fork |
Is the repository forked from other repository? | boolean |
defaultBranch |
The repository default branch. | string | null |
language |
The repository language. | string | null |
createdAt |
The repository created time. | string | null |
updatedAt |
The repository updated time. | string | null |
pushedAt |
The repository pushed time. | string | null |
stargazers |
The repository stargazers count. | number | null |
watchers |
The repository watchers count. | number | null |
openIssues |
The repository open issues count. | number | null |
forks |
The repository forks count. | number | null |
networks |
The repository networks count. | number | null |
subscribers |
The repository subscribers count. | number | null |
topics |
The repository topics. | string[] |
homepage |
The repository homepage url. | string | null |
gitUrl |
The repository git url. | string | null |
sshUrl |
The repository ssh url. | string | null |
cloneUrl |
The repository clone url. | string | null |
allowForking |
Can i fork the repository? | boolean |
isTemplate |
Is the repository a template repository? | boolean |
hasIssues |
Is the repository has issues? | boolean |
hasProjects |
Is the repository has projects? | boolean |
hasDownloads |
Is the repository has downloads? | boolean |
hasWiki |
Is the repository has wiki? | boolean |
hasPages |
Is the repository has pages? | boolean |
hasDiscussions |
Is the repository has discussions? | boolean |
archived |
Is the repository archived? | boolean |
disabled |
Is the repository disabled? | boolean |
size |
The repository size. | number |
license |
The repository license name. | string | null |
| Property | Description | Type |
|---|---|---|
username |
The repository owner username. | string |
avatar |
The repository owner avatar url. | string |
url |
The repository owner profile url. | string |
type |
The repository owner type. | string |
siteAdmin |
Is the repository owner a site admin? | boolean |
| Property | Description | Type |
|---|---|---|
username |
The user username. | string |
name |
The user name. | string | null |
avatar |
The user avatar url. | string |
url |
The user profile url. | string |
bio |
The user bio. | string | null |
publicRepos |
The user public repos count. | number | null |
followers |
The user followers count. | number | null |
following |
The user following count. | number | null |
twitterUsername |
The user twitter username. | string | null |
company |
The user company. | string | null |
location |
The user location. | string | null |
createdAt |
The user account created time. | string | null |
updatedAt |
The user account updated time. | string | null |
blog |
The user blog. | string | null |
email |
The user email. | string | null |
hireable |
Is the user hireable? | boolean | null |
type |
The user type. | string |
siteAdmin |
Is the user a site admin? | boolean | null |
| Property | Description | Type |
|---|---|---|
username |
The contributor username. | string | null |
avatar |
The contributor avatar url. | string | null |
url |
The contributor profile url. | string | null |
contributions |
The contributor contributions count. | number |
type |
The contributor type. | string |
siteAdmin |
Is the contributor a site admin? | boolean | null |
| Property | Description | Type |
|---|---|---|
name |
The branch name. | string |
commit |
The branch last commit sha. | string |
protected |
Is the branch protected? | boolean |
| Property | Description | Type |
|---|---|---|
name |
The tag name. | string |
commit |
The tag last commit sha. | string |
| Property | Description | Type |
|---|---|---|
name |
The content name. | string |
path |
The content path. | string |
url |
The content url. | string | null |
type |
The content type. | string |
sha |
The content last commit sha. | string |
size |
The content size. | number |
| Property | Description | Type |
|---|---|---|
name |
The language name. | string |
size |
The language size. | number |
| Property | Description | Type |
|---|---|---|
provider |
The social media name. | string |
url |
The social account url. | string |
UserOrganization
publicprivate
filedir