Class: Mangadex::Thread
- Inherits:
-
MangadexObject
- Object
- MangadexObject
- Mangadex::Thread
- Defined in:
- lib/mangadex/thread.rb
Instance Attribute Summary
Attributes included from Internal::WithAttributes
#attributes, #id, #related_type, #relationships, #type
Class Method Summary collapse
Methods inherited from MangadexObject
#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
.attributes_to_inspect ⇒ Object
20 21 22 |
# File 'lib/mangadex/thread.rb', line 20 def self.attributes_to_inspect [:id, :type, :replies_count] end |
.create(type:, id:) ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/mangadex/thread.rb', line 7 def create(type:, id:) payload = {type: type, id: id} Mangadex::Internal::Request.post( '/forums/thread', payload: Mangadex::Internal::Definition.validate(payload, { type: { accepts: %w(manga group chapter), converts: :to_s, required: true }, id: { accepts: String, required: true }, }), auth: true, ) end |