twitch-rs / twitch_api

Rust library for talking with the Twitch API aka. "Helix", TMI and more! Use Twitch endpoints fearlessly!
Apache License 2.0
151 stars 33 forks source link

Getting a backtrace with a specific broadcaster id 418158680 #318

Closed Glog78 closed 1 year ago

Glog78 commented 1 year ago

The following code stops working for a specific user see https://termbin.com/l59kt

        for member in st_buffer {
            let request = twitch_api::helix::teams::get_channel_teams::GetChannelTeamsRequest
                                    ::broadcaster_id(member.user_id.to_string());
            let response = twitch
                .helix.req_get(request, &token)
                .await
                .expect("expect teams of that specific member");

            let teams: Vec<twitch_api::helix::teams::TeamInformation> = response.data.into_iter().map(|p| p.team).collect();

            let teaminfos: (Vec<_>,Vec<_>) = teams
                    .into_iter()
                    .map(|p| (p.team_display_name.to_string(),p.team_name.to_string()))
                    .unzip();

            println!("   --- [ member {:?} online | teaminfo -> {:?} ] ---",member
                .user_name.to_string()
                ,teaminfos.0);

thanks for the fast fix earlier.

Emilgardis commented 1 year ago

Can you post the error message you're seeing? nvm, it's in the link

Emilgardis commented 1 year ago

To fix this issue, either wait for a new release or specify

[dependencies]
twitch_api = { git = "https://github.com/twitch-rs/twitch_api", rev = "1702f4372021f83e5aee7b53deb4324d4cb9b4d8" }

# workaround for https://github.com/twitch-rs/twitch_api/issues/256
[patch.crates-io.twitch_types]
git = "https://github.com/twitch-rs/twitch_api"
rev = "1702f4372021f83e5aee7b53deb4324d4cb9b4d8"