Class: Mushikago::Tombo::CapturesRequest

Inherits:
Http::GetRequest show all
Defined in:
lib/mushikago/tombo/captures_request.rb

Overview

キャプチャ一覧取得リクエスト

Instance Attribute Summary

Attributes inherited from Http::Request

#headers, #host, #params, #port

Instance Method Summary collapse

Methods inherited from Http::GetRequest

#http_method

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(options = {}) ⇒ CapturesRequest

Returns a new instance of CapturesRequest.

Parameters:

  • options (Hash) (defaults to: {})

    リクエストのオプション

Options Hash (options):

  • :id (String)

    画像のID

  • :domain (String)

    指定したドメインの画像一覧を取得する

  • :tag (String)

    指定したタグの画像一覧を取得する

  • :source_url (String)

    指定した取得元URLの画像一覧を取得する

  • :state (String)

    キャプチャの取得状態を取得する

  • :limit(10) (Integer)

    最大取得件数(1-100)

  • :offset(0) (Integer)

    取得オフセット



24
25
26
27
28
29
30
31
32
33
# File 'lib/mushikago/tombo/captures_request.rb', line 24

def initialize options={}
  super(options)
  self.id = options[:id] if options.has_key?(:id)
  self.limit = options[:limit] if options.has_key?(:limit)
  self.offset = options[:offset] if options.has_key?(:offset)
  self.domain = options[:domain] if options.has_key?(:domain)
  self.tag = options[:tag] if options.has_key?(:tag)
  self.source_url = options[:source_url] if options.has_key?(:source_url)
  self.state = options[:state] if options.has_key?(:state)
end

Instance Method Details

#pathObject



6
# File 'lib/mushikago/tombo/captures_request.rb', line 6

def path; '/1/tombo/captures' end