Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BSS-90] Implement SearchPosts #34

Merged
merged 2 commits into from
Dec 6, 2024
Merged

[BSS-90] Implement SearchPosts #34

merged 2 commits into from
Dec 6, 2024

Conversation

shahmal1yev
Copy link
Owner

@shahmal1yev shahmal1yev commented Dec 6, 2024

Description

This PR introduces the implementation of the SearchPosts class as part of the Bluesky SDK. It enables querying and retrieving posts via the app.bsky.feed.searchPosts API endpoint. The implementation includes the following key components:

Features

  • SortEnum: Enumeration for sorting options (latest, top).

  • SearchPosts Class:

    • Query parameter support:
      • q (query string)
      • sort (sorting criteria)
      • since, until (datetime filters in ISO 8601 format)
      • mentions, author (string-based filters)
      • lang, domain, url (language, domain, and URL filtering)
      • tag (array of tags with validation for max length of 640 characters each)
      • limit (pagination limit, 1–100)
      • cursor (for pagination).
    • Input validation for parameters (e.g., valid language codes, URLs, and tag formats).

To-Do

  • Add new Enum for handling sort parameter of the request
  • Implement request class
  • Implement response class
  • Implement Response Objects to handle API responses effectively.
  • Add Unit Tests to validate class functionality and edge cases.
  • Add Feature Tests for integration testing with live API endpoints.
  • Resolve the conflict with the url() method name to prevent clashes with RequestBuilder.
  • Deprecate some existing methods: get(), exist(), cast(), revert()

Closes

This reverts commit 92e3c4e, reversing
changes made to e54462d.
Copy link

@shahmal1yev shahmal1yev self-assigned this Dec 6, 2024
@shahmal1yev shahmal1yev added deprecations Contains deprecations enhancement New feature or request labels Dec 6, 2024
@shahmal1yev shahmal1yev merged commit 7f0b9d6 into main Dec 6, 2024
5 checks passed
@shahmal1yev shahmal1yev deleted the bss-90 branch December 6, 2024 22:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deprecations Contains deprecations enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature]: Search Posts
1 participant