-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
blockedCannot be completed yetCannot be completed yetenhancementNew feature or requestNew feature or request
Description
Expose Filtering Endpoint for Bluesky Feed Search Posts
Description
Create a new endpoint in safe-skies-api that proxies requests to Bluesky’s protected app.bsky.feed.searchPosts endpoint. This endpoint will leverage the existing AtprotoAgent
to make authenticated requests—authentication is already handled by the authenticateJWT
middleware.
Acceptance Criteria
- Endpoint Exposure:
- A new route is created, e.g.,
POST /api/feed/searchPosts
, in safe-skies-api.
- A new route is created, e.g.,
- Use of AtprotoAgent:
- The endpoint uses the existing
AtprotoAgent
to forward requests to Bluesky’s feed search endpoint.
- The endpoint uses the existing
- Parameter Support:
- The endpoint accepts all filtering parameters supported by Bluesky’s API (e.g., keywords, author filters, sort, pagination, etc.).
- Response Handling:
- The response from Bluesky is returned to the client with any required transformations.
- Error Handling:
- Errors from Bluesky (or failures in parameter validation) are caught and returned in an informative manner.
- Security:
- The route is protected by the
authenticateJWT
middleware; no additional authentication flow is needed.
- The route is protected by the
Tasks
- Create a new route (e.g.,
POST /api/feed/searchPosts
) in safe-skies-api. - Validate and accept all filtering parameters per Bluesky’s API documentation.
- Use the AtprotoAgent to forward the request to Bluesky’s app.bsky.feed.searchPosts endpoint.
- Transform and return the response to the client.
- Implement robust error handling to catch and forward any errors from Bluesky.
- Write unit and integration tests for parameter mapping, response transformation, and error scenarios.
Metadata
Metadata
Assignees
Labels
blockedCannot be completed yetCannot be completed yetenhancementNew feature or requestNew feature or request