docomoru 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -0
- data/README.md +6 -6
- data/docomoru.gemspec +1 -1
- data/lib/docomoru/client.rb +6 -0
- data/lib/docomoru/knowledge_methods.rb +13 -0
- data/lib/docomoru/version.rb +1 -1
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8938cee1dc86c5fcbb4b03212e03bc8796edf776
|
4
|
+
data.tar.gz: 219bb80f68c6ab072efaeac56d9413c0b8da7bed
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9f3e7b75bc937acb886709466ce14a1c7a34f4672d06320da05f524dd9b943abc446c1b9ebe5c4d4858dd25788f55e2e6decb67a3326ba950b7a2dac6fdb4e85
|
7
|
+
data.tar.gz: fd3af2dd9e9f676e44d039307010875c80502c6a27ec12f27cefd211ba098b72f5e8d8a4aafc0d971cdf4ab682511801bcb65e5ef0c3c69f7738865ad2e4c1f4
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
# Docomoru
|
2
|
-
Client library for
|
2
|
+
Client library for docomo API written in Ruby.
|
3
3
|
|
4
4
|
## Install
|
5
5
|
Note: requires Ruby 2.0.0 or higher.
|
@@ -9,8 +9,7 @@ gem install docomoru
|
|
9
9
|
```
|
10
10
|
|
11
11
|
## Library
|
12
|
-
Currenty
|
13
|
-
(You need DoCoMo API Key).
|
12
|
+
Currenty Docomoru is supporting [Dialogue API](https://dev.smt.docomo.ne.jp/?p=docs.api.page&api_docs_id=3) & [Knowledge Q&A API](https://dev.smt.docomo.ne.jp/?p=docs.api.page&api_docs_id=6).
|
14
13
|
|
15
14
|
```rb
|
16
15
|
client = Docomoru::Client.new(api_key: ENV["DOCOMO_API_KEY"])
|
@@ -43,11 +42,12 @@ $ docomoru <method> <arguments> [options]
|
|
43
42
|
| | --header
|
44
43
|
| | --no-body
|
45
44
|
| |
|
46
|
-
|
|
45
|
+
| `------------- required arguments for the method
|
47
46
|
|
|
48
|
-
|
47
|
+
`------------------------ method name
|
49
48
|
|
50
|
-
$ docomoru create_dialogue
|
49
|
+
$ docomoru create_dialogue かわいい
|
50
|
+
$ docomoru create_knowledge Rubyの作者は誰ですか
|
51
51
|
```
|
52
52
|
|
53
53
|
![](images/cli.png)
|
data/docomoru.gemspec
CHANGED
@@ -7,7 +7,7 @@ Gem::Specification.new do |spec|
|
|
7
7
|
spec.version = Docomoru::VERSION
|
8
8
|
spec.authors = ["Ryo Nakamura"]
|
9
9
|
spec.email = ["r7kamura@gmail.com"]
|
10
|
-
spec.summary = "Client library for
|
10
|
+
spec.summary = "Client library for docomo API written in Ruby."
|
11
11
|
spec.homepage = "https://github.com/r7kamura/docomoru"
|
12
12
|
spec.license = "MIT"
|
13
13
|
|
data/lib/docomoru/client.rb
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
require "docomoru/dialogue_methods"
|
2
|
+
require "docomoru/knowledge_methods"
|
2
3
|
require "docomoru/response"
|
3
4
|
require "docomoru/version"
|
4
5
|
require "active_support/core_ext/object/to_query"
|
@@ -17,12 +18,17 @@ module Docomoru
|
|
17
18
|
}
|
18
19
|
|
19
20
|
include DialogueMethods
|
21
|
+
include KnowledgeMethods
|
20
22
|
|
21
23
|
# @param [String] api_key APIKEY issued from DoCoMo.
|
22
24
|
def initialize(api_key: nil)
|
23
25
|
@api_key = api_key
|
24
26
|
end
|
25
27
|
|
28
|
+
def get(path, params = nil, headers = nil)
|
29
|
+
process(:get, path, params, headers)
|
30
|
+
end
|
31
|
+
|
26
32
|
def post(path, params = nil, headers = nil)
|
27
33
|
process(:post, path, params, headers)
|
28
34
|
end
|
data/lib/docomoru/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: docomoru
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ryo Nakamura
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-12-
|
11
|
+
date: 2014-12-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -161,6 +161,7 @@ files:
|
|
161
161
|
- lib/docomoru/commands/error.rb
|
162
162
|
- lib/docomoru/commands/request.rb
|
163
163
|
- lib/docomoru/dialogue_methods.rb
|
164
|
+
- lib/docomoru/knowledge_methods.rb
|
164
165
|
- lib/docomoru/response.rb
|
165
166
|
- lib/docomoru/response_renderer.rb
|
166
167
|
- lib/docomoru/version.rb
|
@@ -187,6 +188,6 @@ rubyforge_project:
|
|
187
188
|
rubygems_version: 2.2.2
|
188
189
|
signing_key:
|
189
190
|
specification_version: 4
|
190
|
-
summary: Client library for
|
191
|
+
summary: Client library for docomo API written in Ruby.
|
191
192
|
test_files: []
|
192
193
|
has_rdoc:
|