0.1.3 • Published 8 years ago

coreapi-promise v0.1.3

Weekly downloads
2
License
BSD-2-Clause
Repository
github
Last release
8 years ago

Javascript client library

Javascript client library for Core API.

build-status-image npm-version

Getting Started

Installation

npm install coreapi-promise

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

8 years ago

0.1.2

8 years ago

0.1.1

8 years ago