Remove Nameable dependancy and return API data directly

This commit is contained in:
Dan Milne
2019-10-25 15:05:55 +11:00
parent 1ad818b4d7
commit 50c3df89ba
5 changed files with 23 additions and 7 deletions

View File

@@ -55,10 +55,8 @@ module Paapi
end
def contributors_of(kind)
contributors&.select { |e| e['Role'] == kind.to_s.gsub(/([[:alpha:]]+)/).each { |w| w.capitalize } }&.map do |e|
r = e['Name']
Nameable(r) unless r.to_s.empty?
end&.compact
kind = kind.to_s.gsub(/([[:alpha:]]+)/) { |w| w.capitalize }
contributors.select { |e| e['Role'] == kind }&.map { |e| e.dig('Name') }&.reject {|n| n.to_s.empty?}
end
def actors

View File

@@ -1,3 +1,3 @@
module Paapi
VERSION = '0.0.8'
VERSION = '0.1.0'
end