mirror of
https://github.com/dkam/paapi.git
synced 2025-12-28 15:14:52 +00:00
Pluck out languages
This commit is contained in:
@@ -77,6 +77,18 @@ module Paapi
|
||||
contributors_of 'Publisher'
|
||||
end
|
||||
|
||||
def languages
|
||||
get(%w{ItemInfo ContentInfo Languages DisplayValues})
|
||||
end
|
||||
|
||||
def original_language
|
||||
language&.find {|l| l['Type'] == 'Original Language' }&.dig('DisplayValue')
|
||||
end
|
||||
|
||||
def published_language
|
||||
language&.find {|l| l['Type'] == 'Published' }&.dig('DisplayValue')
|
||||
end
|
||||
|
||||
def eans
|
||||
get(%w{ItemInfo ExternalIds EANs DisplayValues})
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user