-
Notifications
You must be signed in to change notification settings - Fork 36
Make it possible to construct a Response #369
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Emilgardis
commented
May 7, 2023
- add Response::new and Response::with_data
- Use the new methods for Response
data: CreateEventSubSubscription { | ||
Ok(helix::Response::with_data( | ||
CreateEventSubSubscription { | ||
// helix::Response total is generally the total number of results, not what the total for this endpoint means. Thus, we set it to None.)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should fix this comment
/// # Examples | ||
/// | ||
/// ```rust | ||
/// use twitch_api::helix::{self, Request, RequestPut}; | ||
/// | ||
/// #[derive(serde::Serialize, Debug, PartialEq)] | ||
/// pub struct MyTwitchRequest {} | ||
/// | ||
/// #[derive(serde::Deserialize, Debug, PartialEq)] | ||
/// pub enum MyTwitchResponse { | ||
/// Success, | ||
/// } | ||
/// | ||
/// impl Request for MyTwitchRequest { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this example could probably also be added to Request
going to try this to see that the merge queue is working, this pr should fail since #368 is merged |
hmm, skipped = success.... |
solved with #372 i hope |