chilp
Values
pub fn bluesky(
did did: String,
post_id postid: String,
) -> anchors.Bluesky
An anchor to the Bluesky post you want to fetch comments from.
| Parameter | Description |
|---|---|
did | Your DID, for @strawmelonjuice.com, this looks like "did:plc:jgtfsmv25thfs4zmydtbccnn".Not sure how to find your DID? https://bsky-did.neocities.org is one of the many places where you can easily find it. |
post_id | A post id to bind to, you’ll find this in a post url https://bsky.app/profile/<your-username-or-did>/post/[postid] |
You can also construct this directly if you import chilp/widget/anchors.
pub fn mastodon(
instance instance: String,
post_id postid: String,
) -> anchors.Mastodon
An anchor to the Fediverse post you want to fetch comments from.
| Parameter | Description |
|---|---|
instance | The instance name, e.g. "mastodon.social", this is where your post is stored, and where chilp will attempt to fetch it from. |
post_id | A post id to bind to, you’ll find this in a post url https://instance.social/@<username>/[postid]. |
On Sharkey or Misskey this is a note id, found https://instance.social/notes/[note-id] |
You can also construct this directly if you import chilp/widget/anchors.
pub fn widget(
bluesky bsky: option.Option(anchors.Bluesky),
mastodon masto: option.Option(anchors.Mastodon),
) -> element.Element(a)
Widget component!
Before adding this component make sure to call widget.register() to register it!
Little example:
chilp.widget(
// We connect to Bluesky...
bluesky: option.Some(chilp.bluesky("did:plc:my-did","myPostId")),
// ...But not to Mastodon? Sure! Make it a None!
mastodon: option.None
)
You can also construct this directly if you import chilp/widget.