|
5 | 5 | //! |
6 | 6 | //! ## Request: [ModifyChannelInformationRequest] |
7 | 7 | //! |
8 | | -//! To use this endpoint, construct a [`ModifyChannelInformationRequest`] with the [`ModifyChannelInformationRequest::builder()`] method. |
| 8 | +//! To use this endpoint, construct a [`ModifyChannelInformationRequest`] with the [`ModifyChannelInformationRequest::broadcaster_id()`] method. |
9 | 9 | //! |
10 | 10 | //! ```rust |
11 | 11 | //! use twitch_api::helix::channels::modify_channel_information; |
12 | | -//! let request = modify_channel_information::ModifyChannelInformationRequest::builder() |
13 | | -//! .broadcaster_id("1234") |
14 | | -//! .build(); |
| 12 | +//! let request = |
| 13 | +//! modify_channel_information::ModifyChannelInformationRequest::broadcaster_id("1234"); |
15 | 14 | //! ``` |
16 | 15 | //! |
17 | 16 | //! ## Body: [ModifyChannelInformationBody] |
|
20 | 19 | //! |
21 | 20 | //! ``` |
22 | 21 | //! # use twitch_api::helix::channels::modify_channel_information; |
23 | | -//! let body = modify_channel_information::ModifyChannelInformationBody::builder() |
24 | | -//! .title("Hello World!") |
25 | | -//! .build(); |
| 22 | +//! let mut body = modify_channel_information::ModifyChannelInformationBody::new(); |
| 23 | +//! body.title("Hello World!"); |
26 | 24 | //! ``` |
27 | 25 | //! |
28 | 26 | //! ## Response: [ModifyChannelInformation] |
|
39 | 37 | //! # let client: helix::HelixClient<'static, client::DummyHttpClient> = helix::HelixClient::default(); |
40 | 38 | //! # let token = twitch_oauth2::AccessToken::new("validtoken".to_string()); |
41 | 39 | //! # let token = twitch_oauth2::UserToken::from_existing(&client, token, None, None).await?; |
42 | | -//! let request = modify_channel_information::ModifyChannelInformationRequest::builder() |
43 | | -//! .broadcaster_id("1234") |
44 | | -//! .build(); |
45 | | -//! let body = modify_channel_information::ModifyChannelInformationBody::builder() |
46 | | -//! .title("Hello World!") |
47 | | -//! .build(); |
| 40 | +//! let request = modify_channel_information::ModifyChannelInformationRequest::broadcaster_id("1234"); |
| 41 | +//! let mut body = modify_channel_information::ModifyChannelInformationBody::new(); |
| 42 | +//! body.title("Hello World!"); |
48 | 43 | //! let response: modify_channel_information::ModifyChannelInformation = client.req_patch(request, body, &token).await?.data; |
49 | 44 | //! # Ok(()) |
50 | 45 | //! # } |
|
0 commit comments