Skip to content

Conversation

@kevinlacaille
Copy link
Contributor

@kevinlacaille kevinlacaille commented Mar 28, 2023

Related Issue(s):

Closes #599

Proposed Changes:

For inclusion in changelog (if applicable):

  1. Added validation for item_type in the Data client, which allows item types to be case insensitive. Functions affected:
  • client: search(); CLI: search
  • client: create_search(); CLI: search-create
  • client: update_search(); CLI: search-update
  • client: get_stats(); CLI: stats

Not intended for changelog:

Diff of User Interface

Old behavior:

> planet data search psscene                                     
Error: {"general": [], "field": {"item_types": [{"message": "Not all item types requested exist or are accessible"}]}}

New behavior:

> planet data search psscene                                     
{"_links": {"_self": "https://api.planet.com/data/v1/item-types/PSScene/items/20230328_161317_49_241a", "assets": "https://api.planet.com/data/v1/item-types/PSScene/items/20230328_161317_49_241a/assets/", ...}

PR Checklist:

  • This PR is as small and focused as possible
  • [] If this PR includes proposed changes for inclusion in the changelog, the title of this PR summarizes those changes and is ready for inclusion in the Changelog.
  • [] I have updated docstrings for function changes and docs in the 'docs' folder for user interface / behavior changes
  • This PR does not break any examples or I have updated them

(Optional) @mentions for Notifications:

@kevinlacaille kevinlacaille marked this pull request as ready for review March 28, 2023 21:12
Copy link
Member

@cholmes cholmes left a comment

Choose a reason for hiding this comment

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

Looks great, thanks!

Copy link
Contributor

@jreiberkyle jreiberkyle left a comment

Choose a reason for hiding this comment

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

works great! Could you update the PR desc to include the CLI commands that are affected by this as well?

@kevinlacaille kevinlacaille changed the title Allow item types specified to be case insensitive Allow item types specified to be case insensitive in Data API and CLI Mar 30, 2023
@kevinlacaille kevinlacaille merged commit 1daabcc into main Mar 30, 2023
@kevinlacaille kevinlacaille deleted the item-type-case-insensitive-599 branch March 30, 2023 16:42
@jreiberkyle jreiberkyle mentioned this pull request Apr 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow item types specified to be case insensitive

4 participants