Hi guys,
I’m using Phyton 3 (with Twitch API v5) for preparing an exam about “Social Media Mining”.
I need some help for getting all channel followers. I just tried with the offset, but it has a limit of 3400 followers (if using direction desc and asc).
I see that everybody says that cursor has no limits, but i don’t know how to use it!
Help me please!
Thank you so so so much!
P.S.: after having all the followers, I have to generate a graph. I’ll use Gephi… but how can I have the edge list???
The documentation for the call you’re referencing is here:
When you make your initial call, one of the properties in the response will be _cursor. One of the optional parameters you can provide is cursor. This instructs the API on where to begin its response. This will allow you to iterate through all of a channel’s followers.
thank you so much for your response! excuse my ignorance, but how and where can I find the cursor?
An example response from GetChannelFollowers looks like this (per documentation):
{
"_cursor": "1481675542963907000",
"_total": 41,
"follows": [{
"created_at": "2016-12-14T00:32:22.963907Z",
"notifications": false,
"user": {
"_id": "129454141",
"bio": null,
"created_at": "2016-07-13T14:40:42.398257Z",
"display_name": "dallasnchains",
"logo": null,
"name": "dallasnchains",
"type": "user",
"updated_at": "2016-12-14T00:32:16.263122Z"
}
},
...
]
}
The first property in that response is _cursor. Use that value to page more listings.
Thanks again man… but where can i find it? in the console? in page analysis? because i’ve searched it everywhere, but i cant find it… i’m ignorant… sorry…
please, give me an example for calling the cursor; because, if i ask for a request client.channels.get_by_id(channel_id=…), python gives me all the parameters after ’ “follows”: [{ ', not _cursor and _total…
if i ask client.channel.get() gives me an error…
I think you’re calling the wrong endpoint. It sounds like you’re calling:
https://api.twitch.tv/kraken/channels/
when you should be calling:
https://api.twitch.tv/kraken/channels//follows
thank you so much, i found that!!