twi

twitchy

TwitchTV REST API wrapper for node.js

Showing:

Popularity

Downloads/wk

1

GitHub Stars

4

Maintenance

Last Commit

8yrs ago

Contributors

0

Package

Dependencies

4

Size (min+gzip)

19.2KB

License

BSD-2-Clause

Type Definitions

Tree-Shakeable

No?

Categories

Readme

Twitchy

This is a TwitchTv REST API wrapper for node.

Installation

Add the following to your dependencies hash in package.json

"twitchy" : "https://github.com:/telamon/twitchy.git"

or run the following command.

$ npm install https://github.com:/telamon/twitchy.git

Usage

var Twitchy = require('twitchy');

client = new Twitchy({
  key : 'YOURACCESSKEY',
  secret: 'YOURSECRET',
  access_token: 'TOKEN'         <-- if you have one...
});

client.auth(function(err,access_token){
    if(!err)
        console.log("Authed using token: "+access_token);
});

client.getRoot(function(err,info){
  console.log("Logged in as: "+info.token.user_name);
});

client.getChannel('numrii',function(err,channelInfo){
    console.log(channelInfo);
});

Work in Progress

Only the following methods are implemeneted yet

REST API
 Block/Ignore controlgetBlocks (1106ms)
   √ blockUser (1046ms)
   √ unblockUser (1018ms)
 Channels controlgetChannel (1002ms)
 Followers controlgetFollowersOf (2168ms)
   √ getFollowedChannels (998ms)
   √ unfollowChannel (1112ms)
   √ followChannel (1393ms)

(taken directly from the test output)

I'll add more methods in time, but until then you can use the following to access un-implemented API methods.

var Twitchy = require('twitchy');

twitch= new Twitchy(credentials);

twitch._get("search/streams?q=starcraft",function(err,result){
  console.log(arguments);
});

// The other methods are
twitch._put(url,callback);
twitch._delete(url,callback);
twitch._post(url,postdata,callback);

Good luck!

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100