Closed bensteUEM closed 1 year ago
Function currently unknown because code is not published yet.
I would suggest naming the function get_tags(self) and include a param type as string to match the REST API. Did you see a list of types that are applicable? at least songs, groups, and persons should exist ...
let's continue the discussion in https://github.com/bensteUEM/ChurchToolsAPI/issues/4
Yes for the Endpoint /api/tags which is actually used, only the type "songs" and "persons" exist.
If you want the function to support the type "groups" also, the additional Parameter groupId (Default=None) would be required and an other endpoint /groups/{groupId}/tags is used in this case.
So the function would look like this:
get_tags(self, type, groupId=None)
Otherwise maybe the parameter groupId is confusing and I for myself do not see any use for group tags.
So I would prefer to define it as get_tags(self, type=songs)
,
so the default is "songs" and supported will be the types "songs" and "persons".
OK since the solution is already merged to master, this can be closed. Thanks for review and improvements.
Implemented in https://forum.songbeamer.de/viewtopic.php?f=1&p=23001&sid=d7f00735d9dccdcc0eb7ba89baa0e489#p23001 by kolibri52