1 from PLC.Faults import *
2 from PLC.Method import Method
3 from PLC.Parameter import Parameter, Mixed
4 from PLC.AddressTypes import AddressType, AddressTypes
5 from PLC.Auth import Auth
7 class GetAddressTypes(Method):
9 Get an array of structs containing details about valid address
10 types. If address_type_id_or_name_list is specified, only the
11 specified address types will be queried.
14 roles = ['admin', 'pi', 'user', 'tech']
18 [Mixed(AddressType.fields['address_type_id'],
19 AddressType.fields['name'])]
22 returns = [AddressType.fields]
24 def call(self, auth, address_type_id_or_name_list = None):
25 address_types = AddressTypes(self.api, address_type_id_or_name_list).values()