syui 3 months ago
parent b57034ba58
commit 8d6159b9f8
Signed by: syui
GPG Key ID: 67AC97A939D3EA19

@ -23,6 +23,28 @@ impl Data {
// at://
// https://atproto.com/lexicons/app-bsky-feed
#[derive(Serialize, Deserialize)]
pub struct BaseUrl {
pub profile: String,
}
pub fn url(s: &String) -> String {
let s = String::from(s);
let data = Data::new().unwrap();
let data = Data {
host: data.host,
user: data.user,
pass: data.pass,
};
let baseurl = BaseUrl {
profile: "https://".to_string() + &data.host.to_string() + &"/xrpc/app.bsky.actor.getProfile".to_string(),
};
match &*s {
"profile" => baseurl.profile,
_ => s,
}
}
#[derive(Serialize, Deserialize)]
pub struct Notify {
pub notifications: Vec<Notifications>

Loading…
Cancel
Save