@@ -15,68 +15,69 @@ You can provide your Demand API credentials in a couple of ways. They can be set
15
15
## Example Usage
16
16
17
17
``` python
18
- # You can optionally provide your credentials here instead of environment variables.
19
- demandapi = DemandAPIClient(" client_id" , " username" , " password" )
20
- demandapi.authenticate()
21
-
22
- # Any function requiring one or more IDs should be provided as positional arguments.
23
- demandapi.get_project(7 )
24
-
25
- # Provide query parameters as keyword-arguments.
26
- demandapi.get_projects(state = " LAUNCHED" )
27
-
28
- # Functions that send data in a request body accept a python dictionary.
29
- # Your data will be validated against the schemas provided in the Demand API documentation.
30
- project_data = {
31
- ' title' : ' My New Survey' ,
32
- ...
33
- }
34
- demandapi.create_project(project_data)
18
+ # You can optionally provide your credentials here instead of environment variables.
19
+ demandapi = DemandAPIClient(" client_id" , " username" , " password" )
20
+ demandapi.authenticate()
21
+
22
+ # Any function requiring one or more IDs should be provided as positional arguments.
23
+ demandapi.get_project(7 )
24
+
25
+ # Provide query parameters as keyword-arguments.
26
+ demandapi.get_projects(state = " LAUNCHED" )
27
+
28
+ # Functions that send data in a request body accept a python dictionary.
29
+ # Your data will be validated against the schemas provided in the Demand API documentation.
30
+ project_data = {
31
+ ' title' : ' My New Survey' ,
32
+ ...
33
+ }
34
+ demandapi.create_project(project_data)
35
35
```
36
36
37
37
## Supported API Functions
38
38
39
+ Links to the Demand API documentation are included for each function.
40
+
39
41
### Authentication Functions
40
42
41
- authenticate()
42
- refresh_access_token()
43
- logout()
43
+ [ Obtain Access Token ] ( https://developers.dynata.com/demand-api-reference/authentication/authentication/post-token ) : authenticate()
44
+ [ Refresh Access Token ] ( https://developers.dynata.com/demand-api-reference/authentication/authentication/post-token-refresh ) : refresh_access_token()
45
+ [ Logout ] ( https://developers.dynata.com/demand-api-reference/authentication/authentication/post-logout ) : logout()
44
46
45
47
### Event Functions
46
48
47
- get_event(event_id)
48
- get_events(\*\* kwargs)
49
+ [ Get Event ] ( https://developers.dynata.com/demand-api-reference/notifications/events/get-event ) : get_event(event_id)
50
+ [ Get Events ] ( https://developers.dynata.com/demand-api-reference/notifications/events/get-events ) : get_events(\*\* kwargs)
49
51
50
52
### Project Functions
51
53
52
- buy_project(project_id, buy_data)
53
- close_project(project_id)
54
- create_project(project_data)
55
- get_project(project_id)
56
- get_projects(\*\* kwargs)
57
- reconcile_project(project_id, reconcile_data)
58
- update_project(project_id, update_data)
59
- get_project_detailed_report(project_id)
60
- get_feasibility(project_id)
61
- get_invoice(project_id)
54
+ [ Buy Project] ( https://developers.dynata.com/demand-api-reference/core-resources/projects/post-project-buy ) : buy_project(project_id, buy_data)
55
+ [ Close Project] ( https://developers.dynata.com/demand-api-reference/core-resources/projects/post-close-project ) : close_project(project_id)
56
+ [ Create Project] ( https://developers.dynata.com/demand-api-reference/core-resources/projects/post-projects ) : create_project(project_data)
57
+ [ Get Project] ( https://developers.dynata.com/demand-api-reference/core-resources/projects/get-project ) : get_project(project_id)
58
+ [ Get Projects] ( https://developers.dynata.com/demand-api-reference/core-resources/projects/get-projects ) : get_projects(\*\* kwargs)
59
+ [ Update Project] ( https://developers.dynata.com/demand-api-reference/core-resources/projects/post-project ) : update_project(project_id, update_data)
60
+ [ Get Project Detailed Report] ( https://developers.dynata.com/demand-api-reference/core-resources/projects/get-project-detailed-report ) : get_project_detailed_report(project_id)
61
+ [ Get Pricing & Feasibility] ( https://developers.dynata.com/demand-api-reference/core-resources/pricing-feasibility/get-pricing-feasibility ) : get_feasibility(project_id)
62
+ [ Get Invoice PDF] ( https://developers.dynata.com/demand-api-reference/billing_invoicing/invoicing/get-invoices ) : get_invoice(project_id)
62
63
63
64
### Line Item Functions
64
65
65
- add_line_item(project_id, lineitem_data)
66
- close_line_item(project_id, line_item_id)
67
- get_line_item(project_id, line_item_id)
68
- get_line_items(project_id, \*\* kwargs)
69
- launch_line_item(project_id, line_item_id)
70
- pause_line_item(project_id, line_item_id)
71
- update_line_item(project_id, line_item_id, line_item_data)
72
- get_line_item_detailed_report(project_id, line_item_id)
66
+ [ Add Line Item ] ( https://developers.dynata.com/demand-api-reference/core-resources/lineitems/post-lineitems ) : add_line_item(project_id, lineitem_data)
67
+ [ Close Line Item ] ( https://developers.dynata.com/demand-api-reference/core-resources/lineitems/post-lineitem-close ) : close_line_item(project_id, line_item_id)
68
+ [ Get Line Item ] ( https://developers.dynata.com/demand-api-reference/core-resources/lineitems/get-lineitem ) : get_line_item(project_id, line_item_id)
69
+ [ Get Line Items ] ( https://developers.dynata.com/demand-api-reference/core-resources/lineitems/get-lineitems ) : get_line_items(project_id, \*\* kwargs)
70
+ [ Launch Line Item ] ( https://developers.dynata.com/demand-api-reference/core-resources/lineitems/post-lineitem-launch ) : launch_line_item(project_id, line_item_id)
71
+ [ Pause Line Item ] ( https://developers.dynata.com/demand-api-reference/core-resources/lineitems/post-lineitem-pause ) : pause_line_item(project_id, line_item_id)
72
+ [ Update Line Item ] ( https://developers.dynata.com/demand-api-reference/core-resources/lineitems/post-lineitem ) : update_line_item(project_id, line_item_id, line_item_data)
73
+ [ Get Line Item Detailed Report ] ( https://developers.dynata.com/demand-api-reference/core-resources/lineitems/get-detailed-line-item ) : get_line_item_detailed_report(project_id, line_item_id)
73
74
74
75
### Misc Functions
75
76
76
- get_attributes(country_code, language_code, \*\* kwargs)
77
- get_countries(\*\* kwargs)
78
- get_sources()
79
- get_survey_topics(\*\* kwargs)
77
+ [ Get Attributes ] ( https://developers.dynata.com/demand-api-reference/data_endpoints/attributes/get-attributes ) : get_attributes(country_code, language_code, \*\* kwargs)
78
+ [ Get Countries ] ( https://developers.dynata.com/demand-api-reference/data_endpoints/countries-languages/get-countries ) : get_countries(\*\* kwargs)
79
+ [ Get Sources ] ( https://developers.dynata.com/demand-api-reference/data_endpoints/supplier-sources/get-sources ) : get_sources()
80
+ [ Get Survey Topics ] ( https://developers.dynata.com/demand-api-reference/data_endpoints/categories/get-survey-topic ) : get_survey_topics(\*\* kwargs)
80
81
81
82
## Contributing
82
83
0 commit comments