Labels API#268
Merged
Merged
Conversation
fba62aa to
21ca54f
Compare
21ca54f to
6376ec4
Compare
glpatcern
approved these changes
Apr 29, 2026
Member
glpatcern
left a comment
There was a problem hiding this comment.
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.
Contributor
Author
aduffeck
approved these changes
May 5, 2026
Contributor
aduffeck
left a comment
There was a problem hiding this comment.
Sorry for the late reply, looks good to me.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Following up on #267, we realized that we are also missing a way to
Listspecific labels (like you would doListFavorites). 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?