Want to contribute? Fork me on Codeberg.org!
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

28 lines
618 B

use serde::{Deserialize, Serialize};
use reqwest::blocking::Client;
fn main() -> Result<(), Box<dyn std::error::Error>> {
let client = Client::new();
let res = client
.get("https://username:password@files.nickiel.net/index.php/apps/notes/api/v1/notes")
.header("Accept", "application/json")
.send()?
.json::<Vec<Note>>()?;
println!("{:#?}", res);
Ok(())
}
#[derive(Serialize, Deserialize, Debug)]
struct Note {
id: usize,
etag: String,
readonly: bool,
modified: u64,
title: String,
category: String,
content: String,
favorite: bool
1 year ago
}