<commit_before>##### NOTE: [mikedeboer/node-github](https://github.com/mikedeboer/node-github) seems to no longer be maintained so I forked it here and am working on applying PRs and issues from that repo. See progress [here](https://github.com/kaizensoze/github4/wiki/Transition-from-upstream).

# Node-github

A Node.js wrapper for GitHub API.

## Installation

Install via [npm](http://npmjs.org/) ![NPM version](https://badge.fury.io/js/github4.svg)

```bash
$ npm install github4
```

or

Install via git clone

```bash
$ git clone <EMAIL>:kaizensoze/node-github.git
$ cd node-github
$ npm install
```

## Documentation

Client API: [https://kaizensoze.github.io/node-github/](https://kaizensoze.github.io/node-github/)  
GitHub API: [https://developer.github.com/v3/](https://developer.github.com/v3/)

## Test auth file

Create test auth file for running tests/examples.

```bash
$ > test_auth.json
{
    "token": "<TOKEN>"
}
```

## Example

Get all followers for user "defunkt":
```javascript
var GitHubApi = require("github4");

var github = new GitHubApi({
    // optional
    debug: true,
    protocol: "https",
    host: "github.my-GHE-enabled-company.com", // should be api.github.com for GitHub
    pathPrefix: "/api/v3", // for some GHEs; none for GitHub
    timeout: 5000,
    headers: {
        "user-agent": "My-Cool-GitHub-App" // GitHub is happy with a unique user agent
    }
});
github.users.getFollowingFromUser({
    // optional:
    // headers: {
    //     "cookie": "blahblah"
    // },
    user: "defunkt"
}, function(err, res) {
    console.log(JSON.stringify(res));
});<commit_msg>update readme with updated user method<commit_after>##### NOTE: [mikedeboer/node-github](https://github.com/mikedeboer/node-github) seems to no longer be maintained so I forked it here and am working on applying PRs and issues from that repo. See progress [here](https://github.com/kaizensoze/github4/wiki/Transition-from-upstream).

# Node-github

A Node.js wrapper for GitHub API.

## Installation

Install via [npm](http://npmjs.org/) ![NPM version](https://badge.fury.io/js/github4.svg)

```bash
$ npm install github4
```

or

Install via git clone

```bash
$ git clone <EMAIL>:kaizensoze/node-github.git
$ cd node-github
$ npm install
```

## Documentation

Client API: [https://kaizensoze.github.io/node-github/](https://kaizensoze.github.io/node-github/)  
GitHub API: [https://developer.github.com/v3/](https://developer.github.com/v3/)

## Test auth file

Create test auth file for running tests/examples.

```bash
$ > test_auth.json
{
    "token": "<TOKEN>"
}
```

## Example

Get all followers for user "defunkt":
```javascript
var GitHubApi = require("github4");

var github = new GitHubApi({
    // optional
    debug: true,
    protocol: "https",
    host: "github.my-GHE-enabled-company.com", // should be api.github.com for GitHub
    pathPrefix: "/api/v3", // for some GHEs; none for GitHub
    timeout: 5000,
    headers: {
        "user-agent": "My-Cool-GitHub-App" // GitHub is happy with a unique user agent
    }
});
github.users.getFollowingForUser({
    // optional:
    // headers: {
    //     "cookie": "blahblah"
    // },
    user: "defunkt"
}, function(err, res) {
    console.log(JSON.stringify(res));
});
{'fraction_non_alphanumeric': 0.16009852216748768, 'fraction_numerical': 0.0067733990147783255, 'mean_word_length': 3.4875690607734806, 'pattern_counts': {'":': 8, '<': 7, '<?xml version=': 0, '>': 9, 'https://': 14, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3240025', 'n_tokens_mistral': 1149, 'n_tokens_neox': 1074, 'n_words': 279}