|
|
|
@ -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>
|
|
|
|
|