class RubygemsDownloads::Stats::Author

Public Instance Methods

call() click to toggle source
Calls superclass method
# File lib/rubygems_downloads/stats/author.rb, line 8
def call
  response = super

  return invalid_response_return_value if response.nil?

  response.map do |entry|
    RubygemsDownloads::Gem.from_json(entry)
  end
end

Protected Instance Methods

endpoint() click to toggle source
# File lib/rubygems_downloads/stats/author.rb, line 24
def endpoint
  "https://rubygems.org/api/v1/owners/#{placeholder}/gems.json"
end
invalid_response_return_value() click to toggle source
# File lib/rubygems_downloads/stats/author.rb, line 28
def invalid_response_return_value
  []
end
placeholder() click to toggle source
# File lib/rubygems_downloads/stats/author.rb, line 20
def placeholder
  '#|AUTHOR_NAME|#'
end