Class: Episodic::Platform::WriteResponse
- Defined in:
- lib/episodic/platform/write_methods.rb
Overview
All write methods have a similar response structure. This class extends Episodic::Platform::Response
and adds a method to get the id of the created/updated object (‘playlist_id’, ‘episode_id’, etc).
Direct Known Subclasses
Instance Method Summary collapse
-
#initialize(response, xml_options = {"ForceArray" => false}) ⇒ WriteResponse
constructor
Constructor.
-
#method_missing(method_sym, *arguments, &block) ⇒ Object
Override to just check for the value in the attributes.
-
#respond_to?(symbol, include_private = false) ⇒ Boolean
Always return true.
Methods inherited from Response
Constructor Details
#initialize(response, xml_options = {"ForceArray" => false}) ⇒ WriteResponse
Constructor
Parameters
- response<Episodic::Platform::HTTPResponse>
-
The response object returned from an Episodic Platform API request.
- xml_options<Hash>
-
A set of options used by XmlSimple when parsing the response body
344 345 346 |
# File 'lib/episodic/platform/write_methods.rb', line 344 def initialize response, = {"ForceArray" => false} super(response, ) end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method_sym, *arguments, &block) ⇒ Object
Override to just check for the value in the attributes
351 352 353 |
# File 'lib/episodic/platform/write_methods.rb', line 351 def method_missing(method_sym, *arguments, &block) return @parsed_body[method_sym.to_s] end |
Instance Method Details
#respond_to?(symbol, include_private = false) ⇒ Boolean
Always return true.
358 359 360 |
# File 'lib/episodic/platform/write_methods.rb', line 358 def respond_to?(symbol, include_private = false) return true end |