mod response;
mod types;
pub use response::GoalsResponse;
pub use types::{Goal, GoalType};
use crate::{
request::TwitchAPIRequest,
types::{
constants::{BROADCASTER_ID, GOALS},
BroadcasterId,
},
TwitchAPI,
};
pub trait GoalsAPI {
fn get_creator_goals(&self, broadcaster_id: &BroadcasterId) -> TwitchAPIRequest<GoalsResponse>;
}
impl GoalsAPI for TwitchAPI {
simple_endpoint!(
fn get_creator_goals(
broadcaster_id: &BroadcasterId [key = BROADCASTER_ID]
) -> GoalsResponse;
endpoint: GetCreatorGoals,
method: GET,
path: [GOALS],
);
}