Skip to content

realizehit/client-api.js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

realizehit api client for Javascript

Resources

License

Stars

Watchers

Forks

Packages

No packages published