twitch-rs / twitch_api

Rust library for talking with the Twitch API aka. "Helix", TMI and more! Use Twitch endpoints fearlessly!
Apache License 2.0
151 stars 33 forks source link

feat: Add Get Conduits & Create Conduit endpoints #408

Closed pajlada closed 7 months ago

pajlada commented 7 months ago

This doesn't implement all conduit-related endpoints on purpose since I'm slow/not sure what I'm doing so I thought doing little by little is a better idea

Questions: 1) The token for create_conduit & get_conduits must be an app access token. Can I check that compile-time somehow with a trait or something? 2) I've left a bunch of stuff on the bodies/requests (like typed-builder) that I don't really understand. Please let me know if they should be removed

Emilgardis commented 7 months ago
  1. The token for create_conduit & get_conduits must be an app access token. Can I check that compile-time somehow with a trait or something?

There is a way to do it, but not needed https://docs.rs/twitch_oauth2/0.13.0/twitch_oauth2/trait.TwitchToken.html#tymethod.token_type

That should be promoted to const when available.