-
Notifications
You must be signed in to change notification settings - Fork 26
feat: added support for optional audience param #423
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
base: main
Are you sure you want to change the base?
Changes from all commits
1be4bf1
d5aa6ac
2755275
dbf62f9
e328e4f
1acb42f
92fbeac
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Two questions:
!is.null(audience)
? I'm guessing that if you want to specify audience and you're on Connect older than the upcoming release, you won't get back what you're asking for.POST
handler on the server ignore unknown body fields? Like, if you were to includeaudience
in the payload for an older Connect.Assuming that the answers are "yes" and "no", respectively, I think we handle this like this here, instead of adding it in the
body
definition above:Note that the tests in
tests/testthat/
don't test against real Connect servers, so they won't give us any assurance about how older versions of Connect respond if you include this parameter. There is an integration test suite that runs against a range of Connect versions but IDK how feasible it would be to set them up with integrations to test this.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we do this version checking elsewhere?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it be sufficient to add a comment to the docstring that 2025.07.0 is required to respect that parameter instead of doing this check? Not sure how often this will come up, but it is just ignored if they are on an older version since the API has no knowledge of it. If they provide a value on an older version that is okay but on older versions there can only ever be one associated integration so the parameter is meaningless
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually there is a helper function for this, so it would be: