Class: Mushikago::Tombo::CaptureRequest
- Inherits:
-
Http::PostRequest
- Object
- Http::Request
- Http::PostRequest
- Mushikago::Tombo::CaptureRequest
- Defined in:
- lib/mushikago/tombo/capture_request.rb
Overview
キャプチャリクエスト
Instance Attribute Summary
Attributes inherited from Http::Request
#headers, #host, #params, #port
Instance Method Summary collapse
-
#initialize(url, options = {}) ⇒ CaptureRequest
constructor
A new instance of CaptureRequest.
- #path ⇒ Object
Methods inherited from Http::PostRequest
Methods included from Auth::Signature
#add_signature!, #string_to_sign
Methods inherited from Http::Request
#[], #[]=, add_param, #to_http_request, #url_encoded_params
Constructor Details
#initialize(url, options = {}) ⇒ CaptureRequest
Returns a new instance of CaptureRequest.
26 27 28 29 30 31 32 33 34 35 36 37 |
# File 'lib/mushikago/tombo/capture_request.rb', line 26 def initialize url, ={} super() self.url = url self.image_format = [:image_format] if .has_key?(:image_format) self.image_quality = [:image_quality] if .has_key?(:image_quality) self.thumbnail = [:thumbnail] if .has_key?(:thumbnail) self. = [:tags] if .has_key?(:tags) self.user_agent = [:user_agent] if .has_key?(:user_agent) self.delay_time = [:delay_time] if .has_key?(:delay_time) self.display_width = [:display_width] if .has_key?(:display_width) @headers['Content-type'] = 'application/x-www-form-urlencoded; charset=utf-8' end |
Instance Method Details
#path ⇒ Object
6 |
# File 'lib/mushikago/tombo/capture_request.rb', line 6 def path; '/1/tombo/capture' end |