Skip to content
This repository was archived by the owner on Nov 8, 2020. It is now read-only.

Commit 93a5d70

Browse files
committed
Using in a JavaScript project.
1 parent d4faba0 commit 93a5d70

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

docs/advanced.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# Advanced usage
22

3+
## Passing a GitHub API key
4+
35
Although we're not using [GitHub's public API](https://developer.github.com/v3/) for most operations
46
(see [FAQ](README.md#how-does-it-work)), we are still using it a bit, e.g. for fetching the day at
57
which the user has joined GitHub. So it's still worth
@@ -19,3 +21,24 @@ reframejs/reframe
1921
dracula/gitk
2022
...
2123
```
24+
25+
## Using in a JavaScript project
26+
27+
```js
28+
(async () => {
29+
30+
const githubContribs = require('@ghuser/github-contribs');
31+
const ora = require('ora');
32+
33+
const repos = await githubContribs(
34+
'AurelienLourot', // username
35+
'2018-06-25', // --since
36+
null, // --until
37+
ora
38+
);
39+
for (const repo of repos) {
40+
console.log(repo);
41+
}
42+
43+
})();
44+
```

0 commit comments

Comments
 (0)