TransWikia.com

Getting the outbox of a Mastodon profile using the activitystreams crate

Stack Overflow Asked by Achim on December 18, 2020

I have a Mastodon URL that looks like https://mastodon_domain/web/accounts/123. I was able to retrieve JSON from that URL, parsed it in Python using plain JSON functionality and did something useful with it. Now I want to do the same using Rust and the activitystreams crate:

use activitystreams::actor::{Person};
let raw_text = ... get JSON from server ...
if let Ok(person) = serde_json::from_str::<Person>(&raw_text) {
    ... how to get outbox from person ...
};

The parsing succeedes, but the Person object does not have an output property. According to the docs it seems to be hidden in the ApActorProperties extension. But I have no idea how to access it. Looks like my Rust is not yet good enough, so I would appreciate a lot, if somebody could tell me how to get outbox from a successfully parsed Person instance.

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP