Skip to content

Expose Filtering Endpoint for Bluesky Feed Search Posts #4

@FreedomWriter

Description

@FreedomWriter

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.
  • Use of AtprotoAgent:
    • The endpoint uses the existing AtprotoAgent to forward requests to Bluesky’s feed search endpoint.
  • 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.

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 yetenhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions