Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

raml-client

mulesoft61MIT2.2.0TypeScript support: included

RAML client generator

raml, client, generator

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