appdotcouch

Export global app.net stream to CouchDB

npm install appdotcouch
7 downloads in the last week
11 downloads in the last month

appdotcouch

Export global app.net stream to CouchDB.

This is is a CLI, but you can also use it in your own node procjects. Be sure to checkout the api description at the bottom.

Important You need a valid access token from app.net to use this tool.

How to get an access token

CLI

Usage: appdotcouch [options]

Options:

  -h, --help                    output usage information
  -V, --version                 output the version number
  --token [value]               app.net auth token
  --db [value]                  uri to couch db
  --uri [value]                 app.net api uri for global stream
  --sinceid [value]             api parameter since_id
  --beforeid [value]            api parameter before_id
  --count [value]               api parameter count
  --includeuser [value]         api parameter include_user
  --includeannotations [value]  api parameter include_annotations
  --includereplies [value]      api parameter include_replies

Developers

Please make sure to include unit tests, if you want to contribute to this project.

To run the unit tests, there are several steps to do:

  1. install this package with npm install -g appdotcouch
  2. start your CouchDB and create a database
  3. register an application at https://alpha.app.net/developer/app/create/ (dev accounts only)
  4. cp config.example.json config.json
  5. insert your application details at config.json
  6. run tests with npm test

Examples

AppDotCouch

object.dump()

returns no error.

client.dump(function (err) {
  should.not.exist(err);
  done();
});

API

AppDotCouch()

Create a new AppDotCouch object with token and filters.

Params:

  • String db CouchDB uri

  • String token app.net auth token

  • Object filters for the request

Return:

  • Object new AppDotCouch object

AppDotCouch.create(db, token, filters)

Convenience constructor for AppDotCouch.

Params:

  • String db CouchDB uri

  • String token app.net auth token

  • Object filters for the request

Return:

  • Object new AppDotCouch object

object.dump(cb)

Dump the latest posts from app.net to CouchDB and callback cb(err).

Params:

  • Function cb
npm loves you