direct7 0.0.1 → 0.0.8
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/doc/Direct7/AuthenticationError.html +206 -0
- data/doc/Direct7/BadRequest.html +124 -0
- data/doc/Direct7/Client.html +1125 -0
- data/doc/Direct7/ClientError.html +124 -0
- data/doc/Direct7/InsufficientCreditError.html +124 -0
- data/doc/Direct7/NUMBER_LOOKUP.html +283 -0
- data/doc/Direct7/NotFoundError.html +124 -0
- data/doc/Direct7/SLACK.html +349 -0
- data/doc/Direct7/SMS.html +349 -0
- data/doc/Direct7/ServerError.html +124 -0
- data/doc/Direct7/VERIFY.html +493 -0
- data/doc/Direct7/VIBER.html +351 -0
- data/doc/Direct7/ValidationError.html +124 -0
- data/doc/Direct7/WHATSAPP.html +527 -0
- data/doc/Direct7.html +133 -0
- data/doc/_index.html +272 -0
- data/doc/class_list.html +51 -0
- data/doc/css/common.css +1 -0
- data/doc/css/full_list.css +58 -0
- data/doc/css/style.css +497 -0
- data/doc/file.README.html +253 -0
- data/doc/file_list.html +56 -0
- data/doc/frames.html +17 -0
- data/doc/index.html +253 -0
- data/doc/js/app.js +314 -0
- data/doc/js/full_list.js +216 -0
- data/doc/js/jquery.js +4 -0
- data/doc/method_list.html +331 -0
- data/doc/top-level-namespace.html +110 -0
- data/lib/direct7/version.rb +2 -2
- data/lib/direct7.rb +1 -0
- metadata +47 -3
@@ -0,0 +1,349 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<meta charset="utf-8">
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
6
|
+
<title>
|
7
|
+
Class: Direct7::SLACK
|
8
|
+
|
9
|
+
— Documentation by YARD 0.9.34
|
10
|
+
|
11
|
+
</title>
|
12
|
+
|
13
|
+
<link rel="stylesheet" href="../css/style.css" type="text/css" />
|
14
|
+
|
15
|
+
<link rel="stylesheet" href="../css/common.css" type="text/css" />
|
16
|
+
|
17
|
+
<script type="text/javascript">
|
18
|
+
pathId = "Direct7::SLACK";
|
19
|
+
relpath = '../';
|
20
|
+
</script>
|
21
|
+
|
22
|
+
|
23
|
+
<script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
|
24
|
+
|
25
|
+
<script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
|
26
|
+
|
27
|
+
|
28
|
+
</head>
|
29
|
+
<body>
|
30
|
+
<div class="nav_wrap">
|
31
|
+
<iframe id="nav" src="../class_list.html?1"></iframe>
|
32
|
+
<div id="resizer"></div>
|
33
|
+
</div>
|
34
|
+
|
35
|
+
<div id="main" tabindex="-1">
|
36
|
+
<div id="header">
|
37
|
+
<div id="menu">
|
38
|
+
|
39
|
+
<a href="../_index.html">Index (S)</a> »
|
40
|
+
<span class='title'><span class='object_link'><a href="../Direct7.html" title="Direct7 (module)">Direct7</a></span></span>
|
41
|
+
»
|
42
|
+
<span class="title">SLACK</span>
|
43
|
+
|
44
|
+
</div>
|
45
|
+
|
46
|
+
<div id="search">
|
47
|
+
|
48
|
+
<a class="full_list_link" id="class_list_link"
|
49
|
+
href="../class_list.html">
|
50
|
+
|
51
|
+
<svg width="24" height="24">
|
52
|
+
<rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
|
53
|
+
<rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
|
54
|
+
<rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
|
55
|
+
</svg>
|
56
|
+
</a>
|
57
|
+
|
58
|
+
</div>
|
59
|
+
<div class="clear"></div>
|
60
|
+
</div>
|
61
|
+
|
62
|
+
<div id="content"><h1>Class: Direct7::SLACK
|
63
|
+
|
64
|
+
|
65
|
+
|
66
|
+
</h1>
|
67
|
+
<div class="box_info">
|
68
|
+
|
69
|
+
<dl>
|
70
|
+
<dt>Inherits:</dt>
|
71
|
+
<dd>
|
72
|
+
<span class="inheritName">Object</span>
|
73
|
+
|
74
|
+
<ul class="fullTree">
|
75
|
+
<li>Object</li>
|
76
|
+
|
77
|
+
<li class="next">Direct7::SLACK</li>
|
78
|
+
|
79
|
+
</ul>
|
80
|
+
<a href="#" class="inheritanceTree">show all</a>
|
81
|
+
|
82
|
+
</dd>
|
83
|
+
</dl>
|
84
|
+
|
85
|
+
|
86
|
+
|
87
|
+
|
88
|
+
|
89
|
+
|
90
|
+
|
91
|
+
|
92
|
+
|
93
|
+
|
94
|
+
|
95
|
+
<dl>
|
96
|
+
<dt>Defined in:</dt>
|
97
|
+
<dd>lib/direct7/slack.rb</dd>
|
98
|
+
</dl>
|
99
|
+
|
100
|
+
</div>
|
101
|
+
|
102
|
+
|
103
|
+
|
104
|
+
|
105
|
+
|
106
|
+
|
107
|
+
|
108
|
+
|
109
|
+
|
110
|
+
<h2>
|
111
|
+
Instance Method Summary
|
112
|
+
<small><a href="#" class="summary_toggle">collapse</a></small>
|
113
|
+
</h2>
|
114
|
+
|
115
|
+
<ul class="summary">
|
116
|
+
|
117
|
+
<li class="public ">
|
118
|
+
<span class="summary_signature">
|
119
|
+
|
120
|
+
<a href="#get_status-instance_method" title="#get_status (instance method)">#<strong>get_status</strong>(request_id) ⇒ Object </a>
|
121
|
+
|
122
|
+
|
123
|
+
|
124
|
+
</span>
|
125
|
+
|
126
|
+
|
127
|
+
|
128
|
+
|
129
|
+
|
130
|
+
|
131
|
+
|
132
|
+
|
133
|
+
|
134
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
135
|
+
|
136
|
+
</li>
|
137
|
+
|
138
|
+
|
139
|
+
<li class="public ">
|
140
|
+
<span class="summary_signature">
|
141
|
+
|
142
|
+
<a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(client) ⇒ SLACK </a>
|
143
|
+
|
144
|
+
|
145
|
+
|
146
|
+
</span>
|
147
|
+
|
148
|
+
|
149
|
+
<span class="note title constructor">constructor</span>
|
150
|
+
|
151
|
+
|
152
|
+
|
153
|
+
|
154
|
+
|
155
|
+
|
156
|
+
|
157
|
+
|
158
|
+
<span class="summary_desc"><div class='inline'>
|
159
|
+
<p>A new instance of SLACK.</p>
|
160
|
+
</div></span>
|
161
|
+
|
162
|
+
</li>
|
163
|
+
|
164
|
+
|
165
|
+
<li class="public ">
|
166
|
+
<span class="summary_signature">
|
167
|
+
|
168
|
+
<a href="#send_slack_message-instance_method" title="#send_slack_message (instance method)">#<strong>send_slack_message</strong>(content, work_space_name, channel_name, report_url = nil) ⇒ Object </a>
|
169
|
+
|
170
|
+
|
171
|
+
|
172
|
+
</span>
|
173
|
+
|
174
|
+
|
175
|
+
|
176
|
+
|
177
|
+
|
178
|
+
|
179
|
+
|
180
|
+
|
181
|
+
|
182
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
183
|
+
|
184
|
+
</li>
|
185
|
+
|
186
|
+
|
187
|
+
</ul>
|
188
|
+
|
189
|
+
|
190
|
+
<div id="constructor_details" class="method_details_list">
|
191
|
+
<h2>Constructor Details</h2>
|
192
|
+
|
193
|
+
<div class="method_details first">
|
194
|
+
<h3 class="signature first" id="initialize-instance_method">
|
195
|
+
|
196
|
+
#<strong>initialize</strong>(client) ⇒ <tt><span class='object_link'><a href="" title="Direct7::SLACK (class)">SLACK</a></span></tt>
|
197
|
+
|
198
|
+
|
199
|
+
|
200
|
+
|
201
|
+
|
202
|
+
</h3><div class="docstring">
|
203
|
+
<div class="discussion">
|
204
|
+
|
205
|
+
<p>Returns a new instance of SLACK.</p>
|
206
|
+
|
207
|
+
|
208
|
+
</div>
|
209
|
+
</div>
|
210
|
+
<div class="tags">
|
211
|
+
|
212
|
+
|
213
|
+
</div><table class="source_code">
|
214
|
+
<tr>
|
215
|
+
<td>
|
216
|
+
<pre class="lines">
|
217
|
+
|
218
|
+
|
219
|
+
8
|
220
|
+
9
|
221
|
+
10
|
222
|
+
11</pre>
|
223
|
+
</td>
|
224
|
+
<td>
|
225
|
+
<pre class="code"><span class="info file"># File 'lib/direct7/slack.rb', line 8</span>
|
226
|
+
|
227
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_client'>client</span><span class='rparen'>)</span>
|
228
|
+
<span class='ivar'>@client</span> <span class='op'>=</span> <span class='id identifier rubyid_client'>client</span>
|
229
|
+
<span class='ivar'>@log</span> <span class='op'>=</span> <span class='const'>Logger</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='const'>STDOUT</span><span class='rparen'>)</span> <span class='comment'># You can customize the log destination as needed
|
230
|
+
</span><span class='kw'>end</span></pre>
|
231
|
+
</td>
|
232
|
+
</tr>
|
233
|
+
</table>
|
234
|
+
</div>
|
235
|
+
|
236
|
+
</div>
|
237
|
+
|
238
|
+
|
239
|
+
<div id="instance_method_details" class="method_details_list">
|
240
|
+
<h2>Instance Method Details</h2>
|
241
|
+
|
242
|
+
|
243
|
+
<div class="method_details first">
|
244
|
+
<h3 class="signature first" id="get_status-instance_method">
|
245
|
+
|
246
|
+
#<strong>get_status</strong>(request_id) ⇒ <tt>Object</tt>
|
247
|
+
|
248
|
+
|
249
|
+
|
250
|
+
|
251
|
+
|
252
|
+
</h3><table class="source_code">
|
253
|
+
<tr>
|
254
|
+
<td>
|
255
|
+
<pre class="lines">
|
256
|
+
|
257
|
+
|
258
|
+
32
|
259
|
+
33
|
260
|
+
34
|
261
|
+
35
|
262
|
+
36</pre>
|
263
|
+
</td>
|
264
|
+
<td>
|
265
|
+
<pre class="code"><span class="info file"># File 'lib/direct7/slack.rb', line 32</span>
|
266
|
+
|
267
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_get_status'>get_status</span><span class='lparen'>(</span><span class='id identifier rubyid_request_id'>request_id</span><span class='rparen'>)</span>
|
268
|
+
<span class='id identifier rubyid_response'>response</span> <span class='op'>=</span> <span class='ivar'>@client</span><span class='period'>.</span><span class='id identifier rubyid_get'>get</span><span class='lparen'>(</span><span class='ivar'>@client</span><span class='period'>.</span><span class='id identifier rubyid_host'>host</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>/report/v1/message-log/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_request_id'>request_id</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span>
|
269
|
+
<span class='ivar'>@log</span><span class='period'>.</span><span class='id identifier rubyid_info'>info</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>Message status retrieved successfully.</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span>
|
270
|
+
<span class='id identifier rubyid_response'>response</span>
|
271
|
+
<span class='kw'>end</span></pre>
|
272
|
+
</td>
|
273
|
+
</tr>
|
274
|
+
</table>
|
275
|
+
</div>
|
276
|
+
|
277
|
+
<div class="method_details ">
|
278
|
+
<h3 class="signature " id="send_slack_message-instance_method">
|
279
|
+
|
280
|
+
#<strong>send_slack_message</strong>(content, work_space_name, channel_name, report_url = nil) ⇒ <tt>Object</tt>
|
281
|
+
|
282
|
+
|
283
|
+
|
284
|
+
|
285
|
+
|
286
|
+
</h3><table class="source_code">
|
287
|
+
<tr>
|
288
|
+
<td>
|
289
|
+
<pre class="lines">
|
290
|
+
|
291
|
+
|
292
|
+
13
|
293
|
+
14
|
294
|
+
15
|
295
|
+
16
|
296
|
+
17
|
297
|
+
18
|
298
|
+
19
|
299
|
+
20
|
300
|
+
21
|
301
|
+
22
|
302
|
+
23
|
303
|
+
24
|
304
|
+
25
|
305
|
+
26
|
306
|
+
27
|
307
|
+
28
|
308
|
+
29
|
309
|
+
30</pre>
|
310
|
+
</td>
|
311
|
+
<td>
|
312
|
+
<pre class="code"><span class="info file"># File 'lib/direct7/slack.rb', line 13</span>
|
313
|
+
|
314
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_send_slack_message'>send_slack_message</span><span class='lparen'>(</span><span class='id identifier rubyid_content'>content</span><span class='comma'>,</span> <span class='id identifier rubyid_work_space_name'>work_space_name</span><span class='comma'>,</span> <span class='id identifier rubyid_channel_name'>channel_name</span><span class='comma'>,</span> <span class='id identifier rubyid_report_url'>report_url</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='rparen'>)</span>
|
315
|
+
<span class='id identifier rubyid_message'>message</span> <span class='op'>=</span> <span class='lbrace'>{</span>
|
316
|
+
<span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>channel</span><span class='tstring_end'>'</span></span> <span class='op'>=></span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>slack</span><span class='tstring_end'>'</span></span><span class='comma'>,</span>
|
317
|
+
<span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>content</span><span class='tstring_end'>'</span></span> <span class='op'>=></span> <span class='id identifier rubyid_content'>content</span><span class='comma'>,</span>
|
318
|
+
<span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>work_space_name</span><span class='tstring_end'>'</span></span> <span class='op'>=></span> <span class='id identifier rubyid_work_space_name'>work_space_name</span><span class='comma'>,</span>
|
319
|
+
<span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>channel_name</span><span class='tstring_end'>'</span></span> <span class='op'>=></span> <span class='id identifier rubyid_channel_name'>channel_name</span>
|
320
|
+
<span class='rbrace'>}</span>
|
321
|
+
<span class='id identifier rubyid_message_globals'>message_globals</span> <span class='op'>=</span> <span class='lbrace'>{</span>
|
322
|
+
<span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>report_url</span><span class='tstring_end'>'</span></span> <span class='op'>=></span> <span class='id identifier rubyid_report_url'>report_url</span>
|
323
|
+
<span class='rbrace'>}</span>
|
324
|
+
<span class='id identifier rubyid_response'>response</span> <span class='op'>=</span> <span class='ivar'>@client</span><span class='period'>.</span><span class='id identifier rubyid_post'>post</span><span class='lparen'>(</span><span class='ivar'>@client</span><span class='period'>.</span><span class='id identifier rubyid_host'>host</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>/messages/v1/send</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='kw'>true</span><span class='comma'>,</span> <span class='id identifier rubyid_params'>params</span><span class='op'>=</span> <span class='lbrace'>{</span>
|
325
|
+
<span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>messages</span><span class='tstring_end'>'</span></span> <span class='op'>=></span> <span class='lbracket'>[</span><span class='id identifier rubyid_message'>message</span><span class='rbracket'>]</span><span class='comma'>,</span>
|
326
|
+
<span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>message_globals</span><span class='tstring_end'>'</span></span> <span class='op'>=></span> <span class='id identifier rubyid_message_globals'>message_globals</span>
|
327
|
+
<span class='rbrace'>}</span><span class='rparen'>)</span>
|
328
|
+
|
329
|
+
<span class='ivar'>@log</span><span class='period'>.</span><span class='id identifier rubyid_info'>info</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>Message sent successfully.</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span>
|
330
|
+
<span class='id identifier rubyid_response'>response</span>
|
331
|
+
<span class='kw'>end</span></pre>
|
332
|
+
</td>
|
333
|
+
</tr>
|
334
|
+
</table>
|
335
|
+
</div>
|
336
|
+
|
337
|
+
</div>
|
338
|
+
|
339
|
+
</div>
|
340
|
+
|
341
|
+
<div id="footer">
|
342
|
+
Generated on Fri Nov 3 09:22:45 2023 by
|
343
|
+
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
344
|
+
0.9.34 (ruby-2.7.4).
|
345
|
+
</div>
|
346
|
+
|
347
|
+
</div>
|
348
|
+
</body>
|
349
|
+
</html>
|