Skip to main content

author_meta

Function author_meta 

Source
pub fn author_meta(agent: &str) -> Value
Expand description

Additive author metadata for the JSON API (JSS authorMeta).

§Examples

use solid_pod_rs_forge::api_issues::author_meta;
let hex = "3bf0c63fcb93463407af97a5e5ee64fa883d107ef9e558472c4eb9aaaefa459d";
let m = author_meta(&format!("did:nostr:{hex}"));
assert_eq!(m["kind"], "nostr");
assert_eq!(m["displayName"], "did:nostr:3bf0c63f…");
assert_eq!(m["npub"], "npub180cvv07tjdrrgpa0j7j7tmnyl2yr6yr7l8j4s3evf6u64th6gkwsyjh6w6");
let w = author_meta("https://pod.example/casey/profile/card#me");
assert_eq!(w["kind"], "webid");
assert_eq!(w["displayName"], "casey");