Class: Mangadex::Statistic

Inherits:
MangadexObject show all
Defined in:
lib/mangadex/statistic.rb

Instance Attribute Summary

Attributes included from Internal::WithAttributes

#attributes, #id, #related_type, #relationships, #type

Class Method Summary collapse

Methods inherited from MangadexObject

attributes_to_inspect, #eq?, #hash, #initialize, #inspect

Methods included from Concern

#append_features, #class_methods, extended, #included, #prepend_features, #prepended

Constructor Details

This class inherits a constructor from Mangadex::MangadexObject

Class Method Details

.get(uuid) ⇒ Object



13
14
15
16
17
18
19
# File 'lib/mangadex/statistic.rb', line 13

def self.get(uuid)
  Mangadex::Internal::Definition.must(uuid)

  Mangadex::Internal::Request.get(
    '/statistics/manga/%{uuid}' % {uuid: uuid},
  )
end

.list(**args) ⇒ Object



22
23
24
25
26
27
28
29
# File 'lib/mangadex/statistic.rb', line 22

def self.list(**args)
  Mangadex::Internal::Request.get(
    '/statistics/manga',
    Mangadex::Internal::Definition.validate(args, {
      manga: { accepts: [String], converts: :to_a },
    })
  )
end