UNPKG

1.21 kBSource Map (JSON)View Raw
1{"version":3,"names":[],"mappings":"","sources":["RateLimit.js"],"sourcesContent":["/**\n * @file\n * @copyright 2013 Michael Aufreiter (Development Seed) and 2016 Yahoo Inc.\n * @license Licensed under {@link https://spdx.org/licenses/BSD-3-Clause-Clear.html BSD-3-Clause-Clear}.\n * Github.js is freely distributable.\n */\n\nimport Requestable from './Requestable';\n\n/**\n * RateLimit allows users to query their rate-limit status\n */\nclass RateLimit extends Requestable {\n /**\n * construct a RateLimit\n * @param {Requestable.auth} auth - the credentials to authenticate to GitHub\n * @param {string} [apiBase] - the base Github API URL\n * @return {Promise} - the promise for the http request\n */\n constructor(auth, apiBase) {\n super(auth, apiBase);\n }\n\n /**\n * Query the current rate limit\n * @see https://developer.github.com/v3/rate_limit/\n * @param {Requestable.callback} [cb] - will receive the rate-limit data\n * @return {Promise} - the promise for the http request\n */\n getRateLimit(cb) {\n return this._request('GET', '/rate_limit', null, cb);\n }\n}\n\nmodule.exports = RateLimit;\n"],"file":"RateLimit.js"}
\No newline at end of file