Skip to content

Commit fc2f6f9

Browse files
committed
Removed whitespace from python code example. Added links to API docs for each supported function.
1 parent fb8b33c commit fc2f6f9

File tree

1 file changed

+45
-44
lines changed

1 file changed

+45
-44
lines changed

README.md

Lines changed: 45 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -15,68 +15,69 @@ You can provide your Demand API credentials in a couple of ways. They can be set
1515
## Example Usage
1616

1717
```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)
3535
```
3636

3737
## Supported API Functions
3838

39+
Links to the Demand API documentation are included for each function.
40+
3941
### Authentication Functions
4042

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()
4446

4547
### Event Functions
4648

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)
4951

5052
### Project Functions
5153

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)
6263

6364
### Line Item Functions
6465

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)
7374

7475
### Misc Functions
7576

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)
8081

8182
## Contributing
8283

0 commit comments

Comments
 (0)