6.0.0 • Published 5 years ago
@datafire/apis_guru v6.0.0
@datafire/apis_guru
Client library for APIs.guru
Installation and Usage
npm install --save @datafire/apis_guru
let apis_guru = require('@datafire/apis_guru').create();
.then(data => {
console.log(data);
});
Description
Wikipedia for Web APIs. Repository of API specs in OpenAPI(fka Swagger) 2.0 format.
Warning: If you want to be notified about changes in advance please subscribe to our Gitter channel.
Actions
listAPIs
List all APIs in the directory.
Returns links to OpenAPI specification for each API in the directory.
If API exist in multiple versions preferred
one is explicitly marked.
Some basic info from OpenAPI spec is cached inside each object. This allows to generate some simple views without need to fetch OpenAPI spec for each API.
apis_guru.listAPIs(null, context)
Input
This action has no parameters
Output
- output APIs
getMetrics
Some basic metrics for the entire directory. Just stunning numbers to put on a front page and are intended purely for WoW effect :)
apis_guru.getMetrics(null, context)
Input
This action has no parameters
Output
- output Metrics
Definitions
API
- API
object
: Meta information about API- added required
string
: Timestamp when the API was first added to the directory - preferred required
string
: Recommended version - versions required
object
: List of supported versions of the API
- added required
APIs
- APIs
object
: List of API details.
ApiVersion
- ApiVersion
object
- added required
string
: Timestamp when the version was added - externalDocs
object
: Copy ofexternalDocs
section from Swagger spec - info required
object
: Copy ofinfo
section from Swagger spec - swaggerUrl required
string
: URL to Swagger spec in JSON format - swaggerYamlUrl required
string
: URL to Swagger spec in YAML format - updated required
string
: Timestamp when the version was updated
- added required
Metrics
- Metrics
object
: List of basic metrics- numAPIs required
integer
: Number of APIs - numEndpoints required
integer
: Total number of endpoints inside all specifications - numSpecs required
integer
: Number of API specifications including different versions of the same API
- numAPIs required