Skip to content

Labels API#268

Merged
jessegeens merged 1 commit into
mainfrom
feat/list-label
May 5, 2026
Merged

Labels API#268
jessegeens merged 1 commit into
mainfrom
feat/list-label

Conversation

@jessegeens
Copy link
Copy Markdown
Contributor

@jessegeens jessegeens commented Apr 28, 2026

Following up on #267, we realized that we are also missing a way to List specific labels (like you would do ListFavorites). And since we made the API generic, we would also need a way to query the unique labels that a user has created.

To make this a bit cleaner, we propose to add a Labels API. This one contains the two methods that were at the moment in the StorageProvider (AddLabel, RemoveLabel), as well as two new methods for listing unique labels and listing resources for a given label.

We store these in the database, so for us it makes sense to have them in a separate API from the storage provider. I think for others, if you do not need these, you can make them return unimplemented, and implement the API in the StorageProvider as you do now. That means that you would only need to add two stubs.

What do you think @micbar @aduffeck @butonic ? Does this work for you?

@jessegeens jessegeens force-pushed the feat/list-label branch 11 times, most recently from fba62aa to 21ca54f Compare April 28, 2026 14:23
@jessegeens jessegeens marked this pull request as ready for review April 29, 2026 07:57
Copy link
Copy Markdown
Member

@glpatcern glpatcern left a comment

Choose a reason for hiding this comment

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

This change entails just a(nother) rename of APIs and payloads for the recently introduced AddLabel and RemoveLabel methods, that's why we didn't go for deprecation etc. (as we didn't when renaming the SetFavorite methods).

The extra methods are optional and not needed in a context of just dealing with favorites.

@jessegeens
Copy link
Copy Markdown
Contributor Author

@micbar @aduffeck @butonic do you approve? 🙂

Copy link
Copy Markdown
Contributor

@aduffeck aduffeck left a comment

Choose a reason for hiding this comment

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

Sorry for the late reply, looks good to me.

@jessegeens jessegeens merged commit 844e378 into main May 5, 2026
2 checks passed
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.

3 participants