module Serrano

Serrano - The top level module for using methods to access Serrano APIs

The following methods, matching the main Crossref API routes, are available:

Additional methods

All routes return an array of hashes For example, if you want to inspect headers returned from the HTTP request, and parse the raw result in any way you wish.

@see api.crossref.org for detailed description of the Crossref API

What am I actually searching when using the Crossref search API?

You are using the Crossref search API described at api.crossref.org When you search with query terms, on Crossref servers they are not searching full text, or even abstracts of articles, but only what is available in the data that is returned to you. That is, they search article titles, authors, etc. For some discussion on this, see gitlab.com/crossref/issues/-/issues/101

The Polite Pool As of September 18th 2017 any API queries that use HTTPS and have appropriate contact information will be directed to a special pool of API machines that are reserved for polite users. If you connect to the Crossreef API using HTTPS and provide contact information, then they will send you to a separate pool of machines, with better control the performance of these machines because they can block abusive users.

We have been using ‘https` in `serrano` for a while now, so that’s good to go. To get into the Polite Pool, also set your ‘mailto` email address with `Serrano.configuration` (example below), or set as an environment variable with the name `CROSSREF_EMAIL` and your mailto will be set for each request automatically.

require ‘serrano’ Serrano.configuration do |config|

config.mailto = "foo@bar.com"

end

Rate limiting Crossref introduced rate limiting recently. The rate limits apparently vary, so we can’t give a predictable rate limit. As of this writing, the rate limit is 50 requests per second. Look for the headers ‘X-Rate-Limit-Limit` and `X-Rate-Limit-Interval` in requests to see what the current rate limits are.

URL Encoding We do URL encoding of DOIs for you for all methods except ‘Serrano.citation_count` which doesn’t work if you encode DOIs beforehand. We use ‘ERB::Util.url_encode` to encode.

ContentNegotiation - Content Negotiation class

@see citation.crosscite.org/docs.html for details

Serrano::CNRequest

Class to perform HTTP requests to the Crossref API

Serrano::Request

Class to perform HTTP requests to the Crossref API

Serrano::RequestCursor

Class to perform HTTP requests to the Crossref API