Skip to content

Commit da480f4

Browse files
author
Joe Wass
committed
Added email query param to docs.
1 parent 7746be4 commit da480f4

File tree

3 files changed

+24
-15
lines changed

3 files changed

+24
-15
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
.DS_Store
22
site
3+
sync.sh

docs/service/query-api.md

+20-12
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,14 @@ The following query parameters are available:
1313
- `cursor` — allows you to iterate through a search result set.
1414
- `from-updated-date` — a special filter that includes updated and deleted Events, to allow you to keep your dataset up to date.
1515

16+
## Tell us who you are
17+
18+
Please also send the `mailto` query parameter. **It is not compulsory**, but will help us understand how people are using the API and get in contact if we need to. We won't share your email address, and will only contact you in connection with API use. For example:
19+
20+
http://query.eventdata.crossref.org/[email protected]&filter=obj-id:10.5555/12345678&obj-id.domain:diabesity.ejournals.ca
21+
22+
If you are uncomfortable sending a contact email address, then don't. You can [read more about the rationale here](https://github.com/CrossRef/rest-api-doc#etiquette).
23+
1624
## Filter parameters
1725

1826
The `filter` parameter takes a `field:value,other-field:other-value` format, using colon (`:`) to separate keys and values and commas (`,`) to separate clauses. You can put keys or values in quotes if they contain colons, for example `subj-id:"http://example.com"`. The following fields are available. They can be used in any combination.
@@ -61,7 +69,7 @@ Each facet should be supplied with a limit (i.e. the top <i>n</i> results) or `*
6169

6270
You many use any combination of facets, separated by commas. The following query means "show me the top 10 domains found in Events for the Newsfeed source":
6371

64-
http://query.eventdata.crossref.org/events?rows=0&filter=source:newsfeed&facet=subj-id.domain:10
72+
http://query.eventdata.crossref.org/events?mailto=YOUR_EMAIL_HERE&rows=0&filter=source:newsfeed&facet=subj-id.domain:10
6573

6674
The result, at the time of writing, incldues:
6775

@@ -85,7 +93,7 @@ The result, at the time of writing, incldues:
8593

8694
The following query means "of all Newsfeed Events found from www.theguardian.com, show me the top DOI prefixes that Events refer to".
8795

88-
http://query.eventdata.crossref.org/events?rows=0&filter=source:newsfeed,subj-id.domain:www.theguardian.com&facet=obj-id.prefix:*
96+
http://query.eventdata.crossref.org/events?mailto=YOUR_EMAIL_HERE&rows=0&filter=source:newsfeed,subj-id.domain:www.theguardian.com&facet=obj-id.prefix:*
8997

9098
The result shows:
9199

@@ -128,35 +136,35 @@ The order or Events returned in the result is not defined, but is stable. This m
128136

129137
Ten Events from the Reddit source:
130138

131-
https://query.eventdata.crossref.org/events?rows=10&filter=source:reddit
139+
https://query.eventdata.crossref.org/events?mailto=YOUR_EMAIL_HERE&rows=10&filter=source:reddit
132140

133141
Ten Events collected on the first of March 2017
134142

135-
https://query.eventdata.crossref.org/events?rows=10&filter=from-collected-date:2017-03-01,until-collected-date:2017-03-01
143+
https://query.eventdata.crossref.org/events?mailto=YOUR_EMAIL_HERE&rows=10&filter=from-collected-date:2017-03-01,until-collected-date:2017-03-01
136144

137145
Ten Events collected in the month of March 2017
138146

139-
https://query.eventdata.crossref.org/events?rows=10&filter=from-collected-date:2017-03-01,until-collected-date:2017-03-31
147+
https://query.eventdata.crossref.org/events?mailto=YOUR_EMAIL_HERE&rows=10&filter=from-collected-date:2017-03-01,until-collected-date:2017-03-31
140148

141149
Ten Events that occurred on or after the 10th of March 2017
142150

143-
https://query.eventdata.crossref.org/events?rows=10&filter=from-occurred-date:2017-03-10
151+
https://query.eventdata.crossref.org/events?mailto=YOUR_EMAIL_HERE&rows=10&filter=from-occurred-date:2017-03-10
144152

145153
Up to ten Events for the DOI https://doi.org/10.1186/s40536-017-0036-8
146154

147-
https://query.eventdata.crossref.org/events?rows=10&filter=obj-id:10.1186/s40536-017-0036-8
155+
https://query.eventdata.crossref.org/events?mailto=YOUR_EMAIL_HERE&rows=10&filter=obj-id:10.1186/s40536-017-0036-8
148156

149157
Ten Events for the DOI prefix 10.1186
150158

151-
http://query.eventdata.crossref.org/events?rows=10&filter=obj-id.prefix:10.1186
159+
http://query.eventdata.crossref.org/events?mailto=YOUR_EMAIL_HERE&rows=10&filter=obj-id.prefix:10.1186
152160

153161
All Events ever! Note that you will need to use the cursor to iterate through the result set.
154162

155-
http://query.eventdata.crossref.org/events?rows=10000
163+
http://query.eventdata.crossref.org/events?mailto=YOUR_EMAIL_HERE&rows=10000
156164

157165
Using the cursor returned from the first page (yours may be different)
158166

159-
http://query.eventdata.crossref.org/events?rows=10000&cursor=17399fd9-319d-4b28-9727-887264a632b1
167+
http://query.eventdata.crossref.org/events?mailto=YOUR_EMAIL_HERE&rows=10000&cursor=17399fd9-319d-4b28-9727-887264a632b1
160168

161169
## Keeping up to date
162170

@@ -166,11 +174,11 @@ If you want to check whether not not events have been updated (edited or deleted
166174

167175
For example, on the 2nd of February 2017 you retrieve events from Twitter:
168176

169-
http://query.eventdata.crossref.org/events?rows=10&filter=source:twitter
177+
http://query.eventdata.crossref.org/events?mailto=YOUR_EMAIL_HERE&rows=10&filter=source:twitter
170178

171179
You store the Events. One month later, you re-query for any Events that were updated since you last queried:
172180

173-
http://query.eventdata.crossref.org/events?rows=10&filter=source:twitter&from-update-date:2017-02-02
181+
http://query.eventdata.crossref.org/events?mailto=YOUR_EMAIL_HERE&rows=10&filter=source:twitter&from-update-date:2017-02-02
174182

175183
**We only edit Events when we absolutely need to** and the Query API will usually send an empty reply, confirming that you don't need to update your data. If it does, you should over-write your stored Events with the new ones.
176184

docs/service/quickstart.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,17 @@ This quick start is going to show you how to fetch data and then do some rudimen
1010

1111
Data is available on a per-day basis. To fetch 10,000 Events from Event Data, collected at any time:
1212

13-
curl "https://query.eventdata.crossref.org/events?rows=10000" > all-events.json
13+
curl "https://query.eventdata.crossref.org/events?mailto=YOUR_EMAIL_HERE&rows=10000" > all-events.json
1414

1515
That returns 10,000 Events (out of a possible 1,363,971 at the time of writing).
1616

1717
If you're only interested in Reddit, you can filter that:
1818

19-
curl "https://query.eventdata.crossref.org/events?rows=10000&filter=source:reddit" > reddit-events.json
19+
curl "https://query.eventdata.crossref.org/events?mailto=YOUR_EMAIL_HERE&rows=10000&filter=source:reddit" > reddit-events.json
2020

2121
If you're only interested in PLOS articles (4013 Events), you can filter by their prefix:
2222

23-
curl "https://query.eventdata.crossref.org/events?rows=10000&filter=source:reddit,prefix:10.1371" > reddit-plos.json
23+
curl "https://query.eventdata.crossref.org/events?mailto=YOUR_EMAIL_HERE&rows=10000&filter=source:reddit,prefix:10.1371" > reddit-plos.json
2424

2525
Now you've got a few thousand Events to crunch.
2626

0 commit comments

Comments
 (0)