No description or website provided.
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.editorconfig
.gitattributes
.gitignore
.travis.yml
LICENSE.txt
index.js
package.json
readme.md
test.js
yarn.lock

readme.md

rollodeqc-gh-search-users

Build Status Coverage Status Dependency Status

RollodeQc module to search GitHub users.

Install

$ npm install --save rollodeqc-gh-search-users

Usage

const ghSearchUsers = require('rollodeqc-gh-search-users')

ghSearchUsers('unicorns').then((result) => {
  console.log(JSON.stringify(result, null, ' '))
})
//=> {
  "total_count": 48,
  "incomplete_results": false,
  "items": [
    {
      "login": "DirtyUnicorns",
      "id": 10095278,
      "type": "Organization",
      "site_admin": false,
      "score": 29.105461
    },
    // ...
    {
      "login": "rainbowify",
      "id": 1377335,
      "type": "User",
      "site_admin": false,
      "score": 5.071583
    }
  ],
  "headers": {
    "server": "GitHub.com",
    "date": "Fri, 01 Apr 2016 00:39:43 GMT",
    "status": "200 OK",
    "x-ratelimit-limit": 30,
    "x-ratelimit-remaining": 29,
    "x-ratelimit-reset": 1459471243,
    "timestamp": 1459471183,
    "timestampDiff": 2.92,
    "statusCode": 200
  }
}

API

ghSearchUsers(query, [token])

Search GitHub for users. Returns a promise.

query

Type: string|object

string values can represent a search query or a complete GitHub API URL (beginning with http:// or https://). Otherwise see the tests and source code if query is an object.

token

Type: string
Default: null

GitHub token for greater rate limits. Can be overridden globally with the GITHUB_TOKEN environment variable.

Dependencies

  • lodash.flow
  • lodash.deburr
  • lodash.flatten
  • lodash.uniq
  • lodash.partial
  • rollodeqc-gh-utils

License

AGPL-v3 © Robin Millette