use super::base::{Request, TelegramMethod};
use crate::{client::Bot, types::StickerSet};
use serde::Serialize;
#[derive(Debug, Clone, Hash, PartialEq, Eq, Serialize)]
pub struct GetStickerSet {
pub name: String,
}
impl GetStickerSet {
#[must_use]
pub fn new(name: impl Into<String>) -> Self {
Self { name: name.into() }
}
#[must_use]
pub fn name(self, val: impl Into<String>) -> Self {
Self { name: val.into() }
}
}
impl TelegramMethod for GetStickerSet {
type Method = Self;
type Return = StickerSet;
fn build_request<Client>(&self, _bot: &Bot<Client>) -> Request<Self::Method> {
Request::new("getStickerSet", self, None)
}
}
impl AsRef<GetStickerSet> for GetStickerSet {
fn as_ref(&self) -> &Self {
self
}
}