Class: Mushikago::Tombo::CapturesRequest

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

Overview

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

Instance Attribute Summary

Attributes inherited from Http::Request

headers, host, http_method, params, path, port

Instance Method Summary (collapse)

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

- (CapturesRequest) initialize(options = {})

A new instance of CapturesRequest

Parameters:

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

    リクエストのオプション

Options Hash (options):

  • :id (String)

    画像のID

  • :domain (String)

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

  • :tag (String)

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

  • :limit(10) (Integer)

    最大取得件数(1-100)

  • :offset(0) (Integer)

    取得オフセット



20
21
22
23
24
25
26
27
# File 'lib/mushikago/tombo/captures_request.rb', line 20

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)
end

Instance Method Details

- (Object) method_name



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

def method_name; 'captures' end