use super::*;
#[derive(Debug, Clone)]
pub struct SummaryLargeImage {
strings: Vec<String>,
}
impl SummaryLargeImage {
pub fn builder() -> Self {
Self {
strings: vec![create_card("summary_large_image")],
}
}
#[inline]
pub fn site(mut self, site: &str) -> Self {
self.strings.push(create_site(site));
self
}
#[inline]
pub fn site_id(mut self, content: &str) -> Self {
self.strings.push(create_site_id(content));
self
}
#[inline]
pub fn creator_id(mut self, content: &str) -> Self {
self.strings.push(create_creator_id(content));
self
}
#[inline]
pub fn creator(mut self, content: &str) -> Self {
self.strings.push(create_creator(content));
self
}
#[inline]
pub fn desc(mut self, content: &str) -> Self {
self.strings.push(create_desc(content));
self
}
#[inline]
pub fn title(mut self, content: &str) -> Self {
self.strings.push(create_title(content));
self
}
#[inline]
pub fn image(mut self, content: &str) -> Self {
self.strings.push(create_image(content));
self
}
#[inline]
pub fn image_alt(mut self, content: &str) -> Self {
self.strings.push(create_image_alt(content));
self
}
}
impl TwitterCard for SummaryLargeImage {
#[inline]
fn build(self) -> String {
self.strings.join("\n")
}
}