<commit_before># github-api

A node module for interfacing with the Github API using promises. The full GitHub API documentation can be found at https://developer.github.com/v3/.

# Installation

```bash
npm install github-api-promise
````

# Usage

TLDR;

1. Require _github-api-promise_
2. Set settings
3. Make API calls

Basic example code:

```JavaScript
var api = require('github-api-promise');

// Set settings
api.config.owner = 'OwnersGithubUsername';
api.config.repo = 'RepoName';
api.config.token = 'YourAccessToken';
api.config.debug = true; // Default is false. Logs request information via console.log when true.

// Do stuff
api.repos.releases.getRepositoryReleases()
	.then(function(res) {
		// Do your stuff here. res is the JSON object returned by the API
	})
	.catch(function(err) {
		console.log('Request failed: ' + err);
	});
````

For help creating an access token, see the GitHub help article [Creating an Access Token for Command Line Use](https://help.github.com/articles/creating-an-access-token-for-command-line-use/). This package only requires either the _repo_ scope for private repos or the _public_repo_ scope for public repos.

# API Support

The following APIs are supported. PRs welcome!

* [Repositories > Releases](https://developer.github.com/v3/repos/releases/)
* [Repositories > Repositories](https://developer.github.com/v3/repos/)
* [Activity > Events](https://developer.github.com/v3/activity/events/)

# Documentation

TODO: JSDoc on github pages

# Thanks

Special thanks to [jeejkang](https://github.com/jeejkang) for the [Stormtroopocat](https://octodex.github.com/stormtroopocat/) image!

Thanks to [aktau/github-release](https://github.com/aktau/github-release) (a library for GO) for the inspiration for this project.<commit_msg>Doc update<commit_after># github-api-promise

A node module for interfacing with the Github API using promises. The full GitHub API documentation can be found at https://developer.github.com/v3/.

# Installation

```bash
npm install github-api-promise
```

# Usage

TLDR;

1. Require _github-api-promise_
2. Set settings
3. Make API calls

Basic example code:

```JavaScript
var api = require('github-api-promise');

// Set settings
api.config.owner = 'OwnersGithubUsername';
api.config.repo = 'RepoName';
api.config.token = 'YourAccessToken';
api.config.debug = true; // Default is false. Logs request information via console.log when true.

// Do stuff
api.repos.releases.getRepositoryReleases()
	.then(function(res) {
		// Do your stuff here. res is the JSON object returned by the API
	})
	.catch(function(err) {
		console.log('Request failed: ' + err);
	});
```

For help creating an access token, see the GitHub help article [Creating an Access Token for Command Line Use](https://help.github.com/articles/creating-an-access-token-for-command-line-use/). This package only requires either the _repo_ scope for private repos or the _public_repo_ scope for public repos.

# API Support

The following APIs are supported. PRs welcome!

* [Repositories > Releases](https://developer.github.com/v3/repos/releases/)
* [Repositories > Repositories](https://developer.github.com/v3/repos/)
* [Activity > Events](https://developer.github.com/v3/activity/events/)

# Documentation

TODO: JSDoc on github pages. For now, browse the module's source and read the JSDoc comments.

# Thanks

Special thanks to [jeejkang](https://github.com/jeejkang) for the [Stormtroopocat](https://octodex.github.com/stormtroopocat/) image!

Thanks to [aktau/github-release](https://github.com/aktau/github-release) (a library for GO) for the inspiration for this project.
{'fraction_non_alphanumeric': 0.1210366694237662, 'fraction_numerical': 0.0038599393438103115, 'mean_word_length': 4.4474474474474475, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, 'https://': 16, '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': '585598', 'n_tokens_mistral': 1175, 'n_tokens_neox': 1098, 'n_words': 347}