Skip to content

Commit 12fc354

Browse files
committed
no need to require long list anymore. everything is the aggregations
1 parent 15e19ed commit 12fc354

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

app.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@
167167
doi = validate_doi(params[:id])
168168
link = doi ? "https://doi.org/#{doi}" : params[:id]
169169

170-
events = get_events('page[size]' => 25, 'page[number]' => @page, 'doi' => doi, 'include' => 'dois', 'sort' => 'relation_type_id')
170+
events = get_events('page[size]' => 1, 'page[number]' => @page, 'doi' => doi, 'include' => 'dois', 'sort' => 'relation_type_id')
171171

172172
@work[:metrics] = reduce_aggs(events[:meta], { yop: @work.dig(:data, "attributes","published").to_i })
173173
@work[:metrics].merge!(citations: (events[:meta].fetch('uniqueCitations', []).find { |x| x['id'] == doi } || {}))

lib/lagottino.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ def call_metrics(dois, options={})
4040
"doi" => dois.join(","),
4141
"source-id" => INCLUDED_SOURCES.join(','),
4242
"aggregations" => "query_aggregations",
43-
"page[size]" => 25
43+
"page[size]" => 1
4444
}
4545

4646
url = "#{ENV['API_URL']}/events?" + URI.encode_www_form(params)

0 commit comments

Comments
 (0)