Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

realizehit-client-api

realizehit5GPL-3.00.1.1

realizehit api client

realizehit, api, client

readme

realizehit-client-api Build Status

realizehit API Client

Probably you might want to use realizehit/realizehit instead.

Usage

Run as NPM module

npm i -g realizehit-client-api
var APIClient = require( 'realizehit-client-api' )
var client = new APIClient( 'https://realizehit.example.com/' )

// Publish something cool
client.publish(
    // On
    {
        kind: 'news',
        channel: 'CNN'
    },
    {
        id: 'deeznuts',
        title: 'deez nuts went viral',
        body: 'this might seem crazy, but right now I am lazy to write some textzy'
    }
)

// Callbacks? I promise not!!
client
.publish({ foo: 'bar' }, 'amazing' )
.then(function () {
    console.log( 'I am a dummy message, just to warn everything went ok' )
})
.catch(function ( err ) {
    console.log( 'Dope!!1 Simpsons error here' )
})

Run from the command-line (WIP)

Not developed, just an idea, want to develop it?

Contributing

git clone https://github.com/realizehit/client-api.js.git
cd client-api.js
npm install
npm test