From 5fece11a1781f098a31c8138843f4eacf0319b11 Mon Sep 17 00:00:00 2001 From: Trivernis Date: Sun, 18 Apr 2021 10:00:37 +0000 Subject: [PATCH] Create README.md --- README.md | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..4502651 --- /dev/null +++ b/README.md @@ -0,0 +1,31 @@ +# youtube-metadata-rs + +Fetch simple YouTube Video metadata with ease. + + +## Example + +```rust +let information = get_video_information("https://www.youtube.com/watch?v=dQw4w9WgXcQ") + .await + .unwrap(); +assert_eq!(information.id, "dQw4w9WgXcQ".to_string()); +assert_eq!( + information.url, + "https://www.youtube.com/watch?v=dQw4w9WgXcQ".to_string() +); +assert_eq!(information.uploader, "RickAstleyVEVO".to_string()); +assert_eq!( + information.title, + "Rick Astley - Never Gonna Give You Up (Video)".to_string() +); +assert_eq!( + information.thumbnail, + Some("https://i.ytimg.com/vi/dQw4w9WgXcQ/maxresdefault.jpg".to_string()) +); +``` + + +## License + +MIT