move one directory up
This commit is contained in:
parent
d7a1c50dc6
commit
6b9e407f8f
1683
Cargo.lock
generated
Normal file
1683
Cargo.lock
generated
Normal file
File diff suppressed because it is too large
Load Diff
12
Cargo.toml
Normal file
12
Cargo.toml
Normal 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
BIN
nikolor.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 110 KiB |
@ -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(())
|
||||
}
|
||||
}
|
@ -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();
|
||||
}
|
Loading…
Reference in New Issue
Block a user