0.1.3 • Published 10 years ago
coreapi-promise v0.1.3
Javascript client library
Javascript client library for Core API.
Getting Started
Installation
npm install coreapi-promiseWorking with the API
The default export from coreapi-promise is get, a function taking one argument, a URL, and returning a Promise which is resolved with a Document.
You can retrieve the starting point of an API,
get('http://notes.coreapi.org')following up with an operation on the document when the Promise is resolved
.then(document => document.action('add_note', {'description': 'Test note, please ignore'}))and storing the result of that operation
.then(document => { store.set('notes', document.notes) });