@@ -57,7 +57,7 @@ impl<'client, C: crate::HttpClient + Sync + 'client> HelixClient<'client, C> {
57
57
/// use futures::TryStreamExt;
58
58
///
59
59
/// let users: Vec<helix::users::User> = client
60
- /// .get_users_from_ids(&["1234", "4321"][..].into(), &token).try_collect().await?;
60
+ /// .get_users_from_ids(&["1234", "4321"][..].into(), &token).try_collect().await?;
61
61
/// # Ok(()) }
62
62
/// ```
63
63
pub fn get_users_from_ids < T > (
@@ -126,7 +126,7 @@ impl<'client, C: crate::HttpClient + Sync + 'client> HelixClient<'client, C> {
126
126
/// use futures::TryStreamExt;
127
127
///
128
128
/// let chatters: Vec<helix::channels::ChannelInformation> = client
129
- /// .get_channels_from_ids(&["1234", "4321"][..].into(), &token).try_collect().await?;
129
+ /// .get_channels_from_ids(&["1234", "4321"][..].into(), &token).try_collect().await?;
130
130
/// # Ok(()) }
131
131
/// ```
132
132
pub fn get_channels_from_ids < T > (
@@ -163,7 +163,10 @@ impl<'client, C: crate::HttpClient + Sync + 'client> HelixClient<'client, C> {
163
163
/// use twitch_api::{types, helix};
164
164
/// use futures::TryStreamExt;
165
165
///
166
- /// let live: Vec<helix::streams::Stream> = client.get_streams_from_ids(&["123456", "987654"][..].into(), &token).try_collect().await?;
166
+ /// let live: Vec<helix::streams::Stream> = client
167
+ /// .get_streams_from_ids(&["123456", "987654"][..].into(), &token)
168
+ /// .try_collect()
169
+ /// .await?;
167
170
/// # Ok(()) }
168
171
/// ```
169
172
pub fn get_streams_from_ids < T > (
@@ -198,7 +201,10 @@ impl<'client, C: crate::HttpClient + Sync + 'client> HelixClient<'client, C> {
198
201
/// use twitch_api::{types, helix};
199
202
/// use futures::TryStreamExt;
200
203
///
201
- /// let live: Vec<helix::streams::Stream> = client.get_streams_from_logins(&["twitchdev", "justinfan"][..].into(), &token).try_collect().await?;
204
+ /// let live: Vec<helix::streams::Stream> = client
205
+ /// .get_streams_from_logins(&["twitchdev", "justinfan"][..].into(), &token)
206
+ /// .try_collect()
207
+ /// .await?;
202
208
/// # Ok(()) }
203
209
/// ```
204
210
pub fn get_streams_from_logins < T > (
@@ -644,7 +650,8 @@ impl<'client, C: crate::HttpClient + Sync + 'client> HelixClient<'client, C> {
644
650
/// use twitch_api::{types, helix};
645
651
/// use futures::TryStreamExt;
646
652
///
647
- /// let games: Vec<helix::games::Game> = client.get_games_by_id(&["509658", "32982", "27471"][..].into(), &token).try_collect().await?;
653
+ /// let games: Vec<helix::games::Game> = client
654
+ /// .get_games_by_id(&["509658", "32982", "27471"][..].into(), &token).try_collect().await?;
648
655
/// # Ok(()) }
649
656
/// ```
650
657
pub fn get_games_by_id < T > (
@@ -851,7 +858,8 @@ impl<'client, C: crate::HttpClient + Sync + 'client> HelixClient<'client, C> {
851
858
/// use twitch_api::{types, helix};
852
859
/// use futures::TryStreamExt;
853
860
///
854
- /// let games: Vec<helix::chat::get_emote_sets::Emote> = client.get_emote_sets(&["0"][..].into(), &token).try_collect().await?;
861
+ /// let emotes: Vec<helix::chat::get_emote_sets::Emote> = client
862
+ /// .get_emote_sets(&["0"][..].into(), &token).try_collect().await?;
855
863
/// # Ok(()) }
856
864
/// ```
857
865
pub fn get_emote_sets < T > (
@@ -970,7 +978,7 @@ impl<'client, C: crate::HttpClient + Sync + 'client> HelixClient<'client, C> {
970
978
Ok ( self . req_delete ( req, token) . await ?. data )
971
979
}
972
980
973
- /// Get a users chat color
981
+ /// Update a user's chat color
974
982
pub async fn update_user_chat_color < ' b , T > (
975
983
& ' client self ,
976
984
user_id : impl types:: IntoCow < ' b , types:: UserIdRef > + Send + ' b ,
@@ -988,7 +996,9 @@ impl<'client, C: crate::HttpClient + Sync + 'client> HelixClient<'client, C> {
988
996
Ok ( self . req_put ( req, helix:: EmptyBody , token) . await ?. data )
989
997
}
990
998
991
- /// Get a users chat color
999
+ /// Get a user's chat color
1000
+ ///
1001
+ /// [`None`](Option::None) is returned if the user never set their color in the settings.
992
1002
pub async fn get_user_chat_color < T > (
993
1003
& ' client self ,
994
1004
user_id : impl Into < & types:: UserIdRef > + Send ,
@@ -999,14 +1009,16 @@ impl<'client, C: crate::HttpClient + Sync + 'client> HelixClient<'client, C> {
999
1009
{
1000
1010
Ok ( self
1001
1011
. req_get (
1002
- helix:: chat:: GetUserChatColorRequest :: user_ids ( & [ user_id. into ( ) ] [ .. ] ) ,
1012
+ helix:: chat:: GetUserChatColorRequest :: user_ids ( & user_id. into ( ) ) ,
1003
1013
token,
1004
1014
)
1005
1015
. await ?
1006
1016
. first ( ) )
1007
1017
}
1008
1018
1009
- /// Get multiple users chat colors
1019
+ /// Get multiple users' chat colors
1020
+ ///
1021
+ /// Users that never set their color in the settings are not returned.
1010
1022
///
1011
1023
/// # Examples
1012
1024
///
@@ -1019,7 +1031,8 @@ impl<'client, C: crate::HttpClient + Sync + 'client> HelixClient<'client, C> {
1019
1031
/// use twitch_api::{types, helix};
1020
1032
/// use futures::TryStreamExt;
1021
1033
///
1022
- /// let games: Vec<helix::chat::UserChatColor> = client.get_users_chat_colors(&["1234"][..].into(), &token).try_collect().await?;
1034
+ /// let colors: Vec<helix::chat::UserChatColor> = client
1035
+ /// .get_users_chat_colors(&["1234"][..].into(), &token).try_collect().await?;
1023
1036
/// # Ok(()) }
1024
1037
/// ```
1025
1038
pub fn get_users_chat_colors < T > (
@@ -1217,9 +1230,6 @@ impl<'client, C: crate::HttpClient + Sync + 'client> HelixClient<'client, C> {
1217
1230
where
1218
1231
T : TwitchToken + Send + Sync + ?Sized ,
1219
1232
{
1220
- if ids. len ( ) > 50 {
1221
- return Err ( ClientRequestError :: Custom ( "too many IDs, max 50" . into ( ) ) ) ;
1222
- }
1223
1233
Ok ( self
1224
1234
. req_get (
1225
1235
helix:: points:: GetCustomRewardRequest :: broadcaster_id ( broadcaster_id)
@@ -1276,8 +1286,9 @@ impl<'client, C: crate::HttpClient + Sync + 'client> HelixClient<'client, C> {
1276
1286
///
1277
1287
/// # Notes
1278
1288
///
1279
- /// The return item is a struct [`EventSubSubscriptions`](helix::eventsub::EventSubSubscriptions) which contains the subscriptions.
1280
- /// See the example for getting only the subscriptions
1289
+ /// The return item is a struct [`EventSubSubscriptions`](helix::eventsub::EventSubSubscriptions)
1290
+ /// which contains a field with all the subscriptions.
1291
+ /// See the example for collecting all _specific_ subscriptions
1281
1292
///
1282
1293
/// # Examples
1283
1294
///
0 commit comments