Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion activtyinfo_client.py → activityinfo_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,12 @@ class ActivityInfoClient(object):
Retrieve all sites in activity 33: /sites?activity=33
Retrieve all sites in activity 33 in GeoJSON format: /sites/points?activity=33

List all countries: /countries
List all administrative levels in Lebanon (country code LB): /country/LB/adminLevels
List all administrative entities in level 1370: /adminLevel/1370/entities
List all administrative entities in level 1370 in GeoJSON format: /adminLevel/1370/entities/features
List all location types in Lebanon: /country/LB/locationTypes
List all locations of type 1370: /locations/type=1370
List all locations of type 1370: /locations?type=1370

"""

Expand Down Expand Up @@ -113,6 +114,9 @@ def get_cube(self, form_ids, month=None):
def get_monthly_reports_for_site(self, site_id):
return self.make_request('resources/sites/{}/monthlyReports'.format(site_id)).json()

def get_countries(self):
return self.make_request('resources/countries').json()

def get_admin_levels(self, country):
return self.make_request('resources/country/{}/adminLevels'.format(country)).json()

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

setup(
name='activityinfo_python',
version='1.5.0',
version='1.6.0',
author='James Cranwell-Ward',
author_email='jcranwellward@unicef.org',
py_modules=['activityinfo_client'],
Expand Down