Giter Club home page Giter Club logo

twitch-api's People

Contributors

3ventic avatar barrycarlyon avatar bashtech avatar brildum avatar bryanveloso avatar dallasnchains avatar dannyhernandez avatar eleusive avatar ericstratmann avatar expertsonline avatar fire- avatar fisherinnovation avatar froueint avatar fugitech avatar glacials avatar globidev avatar hebo avatar jnvollmer avatar joshtabak avatar jtvjt avatar maxikg avatar mbollier avatar mjperrone avatar mpoon avatar mrjumjum avatar night avatar ossareh avatar skipkayhil avatar teak avatar urgrue avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

twitch-api's Issues

subscription resource docs unclear about check direction

If I do something like:

https://api.twitch.tv/kraken/channels/steven_bonnell_ii/subscriptions/1337hephaestus

I would expect to have to provide the :user's token and get a response indicating whether or not I was subscribed to Destiny.

However, the subscriptions resource now works more like a subscribers resource, in that it depends on the :channel's auth token, and tells the channel whether or not a user is a subscriber, (or at the root resource, lists the subscribers of a particular channel).

If this is the intended behavior of this resource, then the docs don't make it very clear

eg: 'Check if user is subscribed to channel'

with

curl -i https://api.twitch.tv/kraken/channels/hebo/subscriptions/testuser

could return

'testuser has no subscriptions to hebo'

but it's not obvious that we actually need hebo's token to check if testuser is a sub

image if both testuser and hebo have a sub button, and hebo was subscribed to testuser

which path would give us an error, and which path would identify that hebo is in fact subbed to testuser? And who's token do we need to use? As of now, it's not very clear.
https://api.twitch.tv/kraken/channels/hebo/subscriptions/testuser
https://api.twitch.tv/kraken/channels/testuser/subscriptions/hebo

https://api.twitch.tv/kraken/channels/testuser/subscriptions/hebo

with testuser's auth token would be the only way to find out if hebo is subscribed to testuser

my suggestion:

either clarify the docs to indicate the auth direction and the intent of the system, or allow users to reveal who they are subscribed to

for example:

https://api.twitch.tv/kraken/users/1337hephaestus/subscriptions

could list who I am subscribed to, and

https://api.twitch.tv/kraken/users/1337hephaestus/subscriptions/steven_bonnell_ii

would tell me if I am subscribed to Destiny

OR change the current subscriptions resource to subscribers because it makes more semantic sense given the auth direction


something like

https://api.twitch.tv/kraken/users/1337hephaestus/follows/channels/gomtv

would make sense
e.g.:

https://api.twitch.tv/kraken/users/1337hephaestus/subscribes/channels/gomtv

https://api.twitch.tv/kraken/users/1337hephaestus/subscribes/channels


https://api.twitch.tv/kraken/streams/subscribed

could also be a thing (like /streams/followed)

Channels:followers , user:favorites

Figured both of these could be lumped into the same issue since they are the inverse of each other. I've talked to Josh about this some already, but I supposed it's good to put the idea in the list for record's and discussion's sake.

Public Channel needs the ability to get a list of that channel's followers. I'm not sure the logistics the ability for the auth'd channel to get the entire list at once since we do have some pretty large channels and a 10-30k object result via json would probably kill someone.

Public user needs the ability to get that user's list of favorite channels. Since this would be public and to avoid possible abuse, limiting to 100 max like everything else works.

Authenticated user needs the ability to get that user's entire favorite's list in one chunk ( Or chunks of 500-1000 at least? ) , abuse should not be a big problem as it's an authenticated request.

User following stream or not

Having a call that returns whether a given user is following a given stream or not would be extremely useful. Having to traverse the whole list with several calls is not optimal.

My use case for this would be stream giveaways (only followed users gets to participate)

Panels Resource - Update Panels via API ( New Channel Design )

It would be a very good addition to Channels to be able to list, add, edit, remove, and reorder panels in the new design. I realize the new design is in beta, but that's the best time to start asking for additions of this type.

GET /channels/:channel/panels/
GET /channels/:channel/panel/:id/
GET /panel/:id/ ( ?.. Maybe not? )

Authenticated:
POST /channels/:channel/panels/ ( Content, Type, Position | More than one panel at once? )
PUT /channels/:channel/panel/:id/ ( For updating a specific panel )

Position should probably work like it does on the site, popping it out at that point, placing it at whatever position and incrementing the position of all other panels.

Order streams

https://api.twitch.tv/kraken/streams returns streams ordered by viewer count.

My goal is to get streams with low viewer count. As the limit of returned streams is 100, I get way too much TOP-streams.

Two possibilities in my opinion:

  • a param to get response in desired order
  • a param to filter by viewercount (min,max)

About Twitch

When i load up a live stream all i get is a black screen for every stream i join its just black screened :(

Embed count for a stream

In the old JTV api you could see the embed count for a given stream e.g.

http://api.justin.tv/api/stream/list.json

as embed_count. I can't find this information on the new Twitch API. This is a nice stat to have as it is clear that games that get consistently more viewers like LoL and SC2 have a healthy percentage of their viewers coming from embeds.

API call to show all people currently watching a stream

One thing the API is currently lacking is a way to list users currently watching a stream.

A call to get all people currently in a chat would probably be sufficient. Additionally it would be nice to have all the usergroup data associated with each user i.e. Moderator, Pro, Subscriber, all of the above etc. since as far as I can tell there's no way to scrape this from the IRC channels.

Request for channel name to be included in /chat/emoticons

There is no easy way of determining what channel a subscriber only emotes correlates to. There is "emoticon_set" but I can't find any way to resolve that into a channel name.

Currently the only place the channel name appears is in the image URL (ex chansub-leveluplive-emoticon-82766be671bb475c-70x30.png) but not all subscriber emotes follow this pattern (ex chansub-global-emoticon-ef97c4770222476c-23x30.png).

Current API has duplicate entries

Apology if this is a double post, I wasn't able to see my previous
post.

I found duplicates on ONE page (http://api.justin.tv/api/stream/
list.xml?category=gaming&limit=100&offset=99) using no code, showing
me that there is in fact an issue with Twitch's API.

Copy+Pasta with instructions:
http://pastebin.com/JpXAx3ck

Essentially ctrl+F, then look for "deathhand2277", watch the
scrollbar, and keep pressing the "Next" button until you see the
scrollbar jump to the next record (will take 17 clicks).

There's two records that are exactly the same! Off one page request
from Twitch!

IRC Connection Reply 004 incorrect

Upon connection the server sends the following message (among others) to the connecting client:

004: tmi.twitch.tv 0.0.1 w n

The message states that the server supports users as Wallops and that no external messages can be sent to channels. The server may support these, but that's not my concern; my concern is what modes are left out of the message. For example, the server supports mode o (users becoming channel operators) and possibly many others.

On a side note: These could also be added into a 005 RPL_ISUPPORT response, which helps newer clients interact with a server and determine its limitations on the user, such as max # of channels one can join.

List of channel editors

Having this available so the channel owner won't have to replicate the list again would be ideal.

I'd like to use it like a list of trusted users for a channel, giving the user entries additional permissions.

Missing info on how to embed a stream and chat

This might not be API-specific, as it's about embedding streams and chat on websites, but it's relevant and she be mentioned somewhere on these docs. To get it working for my own project, I had to check the source of various websites that had stream embeds to get an idea of what I needed to do.

Also on the embedding topic, info on the ExternalInterface functions that can be called on the stream object would be helpful. The JustinTV API has a pretty extensive page on the topic, and I found that only mute() and unmute() worked for the TwitchTV embed.

List of subscribers for given channel

Getting easy access to a list of the subscribers on a channel would be great. Having to listen in on chat to tell if a user is a subscriber or not isn't exactly optimal.

400 Bad Request every time I try to update game/status

In java, currently I am PUT-ting channel[status]=TEST, for example, to update the status of a stream, but it always returns 400 bad request - I presume this is because I'm not putting the right data from my app, but I'm not sure.

Thanks

/streams/summary additional channel parameter

The API lacks this capability the old one has, which is to give a set amount of channels in a param and have it return a summary of the set's current viewer count, and the amount of live channels from the set. Offline channels in the set would here be counted as 0.

The old API uses the param "channel", which can be just one channel or a comma separated list of several channels.

For me personally, this functionality provides key insight into statistics that would otherwise be hard to get to if each channel had to be queried individually, as the amount of requests wouldn't scale well.

API Channel Status, Game Type updates fail to update.

I'm using the following command to update the stream title:

curl -H "Authorization: OAuth [authvalue]" -X PUT -d 'channel[status]=NEW STATUS' https://api.twitch.tv/kraken/channels/[channelname]/

Which successfully updates the stream title here (in the title box):

http://www.twitch.tv/broadcast/dashboards/[channelname]

However, the actual stream title on the

http://www.twitch.tv/[channelname]

Page does NOT update. To force this I must then click the UPDATE button on:

http://www.twitch.tv/broadcast/dashboards/[channelname]

Additionally, the api returns the updated data when querying channel information.

Channel Resource needs a way to determine which site a channel belongs to ( Twitch / JTV )

Channels supports JTV channels, Streams does not ( Intentional ), and there is no way to tell via Kraken if a channel is a Twitch or Justin channel.
Since categories are not coming back ( Twitch has only one category! ), it would be nice to have a simple way to tell if a channel is JTV or TTV.

Use Case: Scripts can determine if they need to shoot off a call to the JTV api if the channel is not a Twitch channel.

Side note: do you think it would be worth changing the return value of the Streams resource if the channel is not a Twitch channel to differentiate from channels that are simply offline? Or is that not something the api should have to deal with?

Channel get the info but its loading too slow.

I am using php for getting the proper info from the api but when the page with the streams loads it take sooo much time.

Is there any other way (faster) to get the info of a stream?

List of teams

A list of all teams would be a great help. There is a method to get the data for a specific team, but I could not figure out which teams are available.

Information about rate limitations.

I currently have little knowledge about the allowed amount of API requests per minute, and I don't dare spam the API to find out in case of IP black-listing. It would be very helpful to include some information about this in these docs, including an example of what the API would return if the rate limit was exceeded.

Getting the authenticated user without email read permission

Having a scope (null scope or whatever) for just authenticating a user would be nice. This way I don't have to force them to give up their email just to authenticate with my service.

(Currently using the user_read scope and reading the username from /user)

Twitch Logo on Bottom-Right Inteferes with Quality Settings

When I set the Twitch logo to the bottom right, then try to change the quality settings (to the lowest quality, which overlaps the logo), often times the flash app believes I'm actually clicking on the logo, redirecting me to twitch.tv/streamName instead of changing the quality.

Videos resource needs clip Creator added

Currently there's no way to tell what user created a highlight, the owner on a video is set to the channel the highlight was made from ( that's correct ), but there's no way to tell who created highlight clips.

Adding the creator's channel to links ( which would be either null or the same as the owner for standard VODs since they "created" their own clip automagically ) seems like the logical thing to do.

Chat resource missing subscriber emotes, returning identical output for all channels?

I'm trying to get a list of subscriber only emotes, but the output of the chat resource seems to be exactly the same no matter what channel or parameters I pass to it. Channels that I know have subscriber only emotes never show up in the list.

https://api.twitch.tv/kraken/chat/lethalfrag/emoticons
https://api.twitch.tv/kraken/chat/cosmowright/emoticons
https://api.twitch.tv/kraken/chat/teamsp00ky/emoticons

etc.

neither limit nor offset parameters seem to do anything either.

In fact, the only channel I can find that shows even a single subscriber only emote is the test user in the example, and it's just that, a single emote.

I'm not sure if I'm doing something wrong ( Not sure how I would be considering it doesn't work in-browser ), or if the resource is bugged.

Channel search

I could really use a channel search functionality that lets me search for channels/streams by a text string (which would search display_name, status, and potentially team display_names as well). I'd also like to be able to specify a game filter, to only retrieve results within a specific game (or multiple games if possible).

Basically, something like this, except with API-formatted results:
http://www.twitch.tv/search?query=tsm

Follows API request - Stream active or inactive

The new follows API is excellent, however, in order to use it to determine if any followed streams are active, each follow needs to be queried on the stream API to see if it is active or inactive. Users who have a large amount of follows would take a really long time to query this information and use up a bunch of API requests each time. It would be quite a bit more efficient if either a) a filter is added to allow pulling only streaming follows (ie: ?stream=true on query), or b) adding an entry in the follows.channel object named "stream" which is true or false if the stream is active or inactive.

API requests with an offset >= 1600 intermittently return HTTP error 400.

I frequently receive HTTP error 400 responses from the API to what seem to be well-formed HTTP requests sent through cURL. Every time I've checked the API call manually by copying that exact API URL into a browser (Firefox) immediately after having received the 400 response through cURL, I get the expected data returned with an HTTP 200 response (i.e. I've never seen the 400 response while testing the API in a browser).

In addition, I have only ever received the 400 response when the "offset" GET parameter was set to 1600 or higher (e.g. 1700, etc.). When I start seeing the 400 errors on these high-offset calls, it seems they happen for hours at a time, although there will also be "good" (i.e. HTTP 200) responses to the same high-offset calls mixed in during that time as well. Then there will be hours (or days) at a time where I do not see a 400 response.

This is an example of the raw HTTP request header sent from cURL that (sometimes) receives the 400 response:

GET /api/stream/list.json?category=gaming&limit=100&offset=1600 HTTP/1.1
Host: api.justin.tv
Accept: /
Accept-Encoding: gzip

Channel Updating

Reposting from the Twitch support forums as I was post this here instead.

Attempting to update a channel's "status" and "game" as outlined here does not behave as expected. While the returned JSON suggests both have been changed, only the current game actually changes. Additionally, while further requests to the API reflect this change, the page itself, http://twitch.tv/:channel, does not. It only actually updates in the dashboard, where you can force it to update, defeating the purpose of having API functionality for it altogether.

tl;dr, your https://api.twitch.tv/kraken/channels/:channel PUT functionality does not work.

Channel status update fails

When trying to update the channel status via Twitch API, I get a 200 response (which should tell me everything is OK), but the returned object clearely shows the status not being updated.

curl -i -X PUT -H 'Authorization: OAuth 8739tkrwswxmfwhsr9l91iqqx' -H 'Accept: application/vnd.twitchtv+json' https://api.twitch.tv/kraken/channels/yegwenterraria -d'game=ThisDoesNotChange'
HTTP/1.1 200 OK
Server: nginx
Date: Mon, 10 Sep 2012 13:37:01 GMT
Content-Type: application/json; charset=utf-8
Content-Length: 853
Connection: close
status: 200 OK
via: Twice 0.2 web10:3346
x-runtime: 0.325780
x-ua-compatible: IE=Edge,chrome=1
cache-control: max-age=0, private, must-revalidate
x-geo: PL
Front-End-Https: on

{"game":"Terraria","name":"yegwenterraria","created_at":"2011-12-26T20:26:21Z","teams":[],"banner":null,"updated_at":"2012-09-10T11:48:15Z","background":null,"url":"http://www.twitch.tv/yegwenterraria","_links":{"stream_key":"https://api.twitch.tv/kraken/channels/yegwenterraria/stream_key","self":"https://api.twitch.tv/kraken/channels/yegwenterraria","chat":"https://api.twitch.tv/kraken/chat/yegwenterraria","commercial":"https://api.twitch.tv/kraken/channels/yegwenterraria/commercial","videos":"https://api.twitch.tv/kraken/channels/yegwenterraria/videos","features":"https://api.twitch.tv/kraken/channels/yegwenterraria/features"},"logo":"http://static-cdn.jtvnw.net/jtv_user_pictures/yegwenterraria-profile_image-d05171c54c54222e-300x300.png","_id":27043165,"mature":null,"video_banner":null,"display_name":"YegwenTerraria","status":"Inny temat"}

Notification when a Stream goes online

I want to be able to have a program that does something when a specified user's stream goes live. Specifically, I have an IRC Bot that I would like to have notify the channel when the user scglive starts streaming.

I posted on the mailing list about the issue1 and was told to post an issue here about it.

It appears that this is possible with the legacy API2.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.