Skip to content

Commit ed78a47

Browse files
committed
apply suggestions
Co-authored-by Nerixyz <[email protected]>
1 parent 7d4fd35 commit ed78a47

File tree

4 files changed

+16
-13
lines changed

4 files changed

+16
-13
lines changed

examples/channel_information_custom.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ async fn run() -> Result<(), Box<dyn std::error::Error + Send + Sync + 'static>>
2727

2828
let resp = client
2929
.req_get_custom(
30-
helix::channels::GetChannelInformationRequest::broadcaster_ids(vec![&token.user_id]),
30+
helix::channels::GetChannelInformationRequest::broadcaster_ids(&token.user_id),
3131
&token,
3232
)
3333
.await

src/helix/client/client_ext.rs

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -970,7 +970,7 @@ impl<'client, C: crate::HttpClient + Sync + 'client> HelixClient<'client, C> {
970970
Ok(self.req_delete(req, token).await?.data)
971971
}
972972

973-
/// Get a users chat color
973+
/// Update a user's chat color
974974
pub async fn update_user_chat_color<'b, T>(
975975
&'client self,
976976
user_id: impl types::IntoCow<'b, types::UserIdRef> + Send + 'b,
@@ -988,7 +988,9 @@ impl<'client, C: crate::HttpClient + Sync + 'client> HelixClient<'client, C> {
988988
Ok(self.req_put(req, helix::EmptyBody, token).await?.data)
989989
}
990990

991-
/// Get a users chat color
991+
/// Get a user's chat color
992+
///
993+
/// [`None`](Option::None) is returned if the user never set their color in the settings.
992994
pub async fn get_user_chat_color<T>(
993995
&'client self,
994996
user_id: impl Into<&types::UserIdRef> + Send,
@@ -1006,7 +1008,9 @@ impl<'client, C: crate::HttpClient + Sync + 'client> HelixClient<'client, C> {
10061008
.first())
10071009
}
10081010

1009-
/// Get multiple users chat colors
1011+
/// Get multiple users' chat colors
1012+
///
1013+
/// Users that never set their color in the settings are not returned.
10101014
///
10111015
/// # Examples
10121016
///
@@ -1217,9 +1221,6 @@ impl<'client, C: crate::HttpClient + Sync + 'client> HelixClient<'client, C> {
12171221
where
12181222
T: TwitchToken + Send + Sync + ?Sized,
12191223
{
1220-
if ids.len() > 50 {
1221-
return Err(ClientRequestError::Custom("too many IDs, max 50".into()));
1222-
}
12231224
Ok(self
12241225
.req_get(
12251226
helix::points::GetCustomRewardRequest::broadcaster_id(broadcaster_id)
@@ -1276,8 +1277,9 @@ impl<'client, C: crate::HttpClient + Sync + 'client> HelixClient<'client, C> {
12761277
///
12771278
/// # Notes
12781279
///
1279-
/// The return item is a struct [`EventSubSubscriptions`](helix::eventsub::EventSubSubscriptions) which contains the subscriptions.
1280-
/// See the example for getting only the subscriptions
1280+
/// The return item is a struct [`EventSubSubscriptions`](helix::eventsub::EventSubSubscriptions)
1281+
/// which contains a field with all the subscriptions.
1282+
/// See the example for collecting all _specific_ subscriptions
12811283
///
12821284
/// # Examples
12831285
///

src/helix/endpoints/chat/get_emote_sets.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,14 @@
33
//!
44
//! # Accessing the endpoint
55
//!
6+
//!
67
//! ## Request: [GetEmoteSetsRequest]
78
//!
89
//! To use this endpoint, construct a [`GetEmoteSetsRequest`] with the [`GetEmoteSetsRequest::emote_set_ids()`] method.
910
//!
1011
//! ```rust
1112
//! use twitch_api::helix::chat::get_emote_sets;
12-
//! let request = get_emote_sets::GetEmoteSetsRequest::emote_set_ids(&["1234"]);
13+
//! let request = get_emote_sets::GetEmoteSetsRequest::emote_set_ids(&"1234");
1314
//! ```
1415
//!
1516
//! ## Response: [Emote]
@@ -24,7 +25,7 @@
2425
//! # let client: helix::HelixClient<'static, client::DummyHttpClient> = helix::HelixClient::default();
2526
//! # let token = twitch_oauth2::AccessToken::new("validtoken".to_string());
2627
//! # let token = twitch_oauth2::UserToken::from_existing(&client, token, None, None).await?;
27-
//! let request = get_emote_sets::GetEmoteSetsRequest::emote_set_ids(&["1234"]);
28+
//! let request = get_emote_sets::GetEmoteSetsRequest::emote_set_ids(&"1234");
2829
//! let response: Vec<helix::chat::get_emote_sets::Emote> = client.req_get(request, &token).await?.data;
2930
//! # Ok(())
3031
//! # }

src/helix/endpoints/videos/delete_videos.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
//!
1010
//! ```rust
1111
//! use twitch_api::helix::videos::delete_videos;
12-
//! let request = delete_videos::DeleteVideosRequest::ids(&["1234"]);
12+
//! let request = delete_videos::DeleteVideosRequest::ids(&"1234");
1313
//! ```
1414
//!
1515
//! ## Response: [DeleteVideo]
@@ -24,7 +24,7 @@
2424
//! # let client: helix::HelixClient<'static, client::DummyHttpClient> = helix::HelixClient::default();
2525
//! # let token = twitch_oauth2::AccessToken::new("validtoken".to_string());
2626
//! # let token = twitch_oauth2::UserToken::from_existing(&client, token, None, None).await?;
27-
//! let request = delete_videos::DeleteVideosRequest::ids(&["1234"]);
27+
//! let request = delete_videos::DeleteVideosRequest::ids(&"1234");
2828
//! let response: delete_videos::DeleteVideo = client.req_delete(request, &token).await?.data;
2929
//! # Ok(())
3030
//! # }

0 commit comments

Comments
 (0)