bluesky-social / atproto

Social networking technology created by Bluesky
Other
6.13k stars 432 forks source link

app.bsky.feed.searchPosts not supported? #1747

Closed eddiefletchernz closed 11 months ago

eddiefletchernz commented 11 months ago

Describe the bug

I am trying to search for posts matching a query using the latest version of @atproto/api in nodejs. I am receiving a 404 XRPCNotSupported error when calling the searchPosts function from the library.

To Reproduce

Steps to reproduce the behavior:

const json = await agent.api.app.bsky.feed.searchPosts({ q: "test" });

Expected behavior

I would expect a 200 OK response with a list of posts as described in https://github.com/bluesky-social/atproto/blob/main/lexicons/app/bsky/feed/searchPosts.json

Details

Additional context

My agent's service URL is https://bsky.social

Error Reponse

XRPCError: XRPC Not Supported at ServiceClient.call (F:\projects\ReactJS\bluesky-feed-generator\node_modules\@atproto\xrpc\src\client.ts:133:15) at processTicksAndRejections (node:internal/process/task_queues:95:5) { status: 404, error: 'XRPCNotSupported', success: false, headers: undefined }

devinivy commented 11 months ago

That's right, this endpoint is not supported yet by bsky.social and it's not used by the application. The @atproto/api package contains interfaces for all app.bsky and com.atproto lexicons that exist, but in general there's not guarantee that every service supports every lexicon—in this case it's not implemented because the lexicon for it was proposed separately from the implementation. That said, I expect it to be implemented before long!

eddiefletchernz commented 11 months ago

Ah ok that's good to know, I thought maybe I was just using it incorrectly. Thanks for the clarification, hopefully they implement it soon 😁.