Class: PixivApi::Response::Action
Instance Attribute Summary collapse
#attributes, #response
Class Method Summary
collapse
Instance Method Summary
collapse
#[], attr_reader, define_attribute_method, define_attributes_method, define_blob_method, define_time_method, #initialize
Instance Attribute Details
#status ⇒ Object
Returns the value of attribute status.
4
5
6
|
# File 'lib/pixiv_api/response/action.rb', line 4
def status
@status
end
|
Class Method Details
.from_response(response) ⇒ Object
6
7
8
|
# File 'lib/pixiv_api/response/action.rb', line 6
def self.from_response(response)
new(response, response.parsed)
end
|
Instance Method Details
#errors ⇒ Object
10
11
12
|
# File 'lib/pixiv_api/response/action.rb', line 10
def errors
fetch('errors', {})
end
|
#failure? ⇒ Boolean
18
19
20
|
# File 'lib/pixiv_api/response/action.rb', line 18
def failure?
!success?
end
|
#success? ⇒ Boolean
14
15
16
|
# File 'lib/pixiv_api/response/action.rb', line 14
def success?
status == 'success'
end
|