Class: Mangadex::Report
- Inherits:
-
MangadexObject
- Object
- MangadexObject
- Mangadex::Report
- Defined in:
- lib/mangadex/report.rb
Instance Attribute Summary
Attributes included from Internal::WithAttributes
#attributes, #id, #related_type, #relationships, #type
Class Method Summary collapse
Instance 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
.list(**args) ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/mangadex/report.rb', line 10 def self.list(**args) Mangadex::Internal::Request.get( '/report', Mangadex::Internal::Definition.validate(args, { limit: { accepts: Integer, converts: :to_i }, offset: { accepts: Integer, converts: :to_i }, category: { accepts: %w(manga chapter scanlation_group user author) }, reason_id: { accepts: String }, object_id: { accepts: String }, status: { accepts: %w(waiting accepted refused autoresolved) }, order: { accepts: Hash }, includes: { accepts: Array, converts: :to_a }, }), auth: true, ) end |
Instance Method Details
#create(**args) ⇒ Object
28 29 30 31 32 33 34 35 36 37 38 |
# File 'lib/mangadex/report.rb', line 28 def create(**args) Mangadex::Internal::Request.post( '/report', payload: Mangadex::Internal::Definition.validate(args, { category: { accepts: %w(manga chapter scanlation_group user), required: true }, reason: { accepts: String, required: true }, object_id: { accepts: String, required: true }, details: { accepts: String }, }), ) end |