Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

twitchy-nonblocking

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

twitchy-nonblocking

TwitchTV API library without hogging your port

  • 0.5.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

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 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!

Keywords

FAQs

Package last updated on 02 Feb 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc