raml-client
v2.2.0
Published
RAML client generator
Downloads
11
Readme
RAML Client
Generate a friendly client from your RAML in runtime for node and the browser
Install
npm install raml-client
Usage
const ramlParser = require('raml-1-parser');
const API = require('raml-client')();
ramlParser.loadApi('path/to/my.raml')
.then((raml) => {
return API.createClient(raml.toJSON());
})
.then((client) => {
return client.endpoint.get({ query: 'term' });
})
.then((response) => {
response.body; // my content
});