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

Add support for --fields parameter in search command #84

Merged
merged 8 commits into from
Dec 3, 2023

Conversation

const-cloudinary
Copy link
Contributor

Brief Summary of Changes

What does this PR address?

  • GitHub issue (Add reference - #XX)
  • Refactoring
  • New feature
  • Bug fix
  • Adds more tests

Are tests included?

  • Yes
  • No

Reviewer, please note:

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I ran the full test suite before pushing the changes and all the tests pass.

cloudinary_cli/core/search.py Outdated Show resolved Hide resolved
@@ -17,7 +17,8 @@
e.g. cld search cat AND tags:kitten -s public_id desc -f context -f tags -n 10
""")
@argument("query", nargs=-1)
@option("-f", "--with_field", multiple=True, help="Specify which asset attribute to include in the result.")
@option("-f", "--with_field", multiple=True, help="Specify which asset attribute to add in the result.")
Copy link
Collaborator

Choose a reason for hiding this comment

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

What does multiple=True mean? Is it that you can include this option more than once in the same command?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes, you can --with_field tags --with_field context, I also added support for combining them together, like --with_field tags,context

Copy link
Collaborator

Choose a reason for hiding this comment

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

Doesn't that end up being the same as fields then?

cloudinary_cli/core/search.py Outdated Show resolved Hide resolved
cloudinary_cli/core/search.py Outdated Show resolved Hide resolved
cloudinary_cli/core/search.py Outdated Show resolved Hide resolved
cloudinary_cli/core/search.py Outdated Show resolved Hide resolved
@const-cloudinary const-cloudinary merged commit dce2801 into master Dec 3, 2023
12 checks passed
@const-cloudinary const-cloudinary deleted the feature/search-fields branch December 3, 2023 14:44
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.

2 participants