Skip to content

A simple project that can help you in using the GitHub API.

Notifications You must be signed in to change notification settings

Zhiro990/GitHub-Info

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

{ GitHub-Info }

A simple project that can help you in using the GitHub API.

Table of Contents

Installing

npm install Zhiro990/GitHub-Info

Importing

const GitHubInfo = require("GitHub-Info");

Usage

const githubinfo = new GitHubInfo("YOUR_GITHUB_TOKEN");

GitHubInfo

Properties

token : string | null

Your GitHub personal access token.

Methods

getAuthenticatedUser() : Promise<User | null>

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

getRepoContents() : Promise<Content[]>

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

getRepoBranches() : Promise<Branch[]>

Parameter Description Type Optional Default
owner The repository owner username. string No None
name The repository name. string No None

getRepoTags() : Promise<Tag[]>

Parameter Description Type Optional Default
owner The repository owner username. string No None
name The repository name. string No None

getRepoLanguages() : Promise<Language[]>

Parameter Description Type Optional Default
owner The repository owner username. string No None
name The repository name. string No None

searchUser() : Promise<User[]>

Parameter Description Type Optional Default
name The user username. string No None
max The maximum amount of data. (between 1-100) number Yes 30

getUser() : Promise<User>

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

getRateLimit() : Promise<object>

Parameter Description Type Optional Default

Data Structures

Repository

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

Owner

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

User

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

Contributor

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

Branch

Property Description Type
name The branch name. string
commit The branch last commit sha. string
protected Is the branch protected? boolean

Tag

Property Description Type
name The tag name. string
commit The tag last commit sha. string

Content

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

Language

Property Description Type
name The language name. string
size The language size. number

SocialAccount

Property Description Type
provider The social media name. string
url The social account url. string

Types

Owner/User/Contributor Types

  • User
  • Organization

Visibility Types

  • public
  • private

Content Types

  • file
  • dir

About

A simple project that can help you in using the GitHub API.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published