Files
shields/services/librariesio/librariesio-constellation.js
Caleb Cartwright ae58e4a211 Add authentication for Libraries.io-based badges, run [Libraries Bower] (#7080)
* feat: support authentication on Libraries.io requests

* feat: wire up libraries.io config and api provider instantiation

* feat: create libraries.io and bower base classes

* refactor: tweak libraries/bower service classes and tests

* rename request fetcher function/arg

* throw exception when no tokens available

* cleanup old value

Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2021-10-28 19:21:24 -05:00

14 lines
467 B
JavaScript

import LibrariesIoApiProvider from './librariesio-api-provider.js'
// Convenience class with all the stuff related to the Libraries.io API and its
// authorization tokens, to simplify server initialization.
export default class LibrariesIoConstellation {
constructor({ private: { librariesio_tokens: tokens } }) {
this.apiProvider = new LibrariesIoApiProvider({
baseUrl: 'https://libraries.io/api',
tokens,
defaultRateLimit: 60,
})
}
}