Sha256: e3d2dc54213e34098bfd59e8b3ca0a29ff8cde07ab75a17f3c40ae40d3799ed6

Contents?: true

Size: 782 Bytes

Versions: 6

Compression:

Stored size: 782 Bytes

Contents

# -*- coding: utf-8 -*-
module Mushikago
  module Hotaru
    # Hotaruのリクエストを表す抽象クラス
    class Request < Mushikago::Http::Request
      include Mushikago::Auth::Signature

      # @param [Hash] options オプション
      # @option options [String] :endpoint('hotaru.mushikago.org') Hotaruのエンドポイント
      def initialize options={}
        super()
        endpoint = options[:endpoint] || Mushikago.config.hotaru_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.3.7 lib/mushikago/hotaru/request.rb
mushikago-sdk-0.3.6 lib/mushikago/hotaru/request.rb
mushikago-sdk-0.3.5 lib/mushikago/hotaru/request.rb
mushikago-sdk-0.3.4 lib/mushikago/hotaru/request.rb
mushikago-sdk-0.3.2 lib/mushikago/hotaru/request.rb
mushikago-sdk-0.3.1 lib/mushikago/hotaru/request.rb