lib/mushikago/tombo/request.rb in mushikago-sdk-0.1.4 vs lib/mushikago/tombo/request.rb in mushikago-sdk-0.1.5
- old
+ new
@@ -1,19 +1,31 @@
module Mushikago
module Tombo
+ # Tomboのリクエストを表す抽象クラス
class Request < Mushikago::Http::Request
include Mushikago::Auth::Signature
+ # @param [Hash] options オプション
+ # @option options [String] :endpoint('tombo.mushikago.org') Tomboのエンドポイント
def initialize options={}
super()
endpoint = options[:endpoint] || Mushikago.config.tombo_endpoint
host, port = endpoint.split(':')
- self.host = host
- self.port = port if port
+ @host = host
+ @port = port if port
+ @path = "/#{api_version}/#{method_name}"
end
+ # @private
+ private
def api_version
1
+ end
+
+ # @private
+ private
+ def method_name
+ ''
end
end
end
end