From 3852b857d5c898850cac6824b4c38e417c731891 Mon Sep 17 00:00:00 2001 From: Kim Hallberg Date: Tue, 25 Apr 2023 00:27:15 +0200 Subject: [PATCH 1/2] Add `getSuggestions` shortcut --- packages/api/README.md | 1 + packages/api/src/bsky-agent.ts | 3 +++ 2 files changed, 4 insertions(+) diff --git a/packages/api/README.md b/packages/api/README.md index 60d2afffeda..742df416fe4 100644 --- a/packages/api/README.md +++ b/packages/api/README.md @@ -77,6 +77,7 @@ await agent.deleteFollow(followUri) await agent.getProfile(params, opts) await agent.upsertProfile(updateFn) await agent.getProfiles(params, opts) +await agent.getSuggestions(params, opts) await agent.searchActors(params, opts) await agent.searchActorsTypeahead(params, opts) await agent.mute(did) diff --git a/packages/api/src/bsky-agent.ts b/packages/api/src/bsky-agent.ts index 31333adbf99..ef1cdd5b40f 100644 --- a/packages/api/src/bsky-agent.ts +++ b/packages/api/src/bsky-agent.ts @@ -41,6 +41,9 @@ export class BskyAgent extends AtpAgent { getProfiles: typeof this.api.app.bsky.actor.getProfiles = (params, opts) => this.api.app.bsky.actor.getProfiles(params, opts) + getSuggestions: typeof this.api.app.bsky.actor.getSuggestions = (params, opts) => + this.api.app.bsky.actor.getSuggestions(params, opts) + searchActors: typeof this.api.app.bsky.actor.searchActors = (params, opts) => this.api.app.bsky.actor.searchActors(params, opts) From 8256df303fb6a886bb553e1c62c4652036e77bc5 Mon Sep 17 00:00:00 2001 From: Kim Hallberg Date: Tue, 25 Apr 2023 00:29:13 +0200 Subject: [PATCH 2/2] Add `getPosts` shortcut --- packages/api/README.md | 1 + packages/api/src/bsky-agent.ts | 3 +++ 2 files changed, 4 insertions(+) diff --git a/packages/api/README.md b/packages/api/README.md index 742df416fe4..cc49e1114c2 100644 --- a/packages/api/README.md +++ b/packages/api/README.md @@ -57,6 +57,7 @@ await agent.getTimeline(params, opts) await agent.getAuthorFeed(params, opts) await agent.getPostThread(params, opts) await agent.getPost(params) +await agent.getPosts(params, opts) await agent.getLikes(params, opts) await agent.getRepostedBy(params, opts) await agent.post(record) diff --git a/packages/api/src/bsky-agent.ts b/packages/api/src/bsky-agent.ts index ef1cdd5b40f..a351e5ebba5 100644 --- a/packages/api/src/bsky-agent.ts +++ b/packages/api/src/bsky-agent.ts @@ -23,6 +23,9 @@ export class BskyAgent extends AtpAgent { getPost: typeof this.api.app.bsky.feed.post.get = (params) => this.api.app.bsky.feed.post.get(params) + getPosts: typeof this.api.app.bsky.feed.getPosts = (params, opts) => + this.api.app.bsky.feed.getPosts(params, opts) + getLikes: typeof this.api.app.bsky.feed.getLikes = (params, opts) => this.api.app.bsky.feed.getLikes(params, opts)