# @rqt/github

> A GitHub API implementation.

Latest version **1.3.1** (published 2019-12-01) · MIT license · 0 weekly downloads

## Install

```sh
npm install @rqt/github
pnpm add @rqt/github
yarn add @rqt/github
bun add @rqt/github
```

## 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.3.1 |
| Published | 2019-12-01 |
| First published | 2018-09-27 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 53.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Anton |
| Maintainers | zvr |
| Keywords | github, rqt, api, client |

## Links

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

## Alternatives

- [launchdarkly-js-client-sdk](https://npm.io/package/launchdarkly-js-client-sdk.md) — 2.5M weekly downloads
- [@elastic/elasticsearch](https://npm.io/package/@elastic/elasticsearch.md) — 2.1M weekly downloads
- [@c8y/client](https://npm.io/package/@c8y/client.md) — 15.3K weekly downloads
- [@signaldb/maverickjs](https://npm.io/package/@signaldb/maverickjs.md) — 1.7K weekly downloads
- [@bbc/http-transport-cache](https://npm.io/package/@bbc/http-transport-cache.md) — 1.2K weekly downloads

## Recent versions

- 1.3.1 (latest) — 2019-12-01
- 1.3.0 — 2019-12-01
- 1.2.0 — 2019-11-25
- 1.1.0 — 2019-09-14
- 1.0.0 — 2018-09-27

## README

# @rqt/github

[![npm version](https://badge.fury.io/js/%40rqt%2Fgithub.svg)](https://www.npmjs.com/package/@rqt/github)

`@rqt/github` is a _GitHub API_ implementation in _Node.JS_.

```sh
yarn add @rqt/github
```

<kbd>📙 [Read all API documentation in Wiki](../../wiki)</kbd>

## Table Of Contents

- [Table Of Contents](#table-of-contents)
- [API](#api)
- [`constructor(token?: string): GitHub`](#constructortoken-string-github)
- [Copyright](#copyright)

<p align="center"><a href="#table-of-contents">
  <img src="/.documentary/section-breaks/0.svg?sanitize=true">
</a></p>

## API

The package is available by importing its default function:

```js
import GitHub from '@rqt/github'
```

<p align="center"><a href="#table-of-contents">
  <img src="/.documentary/section-breaks/1.svg?sanitize=true">
</a></p>

## <code><ins>constructor</ins>(</code><sub><br/>&nbsp;&nbsp;`token?: string,`<br/></sub><code>): <i>GitHub</i></code>

Create a new instance of a GitHub API client. If the token is given, it will be used for methods that require it.

```js
/* yarn example/ */
import GitHub from '@rqt/github'
import bosom from 'bosom'

(async () => {
  try {
    const token = await bosom('.token.json')
    const name = 'github-example'
    const org = 'rqt'

    const github = new GitHub(token)
    const repo = await github.repos.create({
      name,
      org,
      homepage: 'https://rqt.biz',
      license_template: 'mit',
      description: 'An example repository.',
      auto_init: true,
      gitignore_template: 'Node',
    })
    console.log('Created a repository at: %s', repo.html_url)

    await github.activity.star(org, name)
    console.log('Starred a repository')
    await github.repos.delete(org, name)
    console.log('Deleted a repository')
  } catch ({ message }) {
    console.log(message)
  }
})()
```
```
Created a repository at: https://github.com/rqt/github-example
Starred a repository
Deleted a repository
```

<p align="center"><a href="#table-of-contents">
  <img src="/.documentary/section-breaks/2.svg?sanitize=true">
</a></p>



## Copyright

Documentation descriptions by _GitHub_.

<table>
  <tr>
    <th>
      <a href="https://artd.eco">
        <img width="100" src="https://raw.githubusercontent.com/wrote/wrote/master/images/artdeco.png"
          alt="Art Deco">
      </a>
    </th>
    <th>© <a href="https://artd.eco">Art Deco</a> for <a>Rqt</a> 2019</th>
    <th>
      <a href="https://www.technation.sucks" title="Tech Nation Visa">
        <img width="100" src="https://raw.githubusercontent.com/idiocc/cookies/master/wiki/arch4.jpg"
          alt="Tech Nation Visa">
      </a>
    </th>
    <th><a href="https://www.technation.sucks">Tech Nation Visa Sucks</a></th>
  </tr>
</table>

<p align="center"><a href="#table-of-contents">
  <img src="/.documentary/section-breaks/-1.svg?sanitize=true">
</a></p>

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