cwbot 0.0.1 → 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.gitignore +4 -0
- data/README.md +7 -1
- data/lib/cwbot.rb +2 -2
- data/lib/cwbot/version.rb +1 -1
- metadata +4 -5
- data/spec/#spec_helper.rb# +0 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: c075726fe46307307d1dc14778b6c0a703b90b5d
|
|
4
|
+
data.tar.gz: dd7b915d69b2abff767a0ed76b6011fcc3ecd95a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e67f68ff65286a632f25674f0b242b696576e1bb75dc6b77e161f005544566fcedcbcced3b1de2d5855a13920da74ddf28b07734a92746bef5f943ba569068ea
|
|
7
|
+
data.tar.gz: d4839119311d56de6b0c74afcf24cc2f9d1e4ffa9bb540f011a35902a59b7bd3f8ab4d2b84805f75e19f206010be458f9116551a1972d34d94cfda3a307f006e
|
data/.gitignore
CHANGED
data/README.md
CHANGED
|
@@ -18,7 +18,13 @@ Or install it yourself as:
|
|
|
18
18
|
|
|
19
19
|
## Usage
|
|
20
20
|
|
|
21
|
-
|
|
21
|
+
in a ruby code
|
|
22
|
+
|
|
23
|
+
require 'rubygems'
|
|
24
|
+
require 'cwbot'
|
|
25
|
+
|
|
26
|
+
cw = Cwbot::Cwbot.new("YOUR API KEY")
|
|
27
|
+
cw.post_message(ROOM_ID, "本文")
|
|
22
28
|
|
|
23
29
|
## Contributing
|
|
24
30
|
|
data/lib/cwbot.rb
CHANGED
|
@@ -21,9 +21,9 @@ module Cwbot
|
|
|
21
21
|
res = ApiRequest.get_request(url,@api_key)
|
|
22
22
|
end
|
|
23
23
|
|
|
24
|
-
def post_message(to_room)
|
|
24
|
+
def post_message(to_room,body)
|
|
25
25
|
url = @api_url+"/rooms/#{to_room}/messages"
|
|
26
|
-
res = ApiRequest.post_request(url,
|
|
26
|
+
res = ApiRequest.post_request(url,body,@api_key)
|
|
27
27
|
end
|
|
28
28
|
end
|
|
29
29
|
|
data/lib/cwbot/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: cwbot
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- murapi0227
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2015-05-01 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|
|
@@ -69,7 +69,6 @@ files:
|
|
|
69
69
|
- lib/cwbot.rb
|
|
70
70
|
- lib/cwbot/api_request.rb
|
|
71
71
|
- lib/cwbot/version.rb
|
|
72
|
-
- spec/#spec_helper.rb#
|
|
73
72
|
- spec/cwbot_spec.rb
|
|
74
73
|
- spec/spec_helper.rb
|
|
75
74
|
homepage: ''
|
|
@@ -92,11 +91,11 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
92
91
|
version: '0'
|
|
93
92
|
requirements: []
|
|
94
93
|
rubyforge_project:
|
|
95
|
-
rubygems_version: 2.
|
|
94
|
+
rubygems_version: 2.4.5
|
|
96
95
|
signing_key:
|
|
97
96
|
specification_version: 4
|
|
98
97
|
summary: chatwork api
|
|
99
98
|
test_files:
|
|
100
|
-
- spec/#spec_helper.rb#
|
|
101
99
|
- spec/cwbot_spec.rb
|
|
102
100
|
- spec/spec_helper.rb
|
|
101
|
+
has_rdoc:
|
data/spec/#spec_helper.rb#
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
$LOAD_PATH << File.expand_path(File.join('..', 'lib'), File.dirname(__FILE__))
|