0.1.4 • Published 6 years ago

jive-simple-api v0.1.4

Weekly downloads
1
License
ISC
Repository
github
Last release
6 years ago

jive-simple-api

Simple JIVE API to post content to JIVE site. This is based on Jive REST API

Installation

npm install jive-simple-api --save

Methods

  • post(options, callback) = Post new content to JIVE API
  • update(docId, options, callback) = Update to existing content

Options Object

options.clientId

Type: String Default value: ''

JIVE OAUTH2 Client ID

options.clientSecret

Type: String Default value: ''

JIVE OAUTH2 Client Secret

options.refreshToken

Type: String Default value: ''

JIVE OAUTH2 Refresh Token

options.tokenUrl

Type: String Default value: ''

JIVE Token URL for obtaining the access token

options.url

Type: String Default value: ''

JIVE API URL

options.jive_opts

Type: Object Default value:

JIVE Fields - same as JIVE Fields

Callback

function(error, result) {}

Example usage

var jive = require('jive-simple-ai');

jive.post({
    clientId: '[CLIENT ID]',
    clientSecret: '[CLIENT SECRET]',
    refreshToken: '[REFRESH TOKEN]',
    tokenUrl: '[TOKEN URL]',
    url: '[JIVE URL]',
    jive_opts: {
        content: {
            type: "text/html",
            text: "hello World"
        },
        subject: "Hello World",
        type: "document"
    }
},
    function(error, result) {
        console.log(error);
        console.log(JSON.stringify(result));
});

Log

specify --verbose or -v to turn on the verbose log

0.1.4

6 years ago

0.1.3

6 years ago

0.1.2

6 years ago

0.1.1

6 years ago

0.1.0

6 years ago