Compare commits
No commits in common. "22a443d5fdbe9d89b49c0fa31f742bc60f7ad51d" and "d7a1c50dc6d3c38e814558b128b4efb42d0de976" have entirely different histories.
22a443d5fd
...
d7a1c50dc6
12
Cargo.toml
12
Cargo.toml
@ -1,12 +0,0 @@
|
||||
[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"
|
@ -1,10 +1,10 @@
|
||||
use invidious::reqwest::blocking::Client;
|
||||
use std::error::Error;
|
||||
|
||||
pub fn inv() -> Result<(), Box<dyn Error>> {
|
||||
fn main() -> 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 crate::inv::inv;
|
||||
use invidious::reqwest::blocking::functions::video;
|
||||
mod inv;
|
||||
|
||||
|
||||
@ -19,10 +19,8 @@ fn main() {
|
||||
// Connect to "activate" signal of `app`
|
||||
app.connect_activate(build_ui);
|
||||
|
||||
let output = inv::inv();
|
||||
print!("{}: {}", video.title, video.author);
|
||||
|
||||
print!("{:?}", output);
|
||||
inv();
|
||||
// Run the application
|
||||
app.run();
|
||||
}
|
BIN
nikolor.png
BIN
nikolor.png
Binary file not shown.
Before Width: | Height: | Size: 110 KiB |
Loading…
Reference in New Issue
Block a user