1 from PLC.Method import Method
2 from PLC.Parameter import Parameter, Mixed
3 from PLC.Filter import Filter
4 from PLC.Auth import Auth
5 from PLC.Sites import Site, Sites
7 class GetSites(Method):
9 Returns an array of structs containing details about sites. If
10 site_filter is specified and is an array of site identifiers or
11 hostnames, or a struct of site attributes, only sites matching the
12 filter will be returned. If return_fields is specified, only the
13 specified details will be returned.
16 roles = ['admin', 'pi', 'user', 'tech']
20 Mixed([Mixed(Site.fields['site_id'],
21 Site.fields['login_base'])],
23 Parameter([str], "List of fields to return", nullok = True)
26 returns = [Site.fields]
32 def call(self, auth, site_filter = None, return_fields = None):
33 return Sites(self.api, site_filter, return_fields)