move one directory up

This commit is contained in:
Midou36O 2022-09-08 11:28:36 +01:00
parent d7a1c50dc6
commit 6b9e407f8f
Signed by: midou
GPG Key ID: 08063D5407090BC2
8 changed files with 1702 additions and 5 deletions

1683
Cargo.lock generated Normal file

File diff suppressed because it is too large Load Diff

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