mirror of
https://github.com/dkam/openlib.git
synced 2025-12-28 03:04:53 +00:00
103 lines
1.2 KiB
Plaintext
103 lines
1.2 KiB
Plaintext
c
|
|
resp.status.first
|
|
resp.status
|
|
resp.200
|
|
resp.ok?
|
|
resp.status.to_i
|
|
resp.status.first
|
|
resp.status
|
|
c
|
|
n
|
|
c
|
|
resp.status
|
|
resp
|
|
c
|
|
view.first.last.dig("preview_url")
|
|
view.first.last.keys
|
|
view.first.last
|
|
c
|
|
view.first.last.dig(data.to_s)
|
|
view.first.last.dig(data)
|
|
view.first.last
|
|
view
|
|
data
|
|
c
|
|
n
|
|
@view.info_url
|
|
n
|
|
c
|
|
@view.response
|
|
@view.response.first.last.keys
|
|
@view.response.first.last.dig("info_url")
|
|
@view.response.first.last
|
|
@view.response.first.last.dig("info_url")
|
|
@view.response
|
|
@view
|
|
@view.info_url
|
|
@view
|
|
n
|
|
c
|
|
@view.
|
|
@view
|
|
c
|
|
pp JSON.parse(d)
|
|
JSON.parse(d)
|
|
d.class
|
|
puts d
|
|
pp d
|
|
puts d
|
|
d
|
|
ap d
|
|
d =URI.open( "https://openlibrary.org/api/books?jscmd=#{format}&format=json&bibkeys=#{id_kind.to_s.upcase}#{id}" ).read
|
|
n
|
|
s
|
|
c
|
|
id_kind
|
|
ID_KINDS
|
|
ID_KINDS.include?(id_kind)
|
|
id_kind
|
|
s
|
|
c
|
|
n
|
|
s
|
|
c
|
|
n
|
|
s
|
|
c
|
|
@id_kind
|
|
c
|
|
s
|
|
@view
|
|
c
|
|
n
|
|
s
|
|
c
|
|
id
|
|
format
|
|
d
|
|
"https://openlibrary.org/api/books?jscmd=#{format}&format=json&bibkeys=#{kind.to_s.upcase}#{id}"
|
|
n
|
|
s
|
|
@view = nil
|
|
c
|
|
n
|
|
@view = nil
|
|
@view
|
|
c
|
|
s
|
|
c
|
|
n
|
|
s
|
|
c
|
|
n
|
|
@view
|
|
n
|
|
c
|
|
d.read
|
|
d.body
|
|
ap d
|
|
d = URI.open( "https://openlibrary.org/api/books?jscmd=#{format}&format=json&bibkeys=#{kind.to_s.upcase}")
|
|
"https://openlibrary.org/api/books?jscmd=#{format}&format=json&bibkeys=#{kind.to_s.upcase}"
|
|
n
|
|
s
|