Class: Docomoru::Client

Inherits:
Object
  • Object
show all
Includes:
DialogueMethods
Defined in:
lib/docomoru/client.rb

Constant Summary collapse

DEFAULT_HOST =
"api.apigw.smt.docomo.ne.jp"
DEFAULT_USER_AGENT =
"#{self} #{VERSION}"
DEFAULT_HEADERS =
{
  "User-Agent" => DEFAULT_USER_AGENT,
}

Constants included from DialogueMethods

DialogueMethods::PATH

Instance Method Summary collapse

Methods included from DialogueMethods

#create_dialogue

Constructor Details

#initialize(api_key:) ⇒ Client

Returns a new instance of Client.

Parameters:

  • api_key (String)

    APIKEY issued from DoCoMo.



22
23
24
# File 'lib/docomoru/client.rb', line 22

def initialize(api_key:)
  @api_key = api_key
end

Instance Method Details

#post(path, params = nil, headers = nil) ⇒ Object



26
27
28
# File 'lib/docomoru/client.rb', line 26

def post(path, params = nil, headers = nil)
  process(:post, path, params, headers)
end