0.0.18 • Published 2 years ago

git-repo-api v0.0.18

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago

GIT-REPO-API

Description

npm package to get your github tekemetry.

Installation

`npm i git-repo-api`

or
`yarn add git-repo-api`

Usage

Importing

```
import { GitAPI } from 'git-repo-api';
```

Initialize

```
const api = new GitAPI('your-personal-access-token', 'user-name', 'repo-name')
```
or
```
const api = new GitAPI('your-personal-access-token', 'user-name', 'repo-name')
api.accessToken = 'your-personal-access-token;
api.user = 'user-name;
api.repo = 'repo-name';
```

**Note: `personal-access-token` is optional for many of the APIs

Read Data

```
api.get('key_name')
```

or use below table to call specific methiod
example
```
api.get_all_branches()
```

Options

KeysDescriptionMethod NameNeed Token?
all_branchesList all branch details for the given repoget_all_branches()NO
all_collaboratorsList all collaborators details for the given repoget_all_collaborators()NO
all_invitationsList all invitation details for the given repoget_all_invitations()NO
all_commitsList all commit details for the given repoget_all_commits()NO
all_issuesList all issue details for the given repoget_all_issues()NO
all_assigneesList all assignee details for the given repoget_all_assignees()NO
all_labelsList all label details for the given repoget_all_labels()NO
weekly_commitsGets weekly commit trendget_weekly_commit()NO
weekly_commits_countGets weekly commit countget_weekly_commit_count()NO
hourly_commitsGets hourly commit trendget_hourly_commits()NO
last_year_commitsGets last year commit trend grouped by weeksget_last_year_commits()NO
all_pulls_openList all open pull request detailsget_all_pulls_open()NO
all_pulls_closedList all closed pull request detailsget_all_pulls_closed()NO
star_gazersList star gazers detailsget_all_star_gazers()NO
all_collaboratorsList collaborator detailsget_all_collaborators()YES
all_milestonesList milestone detailsget_all_milestones()NO
all_forksList fork detailsget_all_forks()NO
all_contributorsList all contributorsget_all_contributors()No

**Note: Refer https://docs.github.com/en/rest/ for full list of APIs

0.0.18

2 years ago

0.0.17

2 years ago

0.0.16

2 years ago

0.0.15

2 years ago

0.0.14

2 years ago

0.0.12

2 years ago

0.0.11

2 years ago

0.0.10

2 years ago

0.0.9

2 years ago

0.0.8

2 years ago

0.0.7

2 years ago

0.0.6

2 years ago

0.0.5

2 years ago

0.0.4

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago