realizehit-client-api

0.1.1 • Public • Published

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

Readme

Keywords

Package Sidebar

Install

npm i realizehit-client-api

Weekly Downloads

4

Version

0.1.1

License

GPL-3.0

Last publish

Collaborators

  • cuss