Crates.io | preview-rs |
lib.rs | preview-rs |
version | 0.1.3 |
source | src |
created_at | 2022-09-05 17:40:33.213755 |
updated_at | 2022-09-11 12:30:56.530433 |
description | A (simple) crate for fetching preview metadata from shorturls and links |
homepage | https://github.com/oayomide/preview-rs |
repository | https://github.com/oayomide/preview-rs |
max_upload_size | |
id | 658975 |
size | 48,078 |
A rust crate to fetch preview metadata for a URL.
Things left to be done:
let prev = preview_rs::Preview::new("https://deezer.com");
let preview = prev.fetch_preview();
println!("Here is the preview of this URL: {:?}", &preview);
/** PreviewResponse {
description: Some("You bring the passion, we bring the music! Access more than 73 million tracks, anytime, anywhere!"),
title: Some("Deezer | Listen to music | Online music streaming platform"),
url: Some("http://www.deezer.com"),
name: Some("Deezer"),
image: Some("https://e-cdns-files.dzcdn.net/img/common/opengraph-logo.png")
}
**/