twido 0.0.1.beta

Sign up to get free protection for your applications and to get access to all the features.
data/doc/Twido.html ADDED
@@ -0,0 +1,593 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4
+ <head>
5
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6
+ <title>
7
+ Module: Twido
8
+
9
+ &mdash; Documentation by YARD 0.8.3
10
+
11
+ </title>
12
+
13
+ <link rel="stylesheet" href="css/style.css" type="text/css" media="screen" charset="utf-8" />
14
+
15
+ <link rel="stylesheet" href="css/common.css" type="text/css" media="screen" charset="utf-8" />
16
+
17
+ <script type="text/javascript" charset="utf-8">
18
+ hasFrames = window.top.frames.main ? true : false;
19
+ relpath = '';
20
+ framesUrl = "frames.html#!" + escape(window.location.href);
21
+ </script>
22
+
23
+
24
+ <script type="text/javascript" charset="utf-8" src="js/jquery.js"></script>
25
+
26
+ <script type="text/javascript" charset="utf-8" src="js/app.js"></script>
27
+
28
+
29
+ </head>
30
+ <body>
31
+ <div id="header">
32
+ <div id="menu">
33
+
34
+ <a href="_index.html">Index (T)</a> &raquo;
35
+
36
+
37
+ <span class="title">Twido</span>
38
+
39
+
40
+ <div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
41
+ </div>
42
+
43
+ <div id="search">
44
+
45
+ <a class="full_list_link" id="class_list_link"
46
+ href="class_list.html">
47
+ Class List
48
+ </a>
49
+
50
+ <a class="full_list_link" id="method_list_link"
51
+ href="method_list.html">
52
+ Method List
53
+ </a>
54
+
55
+ <a class="full_list_link" id="file_list_link"
56
+ href="file_list.html">
57
+ File List
58
+ </a>
59
+
60
+ </div>
61
+ <div class="clear"></div>
62
+ </div>
63
+
64
+ <iframe id="search_frame"></iframe>
65
+
66
+ <div id="content"><h1>Module: Twido
67
+
68
+
69
+
70
+ </h1>
71
+
72
+ <dl class="box">
73
+
74
+
75
+
76
+
77
+
78
+
79
+
80
+
81
+ <dt class="r1 last">Defined in:</dt>
82
+ <dd class="r1 last">lib/twido.rb<span class="defines">,<br />
83
+ lib/twido/version.rb,<br /> lib/twido/authentication.rb</span>
84
+ </dd>
85
+
86
+ </dl>
87
+ <div class="clear"></div>
88
+
89
+ <h2>Defined Under Namespace</h2>
90
+ <p class="children">
91
+
92
+
93
+ <strong class="modules">Modules:</strong> <span class='object_link'><a href="Twido/Authentication.html" title="Twido::Authentication (module)">Authentication</a></span>
94
+
95
+
96
+
97
+
98
+ </p>
99
+
100
+ <h2>Constant Summary</h2>
101
+
102
+ <dl class="constants">
103
+
104
+ <dt id="VERSION-constant" class="">VERSION =
105
+
106
+ </dt>
107
+ <dd><pre class="code"><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>0.0.1.alpha</span><span class='tstring_end'>&quot;</span></span></pre></dd>
108
+
109
+ </dl>
110
+
111
+
112
+
113
+
114
+
115
+
116
+
117
+
118
+
119
+ <h2>
120
+ Class Method Summary
121
+ <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
122
+ </h2>
123
+
124
+ <ul class="summary">
125
+
126
+ <li class="public ">
127
+ <span class="summary_signature">
128
+
129
+ <a href="#authenticate-class_method" title="authenticate (class method)">+ (Object) <strong>authenticate</strong> </a>
130
+
131
+
132
+
133
+ </span>
134
+
135
+
136
+
137
+
138
+
139
+
140
+
141
+
142
+
143
+ <span class="summary_desc"><div class='inline'>
144
+ <p>authenticates the user using the authenticate method of the Authentication
145
+ module Returns a Twitter::Client Examples.</p>
146
+ </div></span>
147
+
148
+ </li>
149
+
150
+
151
+ <li class="public ">
152
+ <span class="summary_signature">
153
+
154
+ <a href="#complete-class_method" title="complete (class method)">+ (Object) <strong>complete</strong> </a>
155
+
156
+
157
+
158
+ </span>
159
+
160
+
161
+
162
+
163
+
164
+
165
+
166
+
167
+
168
+ <span class="summary_desc"><div class='inline'>
169
+ <p>removes a task from the user's to do list by deleting the tweet and
170
+ confirming Returns a string stating if task was completed or not Examples.</p>
171
+ </div></span>
172
+
173
+ </li>
174
+
175
+
176
+ <li class="public ">
177
+ <span class="summary_signature">
178
+
179
+ <a href="#list-class_method" title="list (class method)">+ (Object) <strong>list</strong> </a>
180
+
181
+
182
+
183
+ </span>
184
+
185
+
186
+
187
+
188
+
189
+
190
+
191
+
192
+
193
+ <span class="summary_desc"><div class='inline'>
194
+ <p>self.list.</p>
195
+ </div></span>
196
+
197
+ </li>
198
+
199
+
200
+ <li class="public ">
201
+ <span class="summary_signature">
202
+
203
+ <a href="#setup-class_method" title="setup (class method)">+ (Object) <strong>setup</strong> </a>
204
+
205
+
206
+
207
+ </span>
208
+
209
+
210
+
211
+
212
+
213
+
214
+
215
+
216
+
217
+ <span class="summary_desc"><div class='inline'>
218
+ <p>propts the user to set up thier account with the information needed to
219
+ register thier app Returns nil Examples.</p>
220
+ </div></span>
221
+
222
+ </li>
223
+
224
+
225
+ <li class="public ">
226
+ <span class="summary_signature">
227
+
228
+ <a href="#task-class_method" title="task (class method)">+ (Object) <strong>task</strong> </a>
229
+
230
+
231
+
232
+ </span>
233
+
234
+
235
+
236
+
237
+
238
+
239
+
240
+
241
+
242
+ <span class="summary_desc"><div class='inline'>
243
+ <p>adds a task to the user's todo list by tweeting a tweet that the user
244
+ defines and automaticly adds the "#todo" to the end Returns nil Examples.</p>
245
+ </div></span>
246
+
247
+ </li>
248
+
249
+
250
+ </ul>
251
+
252
+
253
+
254
+
255
+ <div id="class_method_details" class="method_details_list">
256
+ <h2>Class Method Details</h2>
257
+
258
+
259
+ <div class="method_details first">
260
+ <h3 class="signature first" id="authenticate-class_method">
261
+
262
+ + (<tt>Object</tt>) <strong>authenticate</strong>
263
+
264
+
265
+
266
+
267
+
268
+ </h3><div class="docstring">
269
+ <div class="discussion">
270
+
271
+ <p>authenticates the user using the authenticate method of the Authentication
272
+ module Returns a Twitter::Client Examples</p>
273
+
274
+
275
+ </div>
276
+ </div>
277
+ <div class="tags">
278
+
279
+
280
+ </div><table class="source_code">
281
+ <tr>
282
+ <td>
283
+ <pre class="lines">
284
+
285
+
286
+ 13
287
+ 14
288
+ 15</pre>
289
+ </td>
290
+ <td>
291
+ <pre class="code"><span class="info file"># File 'lib/twido.rb', line 13</span>
292
+
293
+ <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_authenticate'>authenticate</span>
294
+ <span class='ivar'>@twitter_client</span> <span class='op'>=</span> <span class='const'>Twido</span><span class='op'>::</span><span class='const'>Authentication</span><span class='period'>.</span><span class='id identifier rubyid_authenticate'>authenticate</span>
295
+ <span class='kw'>end</span></pre>
296
+ </td>
297
+ </tr>
298
+ </table>
299
+ </div>
300
+
301
+ <div class="method_details ">
302
+ <h3 class="signature " id="complete-class_method">
303
+
304
+ + (<tt>Object</tt>) <strong>complete</strong>
305
+
306
+
307
+
308
+
309
+
310
+ </h3><div class="docstring">
311
+ <div class="discussion">
312
+
313
+ <p>removes a task from the user's to do list by deleting the tweet and
314
+ confirming Returns a string stating if task was completed or not Examples</p>
315
+
316
+
317
+ </div>
318
+ </div>
319
+ <div class="tags">
320
+
321
+
322
+ </div><table class="source_code">
323
+ <tr>
324
+ <td>
325
+ <pre class="lines">
326
+
327
+
328
+ 104
329
+ 105
330
+ 106
331
+ 107
332
+ 108
333
+ 109
334
+ 110
335
+ 111
336
+ 112
337
+ 113
338
+ 114
339
+ 115
340
+ 116
341
+ 117
342
+ 118
343
+ 119
344
+ 120</pre>
345
+ </td>
346
+ <td>
347
+ <pre class="code"><span class="info file"># File 'lib/twido.rb', line 104</span>
348
+
349
+ <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_complete'>complete</span>
350
+ <span class='id identifier rubyid_twitter_client'>twitter_client</span> <span class='op'>=</span> <span class='const'>Authentication</span><span class='period'>.</span><span class='id identifier rubyid_authenticate'>authenticate</span>
351
+ <span class='id identifier rubyid_user'>user</span> <span class='op'>=</span> <span class='id identifier rubyid_twitter_client'>twitter_client</span><span class='period'>.</span><span class='id identifier rubyid_user'>user</span><span class='period'>.</span><span class='id identifier rubyid_screen_name'>screen_name</span>
352
+ <span class='id identifier rubyid_tweets'>tweets</span> <span class='op'>=</span> <span class='id identifier rubyid_twitter_client'>twitter_client</span><span class='period'>.</span><span class='id identifier rubyid_search'>search</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>#todo</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='symbol'>:count</span> <span class='op'>=&gt;</span> <span class='int'>10</span><span class='comma'>,</span> <span class='label'>from:</span><span class='id identifier rubyid_user'>user</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_statuses'>statuses</span>
353
+ <span class='id identifier rubyid_tweets'>tweets</span><span class='period'>.</span><span class='id identifier rubyid_each_with_index'>each_with_index</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_tweet'>tweet</span><span class='comma'>,</span> <span class='id identifier rubyid_index'>index</span><span class='op'>|</span> <span class='id identifier rubyid_puts'>puts</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>[</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_index'>index</span><span class='rbrace'>}</span><span class='tstring_content'>] </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_tweet'>tweet</span><span class='period'>.</span><span class='id identifier rubyid_text'>text</span><span class='rbrace'>}</span><span class='tstring_end'>&quot;</span></span> <span class='rbrace'>}</span>
354
+ <span class='id identifier rubyid_complete_index'>complete_index</span> <span class='op'>=</span> <span class='id identifier rubyid_ask'>ask</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Enter task ID: </span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
355
+ <span class='id identifier rubyid_complete'>complete</span> <span class='op'>=</span> <span class='const'>Integer</span><span class='lparen'>(</span><span class='id identifier rubyid_complete_index'>complete_index</span><span class='rparen'>)</span>
356
+ <span class='id identifier rubyid_tweet_id'>tweet_id</span> <span class='op'>=</span> <span class='id identifier rubyid_tweets'>tweets</span><span class='lbracket'>[</span><span class='id identifier rubyid_complete'>complete</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_id'>id</span>
357
+ <span class='id identifier rubyid_confirm'>confirm</span> <span class='op'>=</span> <span class='id identifier rubyid_ask'>ask</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Are you sure you completed this task?: </span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
358
+ <span class='kw'>case</span> <span class='id identifier rubyid_confirm'>confirm</span><span class='period'>.</span><span class='id identifier rubyid_downcase'>downcase</span><span class='period'>.</span><span class='id identifier rubyid_to_sym'>to_sym</span>
359
+ <span class='kw'>when</span> <span class='symbol'>:no</span><span class='comma'>,</span> <span class='symbol'>:n</span>
360
+ <span class='id identifier rubyid_puts'>puts</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Have a good and productive day!</span><span class='tstring_end'>&quot;</span></span>
361
+ <span class='kw'>when</span> <span class='symbol'>:yes</span><span class='comma'>,</span> <span class='symbol'>:y</span>
362
+ <span class='id identifier rubyid_twitter_client'>twitter_client</span><span class='period'>.</span><span class='id identifier rubyid_status_destroy'>status_destroy</span><span class='lparen'>(</span><span class='id identifier rubyid_tweet_id'>tweet_id</span><span class='rparen'>)</span>
363
+ <span class='id identifier rubyid_puts'>puts</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>TASK COMPLETED</span><span class='tstring_end'>&quot;</span></span>
364
+ <span class='kw'>end</span>
365
+ <span class='kw'>end</span></pre>
366
+ </td>
367
+ </tr>
368
+ </table>
369
+ </div>
370
+
371
+ <div class="method_details ">
372
+ <h3 class="signature " id="list-class_method">
373
+
374
+ + (<tt>Object</tt>) <strong>list</strong>
375
+
376
+
377
+
378
+
379
+
380
+ </h3><div class="docstring">
381
+ <div class="discussion">
382
+
383
+ <p>self.list</p>
384
+
385
+ <pre class="code ruby"><code># =&gt; [0] task #todo
386
+ [1] task 2 # todo
387
+ Did you complete a task?:
388
+ # =&gt; n
389
+ # =&gt; Have a good and productive day!</code></pre>
390
+
391
+ <p>self.list</p>
392
+
393
+ <pre class="code ruby"><code># =&gt; [0] task #todo
394
+ [1] task 2 # todo
395
+ Did you complete a task?:
396
+ # =&gt; g
397
+ # =&gt; TASK ERROR: ACTION NOT RECONIZED</code></pre>
398
+
399
+
400
+ </div>
401
+ </div>
402
+ <div class="tags">
403
+
404
+
405
+ </div><table class="source_code">
406
+ <tr>
407
+ <td>
408
+ <pre class="lines">
409
+
410
+
411
+ 68
412
+ 69
413
+ 70
414
+ 71
415
+ 72
416
+ 73
417
+ 74
418
+ 75
419
+ 76
420
+ 77
421
+ 78
422
+ 79
423
+ 80
424
+ 81
425
+ 82</pre>
426
+ </td>
427
+ <td>
428
+ <pre class="code"><span class="info file"># File 'lib/twido.rb', line 68</span>
429
+
430
+ <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_list'>list</span>
431
+ <span class='id identifier rubyid_twitter_client'>twitter_client</span> <span class='op'>=</span> <span class='const'>Authentication</span><span class='period'>.</span><span class='id identifier rubyid_authenticate'>authenticate</span>
432
+ <span class='id identifier rubyid_user'>user</span> <span class='op'>=</span> <span class='id identifier rubyid_twitter_client'>twitter_client</span><span class='period'>.</span><span class='id identifier rubyid_user'>user</span><span class='period'>.</span><span class='id identifier rubyid_screen_name'>screen_name</span>
433
+ <span class='id identifier rubyid_tweets'>tweets</span> <span class='op'>=</span> <span class='id identifier rubyid_twitter_client'>twitter_client</span><span class='period'>.</span><span class='id identifier rubyid_search'>search</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>#todo</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='symbol'>:count</span> <span class='op'>=&gt;</span> <span class='int'>10</span><span class='comma'>,</span> <span class='label'>from:</span><span class='id identifier rubyid_user'>user</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_statuses'>statuses</span>
434
+ <span class='id identifier rubyid_tweets'>tweets</span><span class='period'>.</span><span class='id identifier rubyid_each_with_index'>each_with_index</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_tweet'>tweet</span><span class='comma'>,</span> <span class='id identifier rubyid_index'>index</span><span class='op'>|</span> <span class='id identifier rubyid_puts'>puts</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>[</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_index'>index</span><span class='rbrace'>}</span><span class='tstring_content'>] </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_tweet'>tweet</span><span class='period'>.</span><span class='id identifier rubyid_text'>text</span><span class='rbrace'>}</span><span class='tstring_end'>&quot;</span></span> <span class='rbrace'>}</span>
435
+ <span class='id identifier rubyid_run_complete'>run_complete</span> <span class='op'>=</span> <span class='id identifier rubyid_ask'>ask</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Did you complete a task?: </span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
436
+ <span class='kw'>case</span> <span class='id identifier rubyid_run_complete'>run_complete</span><span class='period'>.</span><span class='id identifier rubyid_downcase'>downcase</span><span class='period'>.</span><span class='id identifier rubyid_to_sym'>to_sym</span>
437
+ <span class='kw'>when</span> <span class='symbol'>:yes</span><span class='comma'>,</span> <span class='symbol'>:y</span>
438
+ <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_complete'>complete</span>
439
+ <span class='kw'>when</span> <span class='symbol'>:no</span><span class='comma'>,</span> <span class='symbol'>:n</span>
440
+ <span class='id identifier rubyid_puts'>puts</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Have a good and productive day!</span><span class='tstring_end'>&quot;</span></span>
441
+ <span class='kw'>else</span>
442
+ <span class='id identifier rubyid_puts'>puts</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>ERROR: ACTION NOT RECONIZED</span><span class='tstring_end'>&quot;</span></span>
443
+ <span class='kw'>end</span>
444
+ <span class='kw'>end</span></pre>
445
+ </td>
446
+ </tr>
447
+ </table>
448
+ </div>
449
+
450
+ <div class="method_details ">
451
+ <h3 class="signature " id="setup-class_method">
452
+
453
+ + (<tt>Object</tt>) <strong>setup</strong>
454
+
455
+
456
+
457
+
458
+
459
+ </h3><div class="docstring">
460
+ <div class="discussion">
461
+
462
+ <p>propts the user to set up thier account with the information needed to
463
+ register thier app Returns nil Examples</p>
464
+
465
+
466
+ </div>
467
+ </div>
468
+ <div class="tags">
469
+
470
+
471
+ </div><table class="source_code">
472
+ <tr>
473
+ <td>
474
+ <pre class="lines">
475
+
476
+
477
+ 20
478
+ 21
479
+ 22
480
+ 23
481
+ 24
482
+ 25
483
+ 26
484
+ 27
485
+ 28
486
+ 29
487
+ 30
488
+ 31
489
+ 32
490
+ 33
491
+ 34
492
+ 35
493
+ 36
494
+ 37
495
+ 38
496
+ 39
497
+ 40
498
+ 41
499
+ 42
500
+ 43
501
+ 44</pre>
502
+ </td>
503
+ <td>
504
+ <pre class="code"><span class="info file"># File 'lib/twido.rb', line 20</span>
505
+
506
+ <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_setup'>setup</span>
507
+ <span class='id identifier rubyid_messege'>messege</span><span class='op'>=</span><span class='heredoc_beg'>&lt;&lt;-MESSEGE</span>
508
+ <span class='tstring_content'> Welcome! Before you can use Twido, you'll first need to register an
509
+ application with Twitter. Just follow the steps below:
510
+ 1. Sign in to the Twitter Developer site and click
511
+ &quot;Create a new application&quot;.
512
+ 2. Complete the required fields and submit the form.
513
+ Note: Your application must have a unique name.
514
+ We recommend: &quot;&lt;your handle&gt;/t&quot;.
515
+ 3. Go to the Settings tab of your application, and change the
516
+ Access setting to &quot;Read, Write and Access direct messages&quot;.
517
+ 4. Go to the Details tab to view the consumer key and secret,
518
+ which you'll need to copy and paste below when prompted.
519
+ </span><span class='heredoc_end'> MESSEGE
520
+ </span>
521
+ <span class='id identifier rubyid_user_info'>user_info</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span>
522
+
523
+ <span class='id identifier rubyid_puts'>puts</span> <span class='id identifier rubyid_messege'>messege</span>
524
+ <span class='id identifier rubyid_user_info'>user_info</span><span class='lbracket'>[</span><span class='symbol'>:consumer_key</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_ask'>ask</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Enter consumer key: </span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_q'>q</span><span class='op'>|</span> <span class='id identifier rubyid_q'>q</span><span class='period'>.</span><span class='id identifier rubyid_echo'>echo</span> <span class='op'>=</span> <span class='kw'>true</span> <span class='rbrace'>}</span>
525
+ <span class='id identifier rubyid_user_info'>user_info</span><span class='lbracket'>[</span><span class='symbol'>:consumer_secret</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_ask'>ask</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Enter consumer secret: </span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_q'>q</span><span class='op'>|</span> <span class='id identifier rubyid_q'>q</span><span class='period'>.</span><span class='id identifier rubyid_echo'>echo</span> <span class='op'>=</span> <span class='kw'>true</span> <span class='rbrace'>}</span>
526
+ <span class='id identifier rubyid_user_info'>user_info</span><span class='lbracket'>[</span><span class='symbol'>:oauth_token</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_ask'>ask</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Enter Oauth token: </span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_q'>q</span><span class='op'>|</span> <span class='id identifier rubyid_q'>q</span><span class='period'>.</span><span class='id identifier rubyid_echo'>echo</span> <span class='op'>=</span> <span class='kw'>true</span> <span class='rbrace'>}</span>
527
+ <span class='id identifier rubyid_user_info'>user_info</span><span class='lbracket'>[</span><span class='symbol'>:oauth_token_secret</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_ask'>ask</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Enter Oauth token secret: </span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_q'>q</span><span class='op'>|</span> <span class='id identifier rubyid_q'>q</span><span class='period'>.</span><span class='id identifier rubyid_echo'>echo</span> <span class='op'>=</span> <span class='kw'>true</span><span class='rbrace'>}</span>
528
+
529
+ <span class='const'>Authentication</span><span class='period'>.</span><span class='id identifier rubyid_write_credentials_to_config'>write_credentials_to_config</span><span class='lparen'>(</span><span class='id identifier rubyid_user_info'>user_info</span><span class='rparen'>)</span>
530
+ <span class='kw'>end</span></pre>
531
+ </td>
532
+ </tr>
533
+ </table>
534
+ </div>
535
+
536
+ <div class="method_details ">
537
+ <h3 class="signature " id="task-class_method">
538
+
539
+ + (<tt>Object</tt>) <strong>task</strong>
540
+
541
+
542
+
543
+
544
+
545
+ </h3><div class="docstring">
546
+ <div class="discussion">
547
+
548
+ <p>adds a task to the user's todo list by tweeting a tweet that the user
549
+ defines and automaticly adds the "#todo" to the end Returns nil Examples</p>
550
+
551
+
552
+ </div>
553
+ </div>
554
+ <div class="tags">
555
+
556
+
557
+ </div><table class="source_code">
558
+ <tr>
559
+ <td>
560
+ <pre class="lines">
561
+
562
+
563
+ 129
564
+ 130
565
+ 131
566
+ 132
567
+ 133</pre>
568
+ </td>
569
+ <td>
570
+ <pre class="code"><span class="info file"># File 'lib/twido.rb', line 129</span>
571
+
572
+ <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_task'>task</span>
573
+ <span class='id identifier rubyid_twitter_client'>twitter_client</span> <span class='op'>=</span> <span class='const'>Authentication</span><span class='period'>.</span><span class='id identifier rubyid_authenticate'>authenticate</span>
574
+ <span class='id identifier rubyid_task'>task</span> <span class='op'>=</span> <span class='id identifier rubyid_ask'>ask</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>What do you have to do?: </span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span> <span class='op'>+</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'> #todo</span><span class='tstring_end'>&quot;</span></span>
575
+ <span class='id identifier rubyid_twitter_client'>twitter_client</span><span class='period'>.</span><span class='id identifier rubyid_update'>update</span><span class='lparen'>(</span><span class='id identifier rubyid_task'>task</span><span class='rparen'>)</span>
576
+ <span class='kw'>end</span></pre>
577
+ </td>
578
+ </tr>
579
+ </table>
580
+ </div>
581
+
582
+ </div>
583
+
584
+ </div>
585
+
586
+ <div id="footer">
587
+ Generated on Mon Dec 17 21:39:20 2012 by
588
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
589
+ 0.8.3 (ruby-1.9.3).
590
+ </div>
591
+
592
+ </body>
593
+ </html>