slack_chatter 0.8.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,15 @@
1
+ ---
2
+ !binary "U0hBMQ==":
3
+ metadata.gz: !binary |-
4
+ OGRlNTY1N2FiMGM2Yzg1ZTk2OTEwZmEwNjZhNjNlMzZkNmVmNjYzZQ==
5
+ data.tar.gz: !binary |-
6
+ ODVjNWYzMTNhMGM3NTM5MmRhZGYxNzRkNzc0NDk1ODRjNWQxZjA3MA==
7
+ SHA512:
8
+ metadata.gz: !binary |-
9
+ MTQ0MzczYWY1NzRmM2FmZDlkMDk3Yzc2ZTkzYjE5MjVkNjdjYmE1NDBkYzcz
10
+ ZWU2OGQ3NGUzZTM4ZmJmNGNjMjYzYThhMmQ2NTYxYzI5NmNiYTZjMjk2MWM0
11
+ ZjAxZDY0ZTYwZmY5ZWIyZjRlZjc3MjZmM2JmNTk3MmE3MjI2Mjc=
12
+ data.tar.gz: !binary |-
13
+ NDM3MTY1NTNiOTgyY2VmNjE1YjliMWY5OGZlMzBkNDEzNzYxNGYyYmM0MGUx
14
+ ZTk3NTY5ZGEyYjQ4ZThjYWI0MmI0NjhmNDM5MTc3MzkwNjBiZGFlZWQyNDIw
15
+ NzRmODA0MDVlNzhiNTZkNTBhYjc2MDkzMTIzNDNhMDM4N2E5MGY=
data/.gitignore ADDED
@@ -0,0 +1,9 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /Gemfile.lock
4
+ /_yardoc/
5
+ /coverage/
6
+ /doc/
7
+ /pkg/
8
+ /spec/reports/
9
+ /tmp/
data/.rspec ADDED
@@ -0,0 +1,2 @@
1
+ --format documentation
2
+ --color
data/.travis.yml ADDED
@@ -0,0 +1,3 @@
1
+ language: ruby
2
+ rvm:
3
+ - 1.9.3
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in slack_chatter.gemspec
4
+ gemspec
data/README.md ADDED
@@ -0,0 +1,48 @@
1
+ # SlackChatter
2
+
3
+ SlackChatter is a simple-to-use Slack API wrapper for ruby which makes it quick and easy to constantly annoy your friends, co-workers, and loved ones with waaayyyyy to many process status updates. It provides easy-access to all of the functionallity supported by the Slack Api with the following exceptions:
4
+ - File uploading
5
+ - Real-Time Messaging
6
+ (These are currently in the works and should be available shortly)
7
+
8
+ ## Installation
9
+
10
+ Add this line to your application's Gemfile:
11
+
12
+ ```ruby
13
+ gem 'slack_chatter'
14
+ ```
15
+
16
+ And then execute:
17
+
18
+ $ bundle
19
+
20
+ Or install it yourself as:
21
+
22
+ $ gem install slack_chatter
23
+
24
+ ## Usage
25
+
26
+ Create a new client instance
27
+ ```ruby
28
+ client = SlackChatter::Client.new("some-slack-token")
29
+ ```
30
+
31
+ Use methods namespaced as they are in the API reference ie, to list channels:
32
+ ```ruby
33
+ client.channels.list
34
+ ```
35
+
36
+ Each of these methods requires you to provide the required attributes as explicit arguments and then add any optional arguments in an options hash with the keys and values as those expected in the Slack API doc
37
+ ```ruby
38
+ client.chat.post_message("some-channel-id", "some message to post", {option_param: })
39
+ ```
40
+
41
+
42
+ ## Contributing
43
+
44
+ 1. Fork it ( https://github.com/[my-github-username]/slack_chatter/fork )
45
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
46
+ 3. Commit your changes (`git commit -am 'Add some feature'`)
47
+ 4. Push to the branch (`git push origin my-new-feature`)
48
+ 5. Create a new Pull Request
data/Rakefile ADDED
@@ -0,0 +1 @@
1
+ require "bundler/gem_tasks"
data/bin/console ADDED
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require "bundler/setup"
4
+ require "slack_chatter"
5
+
6
+ # You can add fixtures and/or initialization code here to make experimenting
7
+ # with your gem easier. You can also use a different console, if you like.
8
+
9
+ # (If you use this, don't forget to add pry to your Gemfile!)
10
+ # require "pry"
11
+ # Pry.start
12
+
13
+ require "irb"
14
+ IRB.start
data/bin/setup ADDED
@@ -0,0 +1,7 @@
1
+ #!/bin/bash
2
+ set -euo pipefail
3
+ IFS=$'\n\t'
4
+
5
+ bundle install
6
+
7
+ # Do any other automated setup that you need to do here
@@ -0,0 +1,338 @@
1
+ api:
2
+ test:
3
+ args:
4
+ options:
5
+ error: string
6
+ foo: string
7
+
8
+ auth:
9
+ test:
10
+ args:
11
+ token: token
12
+
13
+ channels:
14
+ archive:
15
+ args:
16
+ token: token
17
+ channel: id
18
+ create:
19
+ args:
20
+ token: token
21
+ name: string
22
+ history:
23
+ args:
24
+ token: token
25
+ channel: id
26
+ options:
27
+ latest: epoch # End of time range of messages to include in results
28
+ oldest: epoch # Start of time range of messages to include in results
29
+ inclusive: bool # Include messages with latest or oldest timestamp in results (send 0/1)
30
+ count: integer # Number of messages to return, between 1 and 1000
31
+ info:
32
+ args:
33
+ token: token
34
+ channel: id
35
+ invite:
36
+ args:
37
+ token: token
38
+ channel: id
39
+ user: id
40
+ join:
41
+ args:
42
+ token: token
43
+ name: string
44
+ kick:
45
+ args:
46
+ token: token
47
+ channel: id
48
+ user: id
49
+ leave:
50
+ args:
51
+ token: token
52
+ channel: id
53
+ list:
54
+ args:
55
+ token: token
56
+ options:
57
+ exclude_archived: bool
58
+ mark:
59
+ args:
60
+ token: token
61
+ channel: id
62
+ ts: epoch
63
+ rename:
64
+ args:
65
+ token: token
66
+ channel: id
67
+ name: string
68
+ set_purpose:
69
+ args:
70
+ token: token
71
+ channel: id
72
+ purpose: string
73
+ set_topic:
74
+ args:
75
+ token: token
76
+ channel: id
77
+ topic: string
78
+ unarchive:
79
+ args:
80
+ token: token
81
+ channel: id
82
+
83
+ chat:
84
+ delete:
85
+ args:
86
+ token: token
87
+ ts: epoch
88
+ channel: id
89
+ post_message:
90
+ args:
91
+ token: token
92
+ channel: id
93
+ text: string
94
+ options:
95
+ username: string
96
+ as_user: bool
97
+ parse: formatting
98
+ link_names: formatting
99
+ attachements: json_array
100
+ unfurl_links: bool
101
+ unfurl_media: bool
102
+ icon_emoji: emoji_string
103
+ update:
104
+ args:
105
+ token: token
106
+ ts: epoch
107
+ channel: id
108
+ text: string
109
+
110
+ emoji:
111
+ list:
112
+ args:
113
+ token: token
114
+
115
+ files:
116
+ delete:
117
+ args:
118
+ token: token
119
+ file: id
120
+ info:
121
+ args:
122
+ token: token
123
+ file: id
124
+ options:
125
+ count: integer
126
+ page: integer
127
+ list:
128
+ args:
129
+ token: token
130
+ options:
131
+ user: id
132
+ ts_from: epoch
133
+ ts_to: epoch
134
+ types: {multi_choice: ["all", "posts", "snippets", "images", "gdocs", "zips", "pdfs"]}
135
+ count: integer
136
+ page: integer
137
+ # upload:
138
+ # args:
139
+ # token: token
140
+ # options:
141
+ # file: file_contents
142
+ # content: file_contents
143
+ # filetype: string
144
+ # filename: string
145
+ # title: string
146
+ # initial_comment: string
147
+ # channels: id_list
148
+
149
+ groups:
150
+ archive:
151
+ args:
152
+ token: token
153
+ channel: id
154
+ close:
155
+ args:
156
+ token: token
157
+ channel: id
158
+ create:
159
+ args:
160
+ token: token
161
+ name: string
162
+ create_child:
163
+ args:
164
+ token: token
165
+ channel: id
166
+ history:
167
+ args:
168
+ token: token
169
+ channel: id
170
+ options:
171
+ latest: epoch # End of time range of messages to include in results
172
+ oldest: epoch # Start of time range of messages to include in results
173
+ inclusive: bool # Include messages with latest or oldest timestamp in results (send 0/1)
174
+ count: integer # Number of messages to return, between 1 and 1000
175
+ info:
176
+ args:
177
+ token: token
178
+ channel: id
179
+ invite:
180
+ args:
181
+ token: token
182
+ channel: id
183
+ user: id
184
+ kick:
185
+ args:
186
+ token: token
187
+ channel: id
188
+ user: id
189
+ leave:
190
+ args:
191
+ token: token
192
+ channel: id
193
+ list:
194
+ args:
195
+ token: token
196
+ options:
197
+ exclude_archived: bool
198
+ mark:
199
+ args:
200
+ token: token
201
+ channel: id
202
+ ts: epoch
203
+ open:
204
+ args:
205
+ token: token
206
+ channel: id
207
+ rename:
208
+ args:
209
+ token: token
210
+ channel: id
211
+ name: string
212
+ set_purpose:
213
+ args:
214
+ token: token
215
+ channel: id
216
+ purpose: string
217
+ set_topic:
218
+ args:
219
+ token: token
220
+ channel: id
221
+ topic: string
222
+ unarchive:
223
+ args:
224
+ token: token
225
+ channel: id
226
+
227
+ im:
228
+ close:
229
+ args:
230
+ token: token
231
+ channel: id
232
+ history:
233
+ args:
234
+ token: token
235
+ channel: id
236
+ options:
237
+ latest: epoch # End of time range of messages to include in results
238
+ oldest: epoch # Start of time range of messages to include in results
239
+ inclusive: bool # Include messages with latest or oldest timestamp in results (send 0/1)
240
+ count: integer # Number of messages to return, between 1 and 1000
241
+ list:
242
+ args:
243
+ token: token
244
+ mark:
245
+ args:
246
+ token: token
247
+ channel: id
248
+ ts: epoch
249
+ open:
250
+ args:
251
+ token: token
252
+ channel: id
253
+
254
+ oauth:
255
+ access:
256
+ args:
257
+ client_id: string
258
+ client_secret: string
259
+ code: string
260
+ options:
261
+ redirect_uri: url
262
+
263
+ # rtm:
264
+ # start:
265
+ # args:
266
+ # token: token
267
+
268
+ search:
269
+ all:
270
+ args:
271
+ token: token
272
+ query: string
273
+ options:
274
+ sort: {choice: ["choice", "timestamp"]}
275
+ sort_dir: {choice: ["asc", "desc"]}
276
+ highlight: {choice: ["1"]}
277
+ count: integer
278
+ page: integer
279
+ files:
280
+ args:
281
+ token: token
282
+ query: string
283
+ options:
284
+ sort: {choice: ["choice", "timestamp"]}
285
+ sort_dir: {choice: ["asc", "desc"]}
286
+ highlight: {choice: ["1"]}
287
+ count: integer
288
+ page: integer
289
+ messages:
290
+ args:
291
+ token: token
292
+ query: string
293
+ options:
294
+ sort: {choice: ["choice", "timestamp"]}
295
+ sort_dir: {choice: ["asc", "desc"]}
296
+ highlight: {choice: ["1"]}
297
+ count: integer
298
+ page: integer
299
+
300
+ stars:
301
+ list:
302
+ args:
303
+ token: token
304
+ options:
305
+ user: id
306
+ count: integer
307
+ page: integer
308
+
309
+ team:
310
+ access_logs:
311
+ args:
312
+ token: token
313
+ options:
314
+ count: integer
315
+ page: integer
316
+ info:
317
+ args:
318
+ token: token
319
+
320
+ users:
321
+ get_presence:
322
+ args:
323
+ token: token
324
+ user: id
325
+ info:
326
+ args:
327
+ token: token
328
+ user: id
329
+ list:
330
+ args:
331
+ token: token
332
+ set_active:
333
+ args:
334
+ token: token
335
+ set_presence:
336
+ args:
337
+ token: token
338
+ presence: {choice: ["auto","away"]}