Add FeedType and ReportType enums, make partnerTag required - #152
Merged
Merged
Conversation
Vendors the upstream 1.3.0 SDK archive. Changes relevant to the wrapper: - `FeedType` and `ReportType` enums, with `feedType` on `Feed` / `GetFeedRequestContent` and `reportType` on `ReportMetadata` / `GetReportRequestContent`, so callers can tell Creator Central from Creator Connections reports and route `GetFeed` / `GetReport` explicitly. - `partnerTag` is now required in `SearchItemsRequestContent` and the request body is now required in `DefaultApi.search_items`. Both wrapper layers already pass a partner tag and a request body on every call, so the public API is unchanged. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014uE6m9RVQtTiRDLxAyJpE5
…t version `test_search_items_returns_expected_count` asserted an exact page of 10 items; SearchItems treats 10 as a maximum, so a live search returning 9 failed CI in both the sync and async suites. Assert the upper bound instead, the invariant the API actually guarantees. The dev group allowed any ruff `>=0.14.11` while pre-commit pins `v0.14.11`. With ruff 0.16 resolved locally, `make lint` reported 61 errors from newly stabilised rules (CPY001, PLR0917) that CI never sees. Pin the exact version so both run the same linter. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014uE6m9RVQtTiRDLxAyJpE5
The bundled SDK exposes listFeeds, getFeed, listReports and getReport, and 1.3.0 added the FeedType and ReportType enums that disambiguate a name present in more than one program (a report in both Creator Central and Creator Connections, for instance). None of it was reachable from the wrapper, so the new types had no caller. Both layers now expose `list_feeds`, `get_feed`, `list_reports` and `get_report`, with the type as an optional filter. The get operations return the download URL directly, the only field in their responses. listFeeds and listReports take no request payload, so the async `_make_request` and the HTTP client now accept an optional body and send the request without one, matching what the SDK does over urllib3. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014uE6m9RVQtTiRDLxAyJpE5
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds two new enum models (
FeedTypeandReportType) to the SDK and integrates them into existing models. It also makes thepartnerTagparameter required in theSearchItemsRequestContentmodel. The SDK version is bumped from 1.2.0 to 1.3.0.Key Changes
New Enum Models: Added
FeedTypeandReportTypeenum classes with their respective allowed values:FeedType:PRODUCT_FEEDS,DEALS_FEEDSReportType:CREATOR_CENTRAL,CREATOR_CONNECTIONSModel Updates: Integrated the new enums into existing models:
feedTypefield toFeedandGetFeedRequestContentmodelsreportTypefield toReportMetadataandGetReportRequestContentmodelsAPI Changes: Made
search_items_request_contentparameter required (no longerOptional) in thesearch_itemsmethod and its variants inDefaultApiRequired Field: Changed
partnerTagfrom optional to required inSearchItemsRequestContentmodelVersion Bump: Updated SDK version to 1.3.0 in
api_client.py,pyproject.toml, and documentationExports: Added new enum classes to module
__init__.pyfiles for public API exposureImplementation Details
Both enum classes follow the existing SDK pattern with:
from_json()class methodtyping_extensions.Selfhttps://claude.ai/code/session_014uE6m9RVQtTiRDLxAyJpE5