class OpenBD::Client
Constants
- BASE_URL
- COVERAGE_PATH
- SEARCH_PATH
- URL
- VERSION
Public Instance Methods
coverage()
click to toggle source
# File lib/open_bd/client.rb, line 18 def coverage response = connection.get(COVERAGE_PATH) response.body end
search(isbns: [])
click to toggle source
# File lib/open_bd/client.rb, line 12 def search(isbns: []) query = [*isbns].join(',') response = connection.get(SEARCH_PATH, isbn: query) OpenBD::Response.new(response) end
Private Instance Methods
connection()
click to toggle source
# File lib/open_bd/client.rb, line 25 def connection @connection ||= Faraday.new(URL) do |connection| connection.response :json connection.adapter Faraday.default_adapter end end