0.0.2 • Published 10 years ago

wikidocs v0.0.2

Weekly downloads
6
License
MIT
Repository
github
Last release
10 years ago

wikidocs-npm

Wikidocs nodeJS module. See more at wikidocs

Installation

npm install wikidocs

Usage

var wd = require('wikidocs');

var token = wd.generateAccessToken({
    wdApiId: 'demo',
    wdAppSecret: 'demo',
    userId: 'user-123',
    access: {
        'channel-1': 'full'
    }
});

// Use the token to fire up Wikidocs!

Params:

  • string options.wdAppId - Wikidocs app id

  • string options.wdAppSecret - Wikidocs app secret

  • string options.userId - An application-specific id that is used to tag edits so they can be associated with a particular user.

  • object options.access - A hash of channel - rights

  • number options.lifetime=62400 - Token expiration time in seconds since generation

  • object options.session - Custom user session attributes available in Wikidocs session object