Skip to content

Commit 7a8beda

Browse files
authored
Link to client instructions from API Keys Usage section (#1192)
* Link to client instructions from API Keys Usage section * Include API key installation instructions in minimalist clients * Link out to pending epidatr, epidatpy clients * Comment out API key installation by default to prevent copy-paste misery for people working quickly
1 parent 2e4d309 commit 7a8beda

File tree

2 files changed

+24
-4
lines changed

2 files changed

+24
-4
lines changed

docs/api/api_keys.md

+8
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,14 @@ If you choose to
4040
[register for an API key](https://api.delphi.cmu.edu/epidata/admin/registration_form),
4141
there are several ways to use your key to authenticate your requests:
4242

43+
### Using a client
44+
45+
* covidcast
46+
* [R client](https://cmu-delphi.github.io/covidcast/covidcastR/reference/covidcast_signal.html#api-keys-1)
47+
* [Python client](https://cmu-delphi.github.io/covidcast/covidcast-py/html/signals.html#covidcast.use_api_key)
48+
* [epidatr](https://github.com/cmu-delphi/epidatr#api-keys)
49+
* [delphi-epidata](https://cmu-delphi.github.io/delphi-epidata/api/client_libraries.html)
50+
4351
### Via request parameter
4452

4553
The request parameter “api_key” can be used to pass the API key to the server.

docs/api/client_libraries.md

+16-4
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,17 @@ parent: Other Endpoints (COVID-19 and Other Diseases)
44
nav_order: 1
55
---
66

7-
# Epidata API Client Libraries.
7+
# Epidata API Client Libraries
88

9-
Epidata clients are available for
9+
For anyone looking for COVIDCast data, please visit our [COVIDCast Libraries](covidcast_clients.md).
10+
11+
We are currently working on fully-featured Epidata clients for R and Python. They are not ready
12+
for release yet, but you can track our development progress and help us test them out at:
13+
14+
* [epidatr](https://github.com/cmu-delphi/epidatr)
15+
* [epidatpy](https://github.com/cmu-delphi/epidatpy)
16+
17+
In the meantime, minimalist Epidata clients remain available for
1018
[JavaScript](https://github.com/cmu-delphi/delphi-epidata/blob/master/src/client/delphi_epidata.js),
1119
[Python](https://github.com/cmu-delphi/delphi-epidata/blob/master/src/client/delphi_epidata.py),
1220
and
@@ -15,10 +23,10 @@ The following samples show how to import the library and fetch Delphi's COVID-19
1523
Surveillance Streams from Facebook Survey CLI for county 06001 and days
1624
`20200401` and `20200405-20200414` (11 days total).
1725

18-
For anyone looking for COVIDCast data, please visit our [COVIDCast Libraries](covidcast_clients.md).
19-
2026
### JavaScript (in a web browser)
2127

28+
The minimalist JavaScript client does not currently support API keys. If you need API key support in JavaScript, contact [email protected].
29+
2230
````html
2331
<!-- Imports -->
2432
<script src="delphi_epidata.js"></script>
@@ -45,6 +53,8 @@ in the same directory as your Python script.
4553
````python
4654
# Import
4755
from delphi_epidata import Epidata
56+
# [Optional] configure your API key, if desired
57+
#Epidata.auth = ('epidata', <your API key>)
4858
# Fetch data
4959
res = Epidata.covidcast('fb-survey', 'smoothed_cli', 'day', 'county', [20200401, Epidata.range(20200405, 20200414)], '06001')
5060
print(res['result'], res['message'], len(res['epidata']))
@@ -54,6 +64,8 @@ print(res['result'], res['message'], len(res['epidata']))
5464

5565

5666
````R
67+
# [Optional] configure your API key, if desired
68+
#option('epidata.auth', <your API key>)
5769
# Import
5870
source('delphi_epidata.R')
5971
# Fetch data

0 commit comments

Comments
 (0)