Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/telamon/twitchy
TwitchTV REST API wrapper for node.js
https://github.com/telamon/twitchy
Last synced: about 1 month ago
JSON representation
TwitchTV REST API wrapper for node.js
- Host: GitHub
- URL: https://github.com/telamon/twitchy
- Owner: telamon
- Created: 2013-09-14T16:58:07.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2016-02-02T22:18:46.000Z (almost 9 years ago)
- Last Synced: 2024-11-05T03:17:34.280Z (about 2 months ago)
- Language: JavaScript
- Size: 160 KB
- Stars: 4
- Watchers: 2
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
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 yetREST API
Block/Ignore control
√ getBlocks (1106ms)
√ blockUser (1046ms)
√ unblockUser (1018ms)
Channels control
√ getChannel (1002ms)
Followers control
√ getFollowersOf (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!