rollodeqc-gh-search-users

RoLLodeQc module to search GitHub users.


Keywords
rollodeqc, github, gh, search, user, username, info, users
License
AGPL-3.0
Install
npm install rollodeqc-gh-search-users@1.0.1

Documentation

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