Class: Mangadex::Author
Direct Known Subclasses
Artist
Instance Attribute Summary
#attributes, #id, #relationships, #type
Class Method Summary
collapse
Instance Method Summary
collapse
attributes_to_inspect, #eq?, #hash, #initialize, #inspect
Class Method Details
.delete(id) ⇒ Object
83
84
85
86
87
|
# File 'lib/mangadex/author.rb', line 83
def self.delete(id)
Mangadex::Internal::Request.delete(
format('/author/%{id}', id: id)
)
end
|
.get(id, **args) ⇒ Object
.inspect_attributes ⇒ Object
89
90
91
|
# File 'lib/mangadex/author.rb', line 89
def self.inspect_attributes
[:name]
end
|
.list(**args) ⇒ Object
15
16
17
18
19
20
21
22
23
24
25
26
27
|
# File 'lib/mangadex/author.rb', line 15
def self.list(**args)
Mangadex::Internal::Request.get(
'/author',
Mangadex::Internal::Definition.validate(args, {
limit: { accepts: Integer },
offset: { accepts: Integer },
ids: { accepts: [String] },
name: { accepts: String },
order: { accepts: Hash },
includes: { accepts: [String] },
})
)
end
|
.update(id, **args) ⇒ Object
66
67
68
69
70
71
72
73
74
|
# File 'lib/mangadex/author.rb', line 66
def self.update(id, **args)
Mangadex::Internal::Request.put(
format('/author/%{id}', id: id),
payload: Mangadex::Internal::Definition.validate(args, {
name: { accepts: String },
version: { accepts: Integer, required: true },
})
)
end
|
Instance Method Details
#artist? ⇒ Boolean
97
98
99
|
# File 'lib/mangadex/author.rb', line 97
def artist?
false
end
|