Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions app/services/core_data_connector/authority/viaf.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,14 @@ class Viaf < Base
include Http::Requestable

BASE_URL = 'https://viaf.org'

DEFAULT_LIMIT = 20

def find(id, options = {})
send_request("#{BASE_URL}/viaf/#{id}/viaf.json", method: :get) do |body|
headers = {
'Accept': 'application/json'
}

send_request("#{BASE_URL}/viaf/#{id}", method: :get, headers:) do |body|
JSON.parse(body)
end
end
Expand Down