this repo has no description
atproto bluesky typescript express
at main 20 lines 630 B view raw
1import { AtpAgent } from "@atproto/api"; 2 3// TODO: connect to feeds directly rather than using an existing appview 4 5export async function getFeed(agent: AtpAgent, did: string, rkey: string, cursor?: string) { 6 const response = await agent.app.bsky.feed.getFeed({ 7 feed: "at://" + did + "/app.bsky.feed.generator/" + rkey, 8 cursor: cursor, 9 }); 10 return response.data; 11} 12 13export async function getFeedData(agent: AtpAgent, did: string, rkey: string) { 14 const response = await agent.com.atproto.repo.getRecord({ 15 repo: did, 16 collection: "app.bsky.feed.generator", 17 rkey: rkey 18 }); 19 return response.data.value; 20}