pFad - Phone/Frame/Anonymizer/Declutterfier! Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

URL: http://github.com/usabilla/api-python/commit/2ead8c8583ceeb9fb27bc815c386b01bd12aa694

ssorigen="anonymous" media="all" rel="stylesheet" href="https://github.githubassets.com/assets/global-7a1ad343bd40328c.css" /> Added campaigns for apps support and examples · usabilla/api-python@2ead8c8 · GitHub
Skip to content

Commit 2ead8c8

Browse files
George VisniucTeun Zengerink
authored andcommitted
Added campaigns for apps support and examples
1 parent 8701fdc commit 2ead8c8

2 files changed

Lines changed: 24 additions & 3 deletions

File tree

example/examples_apps.py

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
# Set the limit of buttons to retrieve to 1
1212
if False:
13-
api.set_query_parameters({'limit': 1})
13+
api.set_query_parameters({'limit': 1})
1414

1515
# Set a limit for last 7 days
1616
if False:
@@ -25,5 +25,24 @@
2525
print first_form['name']
2626

2727
# Get the feedback of the first app form
28-
feedback = api.get_resource(api.SCOPE_LIVE, api.PRODUCT_APPS, api.RESOURCE_FEEDBACK, first_form['id'], iterate=True)
28+
feedback = api.get_resource(
29+
api.SCOPE_LIVE,
30+
api.PRODUCT_APPS,
31+
api.RESOURCE_FEEDBACK,
32+
first_form['id'],
33+
iterate=True)
2934
print len([item for item in feedback])
35+
36+
# Campaigns for apps
37+
app_campaigns = api.get_resource(
38+
api.SCOPE_LIVE,
39+
api.PRODUCT_APPS,
40+
api.RESOURCE_CAMPAIGN)
41+
first_campaign = app_campaigns['items'][0]
42+
responses = api.get_resource(
43+
api.SCOPE_LIVE,
44+
api.PRODUCT_APPS,
45+
api.RESOURCE_CAMPAIGN_RESULT,
46+
first_campaign['id'],
47+
iterate=True)
48+
print len([item for item in responses])

usabilla.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,9 @@ class APIClient(object):
9595
'apps': {
9696
'resources' : {
9797
'app': '',
98-
'feedback': '/:id/feedback'
98+
'feedback': '/:id/feedback',
99+
'campaign': '/campaign',
100+
'campaign_result': '/campaign/:id/results'
99101
}
100102
}
101103
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad © 2024 Your Company Name. All rights reserved.





Check this box to remove all script contents from the fetched content.



Check this box to remove all images from the fetched content.


Check this box to remove all CSS styles from the fetched content.


Check this box to keep images inefficiently compressed and original size.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy