A better Rust ATProto crate

Please provide the view examples #19

closed
opened by netology.tngl.sh

Hi, I am struggling with view data. Please provide the tutorial example like get_timeline, viewing_threads, viewing_profile etc. How can I interpret the lexicon and write view codes? I am confused how to get started. AI even don't help.

Several examples already show getting the timeline, so i'm not entirely sure what you're asking for here. for pretty much any xrpc request, there's a struct, and you just build the struct and .send() it with the agent.

if you go look at the source code for weaver (prototype version hosted at alpha.weaver.sh) and poke through weaver-common and weaver-app, you can see a full pipeline from lexicon types to display. I'm also considering making more of an end-to-end example (sorta like the statusphere example for the typescript library), i just haven't gotten round to it yet. As an aside, weaver-app also demonstrates browser-based OAuth session management. It has an implementation of ClientAuthStore backed by browser LocalStorage, and also a wrapper type which abstracts over unauthenticated and authenticated clients seamlessly. I might actually pull that Client struct or something similar into jacquard-oauth, as it's probably helpful for people. Already made some additions to jacquard-oauth to fill gaps I found.

sign up or login to add to the discussion
Labels

None yet.

assignee

None yet.

Participants 2
AT URI
at://did:plc:b4sujryiw6ffhpnqyz2kgjnt/sh.tangled.repo.issue/3m5h2dhgdro22