Sha256: 8ce7bd16238f9eba255c39fd88c51399c6bbf37ee5d4526bd7cf8d093181a03a

Contents?: true

Size: 740 Bytes

Versions: 3

Compression:

Stored size: 740 Bytes

Contents

# typed: false

module Mangadex
  class Statistic < MangadexObject
    has_attributes \
      :rating,
      :average,
      :bayesian,
      :distribution,
      :follows

    sig { params(uuid: String).returns(T::Api::GenericResponse) }
    def self.get(uuid)
      Mangadex::Internal::Definition.must(uuid)

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

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

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
mangadex-5.8.0 lib/mangadex/statistic.rb
mangadex-5.7.5.3 lib/mangadex/statistic.rb
mangadex-5.7.5.2 lib/mangadex/statistic.rb