appdotcouch

Export global app.net stream to CouchDB

appdotcouch

Export global app.net stream to CouchDB.

You need a valid access token from app.net. See here how to gain one https://github.com/appdotnet/api-spec/blob/master/auth.md#server-side-flow-ruby-python-php-java-etc.

Then run npm install -g appdotcouch to install this script.

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
--minid [value]               api parameter min_id
--maxid [value]               api parameter max_id
--count [value]               api parameter count
--includeuser [value]         api parameter include_user
--includeannotations [value]  api parameter include_annotations
--includereplies [value]      api parameter include_replies

You can also use this module in your own code directly – just require('appdotcouch').

var AppDotCouch = require('appdotcouch'),
    config = require('config.json'),
    obj = AppDotCouch.create(config);

obj.dump();

All options in config should exectly be named like they are in the CLI.

Create a new AppDotCouch object with cfg.

  • Object cfg configuration
  • Object new AppDotCouch object

Convenience constructor for AppDotCouch.

  • Object cfg configuration
  • Object new AppDotCouch object

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

  • Function cb

Feel free to contribute to this project. There are some unit tests included in this project, type npm test and be sure to have a local couch db without username and password and an empty database called appdotcouch. Just be sure to set an access token in `test/appdotcouch.js.