class Mangadex::ReportReason
Public Class Methods
attributes_to_inspect()
click to toggle source
# File lib/mangadex/report_reason.rb, line 34 def self.attributes_to_inspect self.attributes end
create(**args)
click to toggle source
# File lib/mangadex/report_reason.rb, line 21 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
list(category)
click to toggle source
# File lib/mangadex/report_reason.rb, line 11 def list(category) args = Mangadex::Internal::Definition.validate({category: category}, { category: { accepts: %w(manga chapter scanlation_group user), required: true }, }) Mangadex::Internal::Request.get( '/report/reasons/%{category}' % args, ) end