Skip to content
Clone
b453d5d
32 lines 678 B Rust
use crate::parse::{EmbedRule, Platform};
use crate::Category;
pub struct Figma;
impl Platform for Figma {
fn id(&self) -> &'static str {
"figma"
}
fn name(&self) -> &'static str {
"Figma"
}
fn category(&self) -> Category {
Category::Dev
}
fn domains(&self) -> &'static [&'static str] {
&["figma.com"]
}
fn embed_rule(&self) -> Option<EmbedRule> {
Some(EmbedRule::frame("https://www.figma.com/embed?embed_host=gitdata&url={url_enc}"))
}
fn oembed(&self) -> Option<&'static str> {
Some("https://www.figma.com/api/oembed?url={url_enc}")
}
}
pub static PLATFORM: Figma = Figma;