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

client: set sensible defaults for Browse #508

Merged
merged 1 commit into from
Nov 23, 2021
Merged

Conversation

magiconair
Copy link
Member

@magiconair magiconair commented Nov 22, 2021

This patch sets sensible defaults for the Browse method of the client.

See #506

@magiconair magiconair added this to the v0.2.3 milestone Nov 22, 2021
@magiconair magiconair requested a review from kung-foo November 22, 2021 12:35
@magiconair magiconair added the enhancement New feature or request label Nov 22, 2021
@kung-foo
Copy link
Member

These "sane defaults" are fine, however does this mean we should really do this for all *Requests.

@magiconair
Copy link
Member Author

Well, we did this for Read and we have client.Browse and node.Browse which is confusing. I think other libraries solve this by providing defaults in arguments or helper methods. I'm OK with solving this in another way if you have a suggestion.

This patch sets sensible defaults for the 'Browse' method of the client.

See #506
@magiconair magiconair force-pushed the client-browse-defaults branch from de5feaf to ad5a67d Compare November 23, 2021 07:37
@kung-foo kung-foo merged commit 1bd7bc1 into main Nov 23, 2021
@kung-foo kung-foo deleted the client-browse-defaults branch November 23, 2021 08:07
@kung-foo
Copy link
Member

I guess the issue is that "the struct is the api". Since it is unlikely that we want to make everything private (i.e. only make a BrowseRequest instance via builders/helpers) then we need strong, public validators and/or implicit defaults.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants