# githulk

> Small but powerful Github client

Latest version **1.7.1** (published 2019-10-16) · MIT license · 0 weekly downloads

## Install

```sh
npm install githulk
pnpm add githulk
yarn add githulk
bun add githulk
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.7.1 |
| Published | 2019-10-16 |
| First published | 2014-02-17 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 4 |
| Unpacked size | 71.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 30 |
| Author | Arnout Kazemier |
| Maintainers | 3rdeden, fritzmonkey, indexzero, jcrugzz, swaagie, v1 |
| Keywords | github, api |

## Links

- npm: https://www.npmjs.com/package/githulk
- Repository: https://github.com/githulks/githulk
- Homepage: https://github.com/githulks/githulk#readme
- Issues: https://github.com/githulks/githulk/issues
- npm.io page: https://npm.io/package/githulk

## Dependencies (4)

- [mana](https://npm.io/package/mana.md) ^1.1.0
- [unwrapper](https://npm.io/package/unwrapper.md) ^1.1.0
- [diagnostics](https://npm.io/package/diagnostics.md) ~1.1.0
- [extract-github](https://npm.io/package/extract-github.md) 1.0.x

## Recent versions

- 1.7.1 (latest) — 2019-10-16
- 1.7.0 — 2019-01-14
- 1.6.0 — 2018-08-16
- 1.5.0 — 2018-05-07
- 1.4.0 — 2017-11-17
- 1.3.0 — 2017-07-26
- 1.2.1 — 2017-03-27
- 1.2.0 — 2017-03-27
- 1.1.2 — 2016-07-07
- 1.1.1 — 2016-06-24
- 1.1.0 — 2015-11-24
- 1.0.1 — 2015-11-11
- 1.0.0 — 2015-11-11
- 0.3.0 — 2015-11-05
- 0.2.1 — 2015-02-06
- … 12 more at https://npm.io/package/githulk/versions

## README

# Githulk

GitHulk is a developer friendly API client for the Github API. In addition to
providing access to Github's official API's it also implements new methods that
are either convenience functions or a composition of multiple API calls which will
make certain actions easier or more natural.

## Installation

This module is released in to the npm registry as `githulk`:

```
npm install --save githulk
```

## Usage

The GitHulk module is exposed as a single function (constructor) and can
therefor be required as:

```js
'use strict';

var GitHulk = require('githulk');
```

To initialise a new GitHulk instance simply construct it using:

```js
var githulk = new GitHulk(/* optional options */);
```

As you've might have noticed from the function call above, it accepts an
optional options object. The following options can be provided:

- `url`: The API endpoint of the Github API (with trailing slash).
- `maxdelay`: Maximum delay for exponential back off.
- `mindelay`: Minimum delay for exponential back off.
- `retries`: Amount of retries before finally giving up.
- `factor`: Exponential back off factor.
- `cache`: A cache for conditional lookups.
- `user`: A Github username (see Authorization)
- `password`: A Github password (see Authorization)
- `token`: A oauth token (see Authorization)

### Authorization

If no options are supplied your API calls will be severely limited by GitHub and
a really low rate limiting of 60 API calls per hour will be in place. In order
to authorize the GitHulk instance you can provide it with:

- `token`: An oauth token for your application.
- `user`, `password`: The user and password of your account (for basic auth).
- `authorization`: A predefined authorization header for each request.

In addition to supplying your authorization details through the constructor of
the function we also support them through `ENV` variables. Set the
`GITHULK_TOKEN` or `GITHUB_TOKEN` variable with your oauth token and we will use
that automatically.

### Arguments

All API endpoints follow the same function signature, the order in which they
are provided does not matter. The only argument that is optional is the
`options` argument.

- `project`: An **string** that has the username/repo combination.
- `options`: An **object** with additional configuration for the API method.
- `fn`: An **function** which is called with an error first callback pattern.

The following API endpoints are implemented, they are currently implemented on
a need to have basis:

### .repository

- `githulk.repository.contents`
- `githulk.repository.readme`
- `githulk.repository.raw`
- `githulk.repository.moved`

## License

MIT

---
_Source: https://npm.io/package/githulk · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
