import { AtpAgent } from "@atproto/api"; // TODO: connect to feeds directly rather than using an existing appview export async function getFeed(agent: AtpAgent, did: string, rkey: string, cursor?: string) { const response = await agent.app.bsky.feed.getFeed({ feed: "at://" + did + "/app.bsky.feed.generator/" + rkey, cursor: cursor, }); return response.data; } export async function getFeedData(agent: AtpAgent, did: string, rkey: string) { const response = await agent.com.atproto.repo.getRecord({ repo: did, collection: "app.bsky.feed.generator", rkey: rkey }); return response.data.value; }