lib/mushikago/tombo/capture_request.rb in mushikago-sdk-0.1.3 vs lib/mushikago/tombo/capture_request.rb in mushikago-sdk-0.1.4

- old
+ new

@@ -1,13 +1,19 @@ module Mushikago module Tombo class CaptureRequest < Request add_param :url add_param :image_format - add_param :image_quality + add_param :image_quality do |v| v.to_i.to_s end add_param :thumbnail do |v| (v.to_i != 0 ? 1 : 0).to_s end add_param :tags do |v| [v].flatten.compact.join(',') end + # @param [String] url キャプチャ対象のURL + # @param [Hash] options リクエストのオプション + # @option options [String] :image_format('jpg') 画像のフォーマット(jpg,png) + # @option options [Integer] :image_quality(80) 画像の品質(0-100) + # @option options [Boolean] :thumbnail(0) サムネイル取得フラグ(false:取得しない,true:取得する) + # @option options [String,Array] :tags タグ def initialize url, options={} super(options) self.url = url self.image_format = options[:image_format] if options.has_key?(:image_format) self.image_quality = options[:image_quality] if options.has_key?(:image_quality)