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

ContentItem.tags #164

Open
nealrichardson opened this issue Apr 10, 2024 · 1 comment
Open

ContentItem.tags #164

nealrichardson opened this issue Apr 10, 2024 · 1 comment
Labels
enhancement New feature or request sdk Used for automation

Comments

@nealrichardson
Copy link
Collaborator

From #160. If selecting an item from the results of .find(), tags may be present (and they will be by default now). So ContentItem.tags will return them if they're there. But if you just request a content item by guid, there's no option to include tags in the response. And we don't want to erroneously report them not to exist.

Proposal:

  • If the GET v1/content?include=tags result does not contain tags for an item, we know it to be empty, so insert tags: [].
  • In the tags @property on ContentItem, switch behavior on whether "tags" is in the data. If not present, so we should call the content item tags API, add them to the data in the object, and return them.

Following up in the Connect API to make things better going forward:

  • GET v1/content?include=tags should always include a tags attribute for the items in the list, even if it is empty []
  • GET v1/content/{guid} should accept include=tags (and any other things you can add to the catalog endpoint)
@tdstein tdstein added the enhancement New feature or request label Apr 18, 2024
@tdstein tdstein added this to the 0.4.0 milestone Apr 26, 2024
@tdstein tdstein removed this from the 0.4.0 milestone Sep 4, 2024
@tdstein tdstein added the sdk Used for automation label Sep 13, 2024
@tdstein
Copy link
Collaborator

tdstein commented Sep 13, 2024

As of #290, this can be simplified to adding a tags property, which sets the tags field if the value is missing or None.

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

No branches or pull requests

2 participants