Skip to content

Commit 5956370

Browse files
authored
Use the new direction param in GetPropertyValues REST API. (#109)
* Use the new direction param in GetPropertyValues REST API. * Small refactor. * setup.py version update
1 parent 2610372 commit 5956370

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

datacommons/core.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,10 +154,16 @@ def get_property_values(dcids,
154154
"""
155155
# Convert the dcids field and format the request to GetPropertyValue
156156
dcids = list(dcids)
157+
if out:
158+
direction = 'out'
159+
else:
160+
direction = 'in'
161+
157162
req_json = {
158163
'dcids': dcids,
159164
'property': prop,
160-
'limit': limit
165+
'limit': limit,
166+
'direction': direction
161167
}
162168
if value_type:
163169
req_json['value_type'] = value_type

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
EMAIL = 'support@datacommons.org'
2626
AUTHOR = 'datacommons.org'
2727
REQUIRES_PYTHON = '>=3.6.0'
28-
VERSION = '1.0.2'
28+
VERSION = '1.0.3'
2929

3030
REQUIRED = [
3131
'httplib2',

0 commit comments

Comments
 (0)