Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

nrpatten/node-tipbot-api

Open more actions menu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Node TipBot API

NPM
Known Vulnerabilities

NPM Installation


$ npm install node-tipbot-api

Clone the project via github


$ git clone https://github.com/nrpatten/node-tipbot-api.git
  • Then meet the package dependencies:
$ cd node-tipbot-api/
$ npm install

First steps


  • include node-tipbot-api into your project:
var tipbot = require('node-tipbot-api');

Configuration options true or false


tipbot.options({
    'stream' : true,
    'cleartext' : true 
});

By default the returned data is an object, in order to get clear text you have to add the option cleartext (streams will always return objects):

Cleartext

  • To activate Cleartext simply add to your options:
'cleartext' : true

Streams

  • To activate Streaming simply add to your options:
'stream' : true

Example


sendCustomRequest
  • url String
  • callback Function
var url = 'http://api.icndb.com/jokes/random';
tipbot.sendCustomRequest( url, function( data ) {
    var info = data;
    console.log( info.value.joke );
});

About

Node TipBot API

Resources

License

Stars

Watchers

Forks

Packages

No packages published
Morty Proxy This is a proxified and sanitized view of the page, visit original site.