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

twitchapi

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

twitchapi

A lightweight api wrapper for Twitch API

  • 0.2.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

TwitchAPI Wrapper


A lightweight wrapper for the Twitch API. Easy to use, and no hassle.

To install:

npm install twitchapi --save

Routes currently available:

  • channels/:channel
  • games/top
  • search/channels
  • search/games
  • search/streams
  • streams
  • streams/:channel
  • streams/featured
  • streams/summary
  • teams
  • teams/:team
  • videos/:id
  • videos/top
  • channels/:channel/videos
  • Custom requests using the custom.request syntax

For visual use of each route, please checkout the examples directory.

How to use:

var Twitch = require('twitchapi').default;
var TwitchAPI = new Twitch('API_CLIENT_ID');

TwitchAPI.search('streams', { query: 'Halo' })
  .then((results) => {
    console.log(results);
  })
  .catch((error) => {
    console.log(error);
  });

How to use (es6):

import Twitch from 'twitchapi';    
const TwitchAPI = new Twitch('API_CLIENT_ID');

TwitchAPI.search('streams', { query: 'Halo' })
	.then((results) => {
	  console.log(results);
	})
	.catch((error) => {
	  console.log(error);
	});

You can refer to the twitch api documention for more details on configuration for the routes (ex. query, limit, offset, etc)

Better documentation will exist soon.

Keywords

FAQs

Package last updated on 05 Feb 2017

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