diff --git a/src/providers.rs b/src/providers.rs index b9d9af3c..494dcb6f 100644 --- a/src/providers.rs +++ b/src/providers.rs @@ -176,6 +176,8 @@ pub enum Provider { /// A token string which you may obtain on the provider web service page. token: String, }, + /// provider + BitUrl, /// provider Bmeo, /// provider @@ -246,8 +248,6 @@ pub enum Provider { UrlShortenerIo, /// provider VGd, - /// provider - BitUrl } impl Provider { @@ -257,6 +257,7 @@ impl Provider { Provider::Abv8 => "abv8.me", Provider::BamBz => "bam.bz", Provider::BitLy { .. } => "bitly.com", + Provider::BitUrl => "biturl.top", Provider::Bmeo => "bmeo.org", Provider::FifoCc => "fifo.cc", Provider::GooGl { .. } => "goo.gl", @@ -278,7 +279,6 @@ impl Provider { Provider::TnyIm => "tny.im", Provider::UrlShortenerIo => "url-shortener.io", Provider::VGd => "v.gd", - Provider::BitUrl => "biturl.top", } } } @@ -482,6 +482,7 @@ pub fn parse(res: &str, provider: &Provider) -> Result { Provider::Abv8 => abv8_parse(res), Provider::BamBz => bambz_parse(res), Provider::BitLy { .. } => bitly_parse(res), + Provider::BitUrl => biturl_parse(res), Provider::Bmeo => bmeo_parse(res), Provider::FifoCc => fifocc_parse(res), Provider::GooGl { .. } => googl_parse(res), @@ -500,7 +501,6 @@ pub fn parse(res: &str, provider: &Provider) -> Result { Provider::TnyIm => tnyim_parse(res), Provider::UrlShortenerIo => urlshortenerio_parse(res), Provider::VGd => vgd_parse(res), - Provider::BitUrl => biturl_parse(res), } .ok_or(ProviderError::Deserialize) } @@ -527,6 +527,7 @@ pub fn request(url: &str, provider: &Provider) -> req::Request { Provider::Abv8 => abv8_req(url), Provider::BamBz => bambz_req(url), Provider::BitLy { ref token } => bitly_req(url, token), + Provider::BitUrl => biturl_req(url), Provider::Bmeo => bmeo_req(url), Provider::FifoCc => fifocc_req(url), Provider::GooGl { ref api_key } => googl_req(url, api_key), @@ -548,6 +549,5 @@ pub fn request(url: &str, provider: &Provider) -> req::Request { Provider::TnyIm => tnyim_req(url), Provider::UrlShortenerIo => urlshortenerio_req(url), Provider::VGd => vgd_req(url), - Provider::BitUrl => biturl_req(url), } }