Skip to content

Instantly share code, notes, and snippets.

@ShinoharaTa
Last active September 17, 2024 16:11
Show Gist options
  • Save ShinoharaTa/b59bd271c9ec3933d82a44d5644a4e9e to your computer and use it in GitHub Desktop.
Save ShinoharaTa/b59bd271c9ec3933d82a44d5644a4e9e to your computer and use it in GitHub Desktop.
Get the bluesky first posts.
import bsky from "@atproto/api";
const { BskyAgent } = bsky;
const agent = new BskyAgent({ service: "https://bsky.social" });
const { data } = await agent.api.com.atproto.repo.listRecords({
reverse: true,
repo: "shino3.bsky.social",
collection: "app.bsky.feed.post",
});
console.log(data.records.slice(-1)[0]);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment