Skip to content

Commit 88eecd9

Browse files
authored
Merge pull request #2 from mjkallen/master
Fixed typo in file name and added function to retrieve countries
2 parents a33998a + 9c7a98b commit 88eecd9

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

activtyinfo_client.py renamed to activityinfo_client.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,12 @@ class ActivityInfoClient(object):
2020
Retrieve all sites in activity 33: /sites?activity=33
2121
Retrieve all sites in activity 33 in GeoJSON format: /sites/points?activity=33
2222
23+
List all countries: /countries
2324
List all administrative levels in Lebanon (country code LB): /country/LB/adminLevels
2425
List all administrative entities in level 1370: /adminLevel/1370/entities
2526
List all administrative entities in level 1370 in GeoJSON format: /adminLevel/1370/entities/features
2627
List all location types in Lebanon: /country/LB/locationTypes
27-
List all locations of type 1370: /locations/type=1370
28+
List all locations of type 1370: /locations?type=1370
2829
2930
"""
3031

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

117+
def get_countries(self):
118+
return self.make_request('resources/countries').json()
119+
116120
def get_admin_levels(self, country):
117121
return self.make_request('resources/country/{}/adminLevels'.format(country)).json()
118122

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
setup(
44
name='activityinfo_python',
5-
version='1.5.0',
5+
version='1.6.0',
66
author='James Cranwell-Ward',
77
author_email='[email protected]',
88
py_modules=['activityinfo_client'],

0 commit comments

Comments
 (0)