Compare commits

...

2 Commits

Author SHA1 Message Date
22a443d5fd
get out of here 2022-09-08 11:29:05 +01:00
6b9e407f8f
move one directory up 2022-09-08 11:28:36 +01:00
7 changed files with 19 additions and 5 deletions

12
Cargo.toml Normal file
View File

@ -0,0 +1,12 @@
[package]
name = "gtk-hello"
version = "0.1.0"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
gtk = { version = "0.4.8", package = "gtk4" }
adw = { version = "0.1.1", package = "libadwaita" }
invidious = "0.3.2"
gtk-ui-builder = "0.2.0"

BIN
nikolor.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 110 KiB

View File

@ -1,10 +1,10 @@
use invidious::reqwest::blocking::Client;
use std::error::Error;
fn main() -> Result<(), Box<dyn Error>> {
pub fn inv() -> Result<(), Box<dyn Error>> {
let client = Client::new(String::from("https://vid.puffyan.us"));
let search_results = client.search(Some("q=rust programming"))?.items;
let video = client.video("5C_HPTJg5ek", None)?;
print!("{:?}", video);
Ok(())
}

View File

@ -6,7 +6,7 @@ use std::fs::File;
use std::path::Path;
use gtk::prelude::*;
use gtk::{self, ApplicationWindow, Button, prelude::*};
use invidious::reqwest::blocking::functions::video;
use crate::inv::inv;
mod inv;
@ -19,8 +19,10 @@ fn main() {
// Connect to "activate" signal of `app`
app.connect_activate(build_ui);
print!("{}: {}", video.title, video.author);
let output = inv::inv();
print!("{:?}", output);
inv();
// Run the application
app.run();
}

View File