Open simonsan opened 5 years ago
@simonsan I see your link to the twitch API docs, but where do we want to do this at? https://github.com/simonsan/twitch_api/blob/master/src/channels.rs#L53
We should get back the entire model object here via the channel id.
I'd be happy to work on this btw! I'm just a bit confused at what to do here :)
The problem is that (afaik) you don't really get the channel id from Twitch, just the client id. This is also connected to #2. To fill out this gap and have all the credentials at one place I thought of this:
pub fn get_cred_from_file
to impl TwitchClient
(or where it makes sense) and parse the credentials in there -> #2 channel id
is not given, make an API call(Channels:get(&self)
) to Twitch -> (this issue)What are your thoughts about this?
@simonsan Instead of a .json
file could we make it a .toml
to keep synonymous with other rust project configuration?
But other than that, that seems like a decent idea to me!
@calvinbrown085 Change some things here in this repo and lavisheng was implementing import functions for toml files.You still in it to work on this? ;-)
@simonsan Anyone else can work on it as well, I just got back from a trip so it's going to be a couple days before I get back to OS :)
Example usage:
curl -H 'Accept: application/vnd.twitchtv.v5+json' \
-H 'Client-ID: uo6dggojyb8d6soh92zknwmi5ej1q2' \
-X GET https://api.twitch.tv/kraken/users?login=dallas,dallasnchains
We should get the channel ID automatically from the API with a client id