8000 Improve Retrieve Data Extension Row using the REST API with the like … · SnapLyte/FuelSDK-Python-Wrapper@37cffa6 · GitHub
[go: up one dir, main page]

Skip to content

Commit 37cffa6

Browse files
author
Sebastien.Dangelo
committed
Improve Retrieve Data Extension Row using the REST API with the like operator
Fix requirements Add Python 3 support
1 parent 5eaa12b commit 37cffa6

File tree

5 files changed

+18
-8
lines changed

5 files changed

+18
-8
lines changed

FuelSDKWrapper.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -300,6 +300,8 @@ def search_filter_for_rest_call(search_filter):
300300
prop = search_filter['Property']
301301
operator = operator_for_rest_call(search_filter['SimpleOperator'])
302302
value = search_filter.get('Value', search_filter.get('DateValue'))
303+
if operator == 'like':
304+
value = value.replace('%', '%25')
303305
return "{}%20{}%20'{}'".format(prop, operator, value)
304306

305307

README.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,13 @@ response = api.get_data_extension_rows_rest(
162162
page_size=100,
163163
page=5
164164
)
165+
166+
response = api.get_data_extension_rows_rest(
167+
customer_key="DE_CUSTOMER_KEY",
168+
search_filter=simple_filter("full_name", Operator.LIKE, "Jo%Doe"),
169+
property_list=["email_address", "full_name"],
170+
max_rows=300
171+
)
165172
```
166173

167174
### Get More Results
@@ -204,7 +211,7 @@ try:
204211
import_def = response.results[0]
205212
response = api.perform_action("start", import_def)
206213
except IndexError:
207-
pass
214+
print("No Import Definition found")
208215
```
209216

210217
### List SOAP API Object Properties
@@ -234,11 +241,11 @@ api = ET_API(debug=True)
234241
## Requirements
235242

236243
Python 2.7.x
244+
Python 3.x
237245

238246
Libraries:
239247

240248
* Salesforce-FuelSDK>=1.3.0
241249
* PyJWT>=0.1.9
242250
* requests>=2.18.4
243-
* suds>=0.4
244251
* suds-jurko>=0.6

__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
__title__ = 'FuelSDKWrapper'
2-
__version__ = '1.1.4'
2+
__version__ = '1.1.5'
33
__author__ = 'Seb Angel'
44
__license__ = 'MIT'

requirements.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
Salesforce-FuelSDK>=1.3.0
22
PyJWT>=0.1.9
33
requests>=2.18.4
4-
suds>=0.4
54
suds-jurko>=0.6

setup.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
readme = f.read()
55

66
setup(
7-
version='1.1.4',
7+
version='1.1.5',
88
name='FuelSDKWrapper',
99
description='Simplify and enhance the FuelSDK for Salesforce Marketing Cloud (ExactTarget)',
1010
long_description=readme,
@@ -16,9 +16,10 @@
1616
url='https://github.com/seb-angel/FuelSDK-Python-Wrapper',
1717
license='MIT',
1818
install_requires=[
19-
'FuelSDK>=0.9.3',
20-
'suds-jurko>=0.6',
19+
'Salesforce-FuelSDK>=1.3.0',
20+
'PyJWT>=0.1.9',
2121
'requests>=2.18.4',
22+
'suds-jurko>=0.6'
2223
],
2324
classifiers=[
2425
'Development Status :: 5 - Production/Stable',
@@ -27,5 +28,6 @@
2728
'Operating System :: OS Independent',
2829
'Topic :: Software Development :: Libraries',
2930
'Programming Language :: Python :: 2.7',
31+
'Programming Language :: Python :: 3',
3032
],
31-
)
33+
)

0 commit comments

Comments
 (0)
0