Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/realizehit/client-api.js
realizehit api client for Javascript
https://github.com/realizehit/client-api.js
Last synced: 16 days ago
JSON representation
realizehit api client for Javascript
- Host: GitHub
- URL: https://github.com/realizehit/client-api.js
- Owner: realizehit
- License: gpl-3.0
- Created: 2015-05-20T12:06:21.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2016-01-22T18:29:49.000Z (almost 9 years ago)
- Last Synced: 2024-11-09T08:49:31.714Z (about 2 months ago)
- Language: JavaScript
- Size: 18.6 KB
- Stars: 2
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# realizehit-client-api [![Build Status](https://travis-ci.org/realizehit/client-api.js.svg?branch=master)](https://travis-ci.org/realizehit/client-api.js)
realizehit API Client
Probably you might want to use [realizehit/realizehit](https://github.com/realizehit/realizehit) instead.
## Usage
#### Run as NPM module
```bash
npm i -g realizehit-client-api
``````javascript
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
```bash
git clone https://github.com/realizehit/client-api.js.git
cd client-api.js
npm install
npm test
```