bensteUEM / ChurchToolsAPI

Collection of Python files to use the API for ChurchTools
6 stars 4 forks source link

get_song_tags_all(self) #4

Closed bensteUEM closed 1 year ago

bensteUEM commented 1 year ago

Implemented in https://forum.songbeamer.de/viewtopic.php?f=1&p=23001&sid=d7f00735d9dccdcc0eb7ba89baa0e489#p23001 by kolibri52

bensteUEM commented 1 year ago

Function currently unknown because code is not published yet.

bensteUEM commented 1 year ago

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

kolibri52 commented 1 year ago

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".

kolibri52 commented 1 year ago

OK since the solution is already merged to master, this can be closed. Thanks for review and improvements.