Class: Docomoru::Client
- Inherits:
-
Object
- Object
- Docomoru::Client
- Includes:
- DialogueMethods, KnowledgeMethods
- 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 KnowledgeMethods
Constants included from DialogueMethods
Instance Method Summary collapse
- #get(path, params = nil, headers = nil) ⇒ Object
-
#initialize(api_key: nil) ⇒ Client
constructor
A new instance of Client.
- #post(path, params = nil, headers = nil) ⇒ Object
Methods included from KnowledgeMethods
Methods included from DialogueMethods
Constructor Details
#initialize(api_key: nil) ⇒ Client
Returns a new instance of Client.
23 24 25 |
# File 'lib/docomoru/client.rb', line 23 def initialize(api_key: nil) @api_key = api_key end |
Instance Method Details
#get(path, params = nil, headers = nil) ⇒ Object
27 28 29 |
# File 'lib/docomoru/client.rb', line 27 def get(path, params = nil, headers = nil) process(:get, path, params, headers) end |
#post(path, params = nil, headers = nil) ⇒ Object
31 32 33 |
# File 'lib/docomoru/client.rb', line 31 def post(path, params = nil, headers = nil) process(:post, path, params, headers) end |