Skip to content
This repository was archived by the owner on Jan 17, 2025. It is now read-only.

Commit 272dd01

Browse files
Merge pull request #10 from dynata/examples
Examples
2 parents 66c5548 + d894b96 commit 272dd01

File tree

3 files changed

+76
-1
lines changed

3 files changed

+76
-1
lines changed
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
from dynata_rex import RespondentGateway
2+
gateway = RespondentGateway('rex_access_key', 'rex_secret_key')
3+
4+
country = 'country-code'
5+
6+
page_number = 3 # Page Number Being Requested
7+
8+
page_size = 100 # Number of Items Being Requested
9+
10+
gateway.get_attributes(country, page_number, page_size)
11+
12+
# {
13+
# "data": [
14+
# {
15+
# "active": "true/false",
16+
# "parameter_id": "unique-parameter-id"
17+
# }
18+
# ]
19+
# }
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
from dynata_rex import RespondentGateway
2+
gateway = RespondentGateway('rex_access_key', 'rex_secret_key')
3+
4+
attribute_id = 123 # Some-Number
5+
6+
gateway.get_attribute_info(attribute_id)
7+
8+
# {
9+
# "id": "unique-parameter-id",
10+
# "name": "Example Question Name",
11+
# "description": "Example Question Description",
12+
# "display_mode": "Single-Punch/Multi-Punch",
13+
# "parent_dependencies": [
14+
# {
15+
# "answer_ids": [
16+
# {
17+
# "id": "unique-answer-id"
18+
# }
19+
# ],
20+
# "parameter_id": "unique-parameter-id"
21+
# }
22+
# ],
23+
# "expiration_duration": "36000",
24+
# "is_active": "true/false",
25+
# "countries": [
26+
# {
27+
# "code": "country-code"
28+
# }
29+
# ],
30+
# "question": {
31+
# "text": "question-text",
32+
# "translations": [
33+
# {
34+
# "locale": "locale",
35+
# "text": "translation-text"
36+
# }
37+
# ]
38+
# },
39+
# "answers": [
40+
# {
41+
# "id": "unique-answer-id",
42+
# "text": "answer-text",
43+
# "countries": [
44+
# {
45+
# "code": "country-code"
46+
# }
47+
# ],
48+
# "translations": [
49+
# {
50+
# "locale": "locale",
51+
# "text": "translation-text"
52+
# }
53+
# ]
54+
# }
55+
# ]
56+
# }

setup.py

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

1010
setuptools.setup(
1111
name="dynata_rex",
12-
version="1.0.0",
12+
version="1.1.0",
1313
author="REX Maintainers",
1414
author_email="[email protected]",
1515
description=("Package for building and interacting with the "

0 commit comments

Comments
 (0)