Module twitch_api2::helix::channels::modify_channel_information[][src]

This is supported on crate feature helix only.

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?;

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

Structs

ModifyChannelInformationBody

Body Parameters for Modify Channel Information

ModifyChannelInformationRequest

Query Parameters for Modify Channel Information

Enums

ModifyChannelInformation

Return Values for Modify Channel Information