ArchivesSpace REST Api Client
NodeJS module providing common functions of the ArchivesSpace REST Api
Basic Info
Install:
$ npm install asapi
Use:
var Api = ;var api = url:"http://localhost:8089";api;
Test:
$ npm install jasmine-node -g
$ jasmine-node spec
Note: ArchivesSpace should be running on port 8089, using a test database.
Examples
Convert all extent information to metric system:
api;
Promises (0.1.0 and up)
You can use this library with promises. You need to wrap whatever promise provider you want to use when constructing the client:
var Q = ; var api = url:'http://localhost:8089' active_repo: 2 { var d = Qdefer; return resolve: dresolve reject: dreject promise: dpromise }; api;
In the Browser
Install with bower and include bundle.js in your project:
$ bower install asapi --save
To build bundle.js and test it, check out the source code and do the following:
git clone git@github.com:quoideneuf/asapi.gitnpm installgrunt browserifygrunt karma
This requires Chrome.
REPL
To play around in REPL mode, start up ArchivesSpace on the default ports with the default admin user, and:
./scripts/repl.js>