2 # Thierry Parmentelat - INRIA
4 from PLC.Faults import *
5 from PLC.Method import Method
6 from PLC.Parameter import Parameter, Mixed
7 from PLC.Filter import Filter
8 from PLC.Auth import Auth
10 from PLC.PersonTags import PersonTag, PersonTags
12 class GetPersonTags(Method):
14 Returns an array of structs containing details about
15 persons and related settings.
17 If person_tag_filter is specified and is an array of
18 person setting identifiers, only person settings matching
19 the filter will be returned. If return_fields is specified, only
20 the specified details will be returned.
23 roles = ['admin', 'pi', 'user', 'node']
27 Mixed([PersonTag.fields['person_tag_id']],
28 Parameter(int,"Person setting id"),
29 Filter(PersonTag.fields)),
30 Parameter([str], "List of fields to return", nullok = True)
33 returns = [PersonTag.fields]
36 def call(self, auth, person_tag_filter = None, return_fields = None):
38 person_tags = PersonTags(self.api, person_tag_filter, return_fields)