@colophon/github-client
@colophon/github-client
Last updated 9 months ago by ruxandrafed .
ISC · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @colophon/github-client 
SYNC missed versions from official npm registry.

@colophon/github-client version License Build Status Downloads

Discover and parse Colophon files in your GitHub repositories.

Install

npm install --save @colophon/github-client

Usage

Use the exposed methods to:

  1. Authenticate your client using getAuthedClient (see options here).
  2. Create a new authorization and retrieve the personal access token using getAuthToken. This token can be stored and then used to simplify consequent requests.
  3. Parse all the repositories in your personal or organization's account and retrieve all info found inside Colophon files using getColophonData. If not passing any options, the user's personal repositories will be parsed with the default options (perPage - 100, concurrency - 10).
const { getAuthedClient, getAuthToken, getColophonData } = require('./index.js')

const authedClient = getAuthedClient({ type: 'basic', username: 'username', password: 'password' })

const token = await getAuthToken(authedClient) // not using 2FA OR
const token = await getAuthToken(authedClient, otpCode) // if 2FA is on and using a CLI to get the OTP code from the user

const colophonData = await getColophonData(authedClient, { org: 'acme', perPage: 100, concurrency: 5 })

See more details about Colophon schema here.


License: ISC • Copyright: Colophon Project

Current Tags

  • 1.2.0                                ...           latest (9 months ago)

3 Versions

  • 1.2.0                                ...           9 months ago
  • 1.1.0                                ...           10 months ago
  • 1.0.0                                ...           10 months ago
Downloads
Today 0
This Week 0
This Month 6
Last Day 0
Last Week 0
Last Month 6
Dependencies (3)
Dev Dependencies (1)
Dependents (1)

Copyright 2014 - 2017 © taobao.org |