Available on crate feature helix only.
Expand description

Modify channel information for users. modify-channel-information

Accessing the endpoint

Request: ModifyChannelInformationRequest

To use this endpoint, construct a ModifyChannelInformationRequest with the ModifyChannelInformationRequest::builder() method.

use twitch_api2::helix::channels::modify_channel_information;
let request = modify_channel_information::ModifyChannelInformationRequest::builder()
    .broadcaster_id("1234")
    .build();

Body: ModifyChannelInformationBody

We also need to provide a body to the request containing what we want to change.

let body = modify_channel_information::ModifyChannelInformationBody::builder()
    .title("Hello World!".to_string())
    .build();

Response: ModifyChannelInformation

Send the request to receive the response with HelixClient::req_patch().

use twitch_api2::helix::{self, channels::modify_channel_information};
let request = modify_channel_information::ModifyChannelInformationRequest::builder()
    .broadcaster_id("1234")
    .build();
let body = modify_channel_information::ModifyChannelInformationBody::builder()
    .title("Hello World!".to_string())
    .build();
let response: modify_channel_information::ModifyChannelInformation = client.req_patch(request, body, &token).await?.data;

You can also get the http::Request with request.create_request(body, &token, &client_id) and parse the http::Response with ModifyChannelInformationRequest::parse_response(None, &request.get_uri(), response)

Structs

Enums