Regenerate SDK: Moderation API + grouped request parameters#5
Merged
Conversation
…astId params) Adds the optional tenantId query param to the SSO-gated Moderation API endpoints and the optional broadcastId query param to the mutating moderation endpoints. Backward-compatible. Mirrors fastcomments-sdk-js v5.0.2.
API methods now take a single Api<Op>Request pydantic object (useSingleRequestParameter). update.sh now uses the FastComments openapi-generator fork, since the stock generator ignores the option for python. Updated SSO tests and README examples.
API reference examples now construct the single Api<Op>Request object, matching the grouped method signatures.
API methods now take required params + body positionally, with optional params in a single Api<Op>Options object (was: one Api<Op>Request for everything). Updated SSO tests + README.
…one value) Operations with exactly one optional now take it directly (e.g. deleteModerator(..., send_email)); the Api<Op>Options object is only used for 2+ optionals.
…p Api prefix from options types Options types renamed Api<Op>Options -> <Op>Options (e.g. ApiGetApiCommentsOptions -> GetApiCommentsOptions). Hand-written READMEs + SSO tests updated to match.
…id options= synopsis) Doc-only. Method synopses now show a valid 'options' arg instead of 'options='.
Bump version to 3.0.0 and regenerate from the new generator fork release.
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.
Regenerates the Python client from the latest OpenAPI spec. Two notable changes since the last release:
Grouped request parameters: all API methods now take required parameters and the request body positionally, with an operation's optional parameters that are grouped into a single typed options object, e.g.
CreateCommentPublicOptions(a lone optional is a direct keyword argument, and operations with none take no options argument).Moderation API: adds the moderator-dashboard endpoints (listing, searching, counting and exporting comments and logs; moderation actions such as remove/restore/flag and review/spam/approval status; vote adjustments; bans; badges and trust), authenticated with an SSO moderator token.
Model rename:
PostRemoveCommentResponseis renamed toPostRemoveCommentApiResponse.