class GetSites(Method):
"""
- Return an array of structs containing details about all sites. If
- site_id_list is specified, only the specified sites will be
- queried.
+ Returns an array of structs containing details about sites. If
+ site_filter is specified and is an array of site identifiers or
+ hostnames, or a struct of site attributes, only sites matching the
+ filter will be returned. If return_fields is specified, only the
+ specified details will be returned.
"""
- roles = ['admin', 'pi', 'user', 'tech']
+ roles = ['admin', 'pi', 'user', 'tech', 'node', 'anonymous']
accepts = [
Auth(),
Mixed([Mixed(Site.fields['site_id'],
Site.fields['login_base'])],
- Filter(Site.fields))
+ Parameter(str,"login_base"),
+ Parameter(int,"site_id"),
+ Filter(Site.fields)),
+ Parameter([str], "List of fields to return", nullok = True)
]
returns = [Site.fields]
- event_type = 'Get'
- object_type = 'Site'
- object_ids = []
-
- def call(self, auth, site_filter = None):
- return Sites(self.api, site_filter).values()
+ def call(self, auth, site_filter = None, return_fields = None):
+ return Sites(self.api, site_filter, return_fields)