1 from PLC.Faults import *
2 from PLC.Method import Method
3 from PLC.Parameter import Parameter, Mixed
4 from PLC.Addresses import Address, Addresses
5 from PLC.Auth import PasswordAuth
7 class GetAddresses(Method):
9 Get an array of structs containing details about addresses. If
10 address_id_list is specified, only the specified addresses will be
14 roles = ['admin', 'pi', 'user', 'tech']
18 [Address.fields['address_id']],
21 returns = [Address.fields]
23 def call(self, auth, address_id_list = None):
24 addresses = Addresses(self.api, address_id_list).values()
26 # Turn each address into a real dict
27 addresses = [dict(address) for address in addresses]