raml-client

2.2.0 • Public • Published

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
  });

Readme

Keywords

Package Sidebar

Install

npm i raml-client

Weekly Downloads

10

Version

2.2.0

License

MIT

Unpacked Size

1.54 MB

Total Files

283

Last publish

Collaborators

  • nescalante