Sha256: e3fac92dcfe324e2578b8211fe42f30fa2f3f678295d2758fa512358ba1334ca

Contents?: true

Size: 753 Bytes

Versions: 6

Compression:

Stored size: 753 Bytes

Contents

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(':')
        @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

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
mushikago-sdk-0.2.3 lib/mushikago/tombo/request.rb
mushikago-sdk-0.2.1 lib/mushikago/tombo/request.rb
mushikago-sdk-0.1.8 lib/mushikago/tombo/request.rb
mushikago-sdk-0.1.7 lib/mushikago/tombo/request.rb
mushikago-sdk-0.1.6 lib/mushikago/tombo/request.rb
mushikago-sdk-0.1.5 lib/mushikago/tombo/request.rb