10000 GitHub - weargoggles/coreapi-promise: Javascript client library for Core API.
[go: up one dir, main page]

Skip to content
This repository was archived by the owner on Aug 15, 2023. It is now read-only.

weargoggles/coreapi-promise

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Javascript client library for Core API.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%
0