Skip to content

Iterating search result container to simplify getting the next page#30

Merged
theorm merged 7 commits intomainfrom
issue-29
May 13, 2025
Merged

Iterating search result container to simplify getting the next page#30
theorm merged 7 commits intomainfrom
issue-29

Conversation

@theorm
Copy link
Member

@theorm theorm commented May 13, 2025

Fixes #29

@theorm theorm requested a review from Copilot May 13, 2025 12:43
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR simplifies iterating over search result containers by adding new pagination and ordering APIs as well as updating related documentation and notebooks. The key changes include adding new models and enums for image search facets, expanding API endpoints for image retrieval and search, and updating notebook examples and docs to reflect the new pagination features.

Reviewed Changes

Copilot reviewed 40 out of 40 changed files in this pull request and generated no comments.

Show a summary per file
File Description
impresso/api_client/models/get_images_facet_order_by.py New enum for image facet ordering with potential naming improvements for descending order members
impresso/api_client/models/get_images_facet_id.py New enum for image facet ID values
impresso/api_client/models/get_images_facet_base_find_response_pagination.py New model for pagination data
impresso/api_client/models/get_images_facet_base_find_response.py New model for facet response data
impresso/api_client/models/freeform.py New freeform model for flexible schema data
impresso/api_client/models/find_media_sources_order_by.py Removed verbose docblock comments for cleaner code
impresso/api_client/models/find_images_order_by.py New enum for image ordering with similar naming concerns as get_images facet ordering
impresso/api_client/models/find_images_base_find_response_pagination.py New model for image search pagination
impresso/api_client/models/find_images_base_find_response.py New model for image search responses
impresso/api_client/models/find_entities_order_by.py Removed long documentation comments
impresso/api_client/models/entity_details_type.py Extended enum with new entity types
impresso/api_client/models/init.py Updated module exports to include new models and enums
impresso/api_client/api/search_facets/get_images_facet.py New API endpoint for retrieving image facets
impresso/api_client/api/images/get_image.py New API endpoint for retrieving individual images
impresso/api_client/api/images/find_images.py New API endpoint for image search with pagination support
examples/notebooks/media_sources.ipynb & collections.ipynb Updated examples reflecting changes in endpoint URLs, execution counts and pagination output
docs/resources.md Extended documentation to explain pagination behavior and usage
Comments suppressed due to low confidence (2)

impresso/api_client/models/get_images_facet_order_by.py:8

  • [nitpick] Consider renaming 'VALUE_0' to 'COUNT_DESC' (and similarly 'VALUE_2' to 'VALUE_DESC') to clearly indicate these members represent descending order, which improves code clarity.
    VALUE_0 = "-count"

impresso/api_client/models/find_images_order_by.py:7

  • [nitpick] Consider renaming 'VALUE_1' to 'DATE_DESC' to clearly indicate that this enum member corresponds to descending date order, thereby enhancing readability.
    VALUE_1 = "-date"

@theorm theorm merged commit 9316e6e into main May 13, 2025
2 checks passed
@theorm theorm deleted the issue-29 branch May 13, 2025 12:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Iterating search result container to simplify getting the next page.

1 participant