use super::*;
#[derive(Debug, Clone)]
pub struct App {
strings: Vec<String>,
}
impl App {
pub fn builder() -> Self {
Self {
strings: vec![create_card("summary")],
}
}
#[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 desc(mut self, content: &str) -> Self {
self.strings.push(create_desc(content));
self
}
#[inline]
pub fn app_id_iphone(mut self, content: &str) -> Self {
self.strings.push(create_app_id_iphone(content));
self
}
#[inline]
pub fn app_name_iphone(mut self, content: &str) -> Self {
self.strings.push(create_app_name_iphone(content));
self
}
#[inline]
pub fn app_url_iphone(mut self, content: &str) -> Self {
self.strings.push(create_app_url_iphone(content));
self
}
#[inline]
pub fn app_name_ipad(mut self, content: &str) -> Self {
self.strings.push(create_app_name_ipad(content));
self
}
#[inline]
pub fn app_id_ipad(mut self, content: &str) -> Self {
self.strings.push(create_app_id_ipad(content));
self
}
#[inline]
pub fn app_url_ipad(mut self, content: &str) -> Self {
self.strings.push(create_app_url_ipad(content));
self
}
#[inline]
pub fn app_name_googleplay(mut self, content: &str) -> Self {
self.strings.push(create_app_name_googleplay(content));
self
}
#[inline]
pub fn app_id_googleplay(mut self, content: &str) -> Self {
self.strings.push(create_app_id_googleplay(content));
self
}
#[inline]
pub fn app_url_googleplay(mut self, content: &str) -> Self {
self.strings.push(create_app_url_googleplay(content));
self
}
}
impl TwitterCard for App {
#[inline]
fn build(self) -> String {
self.strings.join("\n")
}
}