]> git.r.bdr.sh - rbdr/lyricli.rb/blame_incremental - doc/Lyricli.html
Update README
[rbdr/lyricli.rb] / doc / Lyricli.html
... / ...
CommitLineData
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: Lyricli
8
9 &mdash; Documentation by YARD 0.8.2.1
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 (L)</a> &raquo;
35
36
37 <span class="title">Lyricli</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: Lyricli
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/lyricli.rb<span class="defines">,<br />
83 lib/lyricli/util.rb,<br /> lib/lyricli/sources.rb,<br /> lib/lyricli/lyricli.rb,<br /> lib/lyricli/exceptions.rb,<br /> lib/lyricli/sources/rdio.rb,<br /> lib/lyricli/configuration.rb,<br /> lib/lyricli/lyrics_engine.rb,<br /> lib/lyricli/sources/itunes.rb,<br /> lib/lyricli/source_manager.rb,<br /> lib/lyricli/sources/arguments.rb,<br /> lib/lyricli/exceptions/reset_source_error.rb,<br /> lib/lyricli/exceptions/start_source_error.rb,<br /> lib/lyricli/exceptions/enable_source_error.rb,<br /> lib/lyricli/exceptions/unknown_source_error.rb,<br /> lib/lyricli/exceptions/invalid_lyrics_error.rb,<br /> lib/lyricli/exceptions/disable_source_error.rb,<br /> lib/lyricli/exceptions/lyrics_not_found_error.rb,<br /> lib/lyricli/exceptions/source_configuration_error.rb</span>
84</dd>
85
86</dl>
87<div class="clear"></div>
88
89<h2>Overview</h2><div class="docstring">
90 <div class="discussion">
91 <p>
92The Lyricli module allows you to easily search for lyrics by looking for
93song and artist data from diverse sources.
94</p>
95
96
97 </div>
98</div>
99<div class="tags">
100
101
102</div><h2>Defined Under Namespace</h2>
103<p class="children">
104
105
106 <strong class="modules">Modules:</strong> <span class='object_link'><a href="Lyricli/Exceptions.html" title="Lyricli::Exceptions (module)">Exceptions</a></span>, <span class='object_link'><a href="Lyricli/Sources.html" title="Lyricli::Sources (module)">Sources</a></span>, <span class='object_link'><a href="Lyricli/Util.html" title="Lyricli::Util (module)">Util</a></span>
107
108
109
110 <strong class="classes">Classes:</strong> <span class='object_link'><a href="Lyricli/Configuration.html" title="Lyricli::Configuration (class)">Configuration</a></span>, <span class='object_link'><a href="Lyricli/Lyricli.html" title="Lyricli::Lyricli (class)">Lyricli</a></span>, <span class='object_link'><a href="Lyricli/LyricsEngine.html" title="Lyricli::LyricsEngine (class)">LyricsEngine</a></span>, <span class='object_link'><a href="Lyricli/SourceManager.html" title="Lyricli::SourceManager (class)">SourceManager</a></span>
111
112
113</p>
114
115
116
117
118
119
120
121
122 <h2>
123 Class Method Summary
124 <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
125 </h2>
126
127 <ul class="summary">
128
129 <li class="public ">
130 <span class="summary_signature">
131
132 <a href="#disable-class_method" title="disable (class method)">+ (Object) <strong>disable</strong>(source_name) </a>
133
134
135
136 </span>
137
138
139
140
141
142
143
144
145
146 <span class="summary_desc"><div class='inline'><p>
147Disables a source via the Source Manager.
148</p>
149</div></span>
150
151</li>
152
153
154 <li class="public ">
155 <span class="summary_signature">
156
157 <a href="#enable-class_method" title="enable (class method)">+ (Object) <strong>enable</strong>(source_name) </a>
158
159
160
161 </span>
162
163
164
165
166
167
168
169
170
171 <span class="summary_desc"><div class='inline'><p>
172Enables a source via the Source Manager.
173</p>
174</div></span>
175
176</li>
177
178
179 <li class="public ">
180 <span class="summary_signature">
181
182 <a href="#lyrics-class_method" title="lyrics (class method)">+ (String) <strong>lyrics</strong> </a>
183
184
185
186 </span>
187
188
189
190
191
192
193
194
195
196 <span class="summary_desc"><div class='inline'><p>
197Creates a new Lyricli instance and returns lyrics by going through the
198sources.
199</p>
200</div></span>
201
202</li>
203
204
205 <li class="public ">
206 <span class="summary_signature">
207
208 <a href="#reset-class_method" title="reset (class method)">+ (Object) <strong>reset</strong>(source_name) </a>
209
210
211
212 </span>
213
214
215
216
217
218
219
220
221
222 <span class="summary_desc"><div class='inline'><p>
223Resets all configuration for a source via the Source Manager.
224</p>
225</div></span>
226
227</li>
228
229
230 <li class="public ">
231 <span class="summary_signature">
232
233 <a href="#sources-class_method" title="sources (class method)">+ (String) <strong>sources</strong> </a>
234
235
236
237 </span>
238
239
240
241
242
243
244
245
246
247 <span class="summary_desc"><div class='inline'><p>
248Returns a list of the available sources to enable or disable.
249</p>
250</div></span>
251
252</li>
253
254
255 <li class="public ">
256 <span class="summary_signature">
257
258 <a href="#version-class_method" title="version (class method)">+ (String) <strong>version</strong> </a>
259
260
261
262 </span>
263
264
265
266
267
268
269
270
271
272 <span class="summary_desc"><div class='inline'><p>
273Returns the version of the library.
274</p>
275</div></span>
276
277</li>
278
279
280 </ul>
281
282
283
284
285 <div id="class_method_details" class="method_details_list">
286 <h2>Class Method Details</h2>
287
288
289 <div class="method_details first">
290 <h3 class="signature first" id="disable-class_method">
291
292 + (<tt>Object</tt>) <strong>disable</strong>(source_name)
293
294
295
296
297
298</h3><div class="docstring">
299 <div class="discussion">
300 <p>
301Disables a source via the Source Manager
302</p>
303
304
305 </div>
306</div>
307<div class="tags">
308
309
310</div><table class="source_code">
311 <tr>
312 <td>
313 <pre class="lines">
314
315
31670
31771
31872
31973
32074
32175
32276
32377</pre>
324 </td>
325 <td>
326 <pre class="code"><span class="info file"># File 'lib/lyricli.rb', line 70</span>
327
328<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_disable'>disable</span><span class='lparen'>(</span><span class='id identifier rubyid_source_name'>source_name</span><span class='rparen'>)</span>
329 <span class='id identifier rubyid_source_manager'>source_manager</span> <span class='op'>=</span> <span class='const'>SourceManager</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span>
330 <span class='kw'>begin</span>
331 <span class='id identifier rubyid_source_manager'>source_manager</span><span class='period'>.</span><span class='id identifier rubyid_disable'>disable</span><span class='lparen'>(</span><span class='id identifier rubyid_source_name'>source_name</span><span class='rparen'>)</span>
332 <span class='kw'>rescue</span> <span class='const'>Exceptions</span><span class='op'>::</span><span class='const'>UnknownSourceError</span>
333 <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>There is no such Source</span><span class='tstring_end'>&quot;</span></span>
334 <span class='kw'>end</span>
335<span class='kw'>end</span></pre>
336 </td>
337 </tr>
338</table>
339</div>
340
341 <div class="method_details ">
342 <h3 class="signature " id="enable-class_method">
343
344 + (<tt>Object</tt>) <strong>enable</strong>(source_name)
345
346
347
348
349
350</h3><div class="docstring">
351 <div class="discussion">
352 <p>
353Enables a source via the Source Manager
354</p>
355
356
357 </div>
358</div>
359<div class="tags">
360
361
362</div><table class="source_code">
363 <tr>
364 <td>
365 <pre class="lines">
366
367
36860
36961
37062
37163
37264
37365
37466
37567</pre>
376 </td>
377 <td>
378 <pre class="code"><span class="info file"># File 'lib/lyricli.rb', line 60</span>
379
380<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_enable'>enable</span><span class='lparen'>(</span><span class='id identifier rubyid_source_name'>source_name</span><span class='rparen'>)</span>
381 <span class='id identifier rubyid_source_manager'>source_manager</span> <span class='op'>=</span> <span class='const'>SourceManager</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span>
382 <span class='kw'>begin</span>
383 <span class='id identifier rubyid_source_manager'>source_manager</span><span class='period'>.</span><span class='id identifier rubyid_enable'>enable</span><span class='lparen'>(</span><span class='id identifier rubyid_source_name'>source_name</span><span class='rparen'>)</span>
384 <span class='kw'>rescue</span> <span class='const'>Exceptions</span><span class='op'>::</span><span class='const'>UnknownSourceError</span>
385 <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>There is no such Source</span><span class='tstring_end'>&quot;</span></span>
386 <span class='kw'>end</span>
387<span class='kw'>end</span></pre>
388 </td>
389 </tr>
390</table>
391</div>
392
393 <div class="method_details ">
394 <h3 class="signature " id="lyrics-class_method">
395
396 + (<tt>String</tt>) <strong>lyrics</strong>
397
398
399
400
401
402</h3><div class="docstring">
403 <div class="discussion">
404 <p>
405Creates a new Lyricli instance and returns lyrics by going through the
406sources.
407</p>
408
409
410 </div>
411</div>
412<div class="tags">
413
414<p class="tag_title">Returns:</p>
415<ul class="return">
416
417 <li>
418
419
420 <span class='type'>(<tt>String</tt>)</span>
421
422
423
424 &mdash;
425 <div class='inline'><p>
426the fetched lyrics
427</p>
428</div>
429
430 </li>
431
432</ul>
433
434</div><table class="source_code">
435 <tr>
436 <td>
437 <pre class="lines">
438
439
44040
44141
44242
44343</pre>
444 </td>
445 <td>
446 <pre class="code"><span class="info file"># File 'lib/lyricli.rb', line 40</span>
447
448<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_lyrics'>lyrics</span>
449 <span class='ivar'>@lyricli</span> <span class='op'>=</span> <span class='const'>Lyricli</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span>
450 <span class='ivar'>@lyricli</span><span class='period'>.</span><span class='id identifier rubyid_get_lyrics'>get_lyrics</span>
451<span class='kw'>end</span></pre>
452 </td>
453 </tr>
454</table>
455</div>
456
457 <div class="method_details ">
458 <h3 class="signature " id="reset-class_method">
459
460 + (<tt>Object</tt>) <strong>reset</strong>(source_name)
461
462
463
464
465
466</h3><div class="docstring">
467 <div class="discussion">
468 <p>
469Resets all configuration for a source via the Source Manager
470</p>
471
472
473 </div>
474</div>
475<div class="tags">
476
477
478</div><table class="source_code">
479 <tr>
480 <td>
481 <pre class="lines">
482
483
48480
48581
48682
48783
48884
48985
49086
49187</pre>
492 </td>
493 <td>
494 <pre class="code"><span class="info file"># File 'lib/lyricli.rb', line 80</span>
495
496<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_reset'>reset</span><span class='lparen'>(</span><span class='id identifier rubyid_source_name'>source_name</span><span class='rparen'>)</span>
497 <span class='id identifier rubyid_source_manager'>source_manager</span> <span class='op'>=</span> <span class='const'>SourceManager</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span>
498 <span class='kw'>begin</span>
499 <span class='id identifier rubyid_source_manager'>source_manager</span><span class='period'>.</span><span class='id identifier rubyid_reset'>reset</span><span class='lparen'>(</span><span class='id identifier rubyid_source_name'>source_name</span><span class='rparen'>)</span>
500 <span class='kw'>rescue</span> <span class='const'>Exceptions</span><span class='op'>::</span><span class='const'>UnknownSourceError</span>
501 <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>There is no such Source</span><span class='tstring_end'>&quot;</span></span>
502 <span class='kw'>end</span>
503<span class='kw'>end</span></pre>
504 </td>
505 </tr>
506</table>
507</div>
508
509 <div class="method_details ">
510 <h3 class="signature " id="sources-class_method">
511
512 + (<tt>String</tt>) <strong>sources</strong>
513
514
515
516
517
518</h3><div class="docstring">
519 <div class="discussion">
520 <p>
521Returns a list of the available sources to enable or disable
522</p>
523
524
525 </div>
526</div>
527<div class="tags">
528
529<p class="tag_title">Returns:</p>
530<ul class="return">
531
532 <li>
533
534
535 <span class='type'>(<tt>String</tt>)</span>
536
537
538
539 &mdash;
540 <div class='inline'><p>
541the list of available sources. Enabled sources have a star appended.
542</p>
543</div>
544
545 </li>
546
547</ul>
548
549</div><table class="source_code">
550 <tr>
551 <td>
552 <pre class="lines">
553
554
55554
55655
55756
55857</pre>
559 </td>
560 <td>
561 <pre class="code"><span class="info file"># File 'lib/lyricli.rb', line 54</span>
562
563<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_sources'>sources</span>
564 <span class='id identifier rubyid_source_manager'>source_manager</span> <span class='op'>=</span> <span class='const'>SourceManager</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span>
565 <span class='id identifier rubyid_source_manager'>source_manager</span><span class='period'>.</span><span class='id identifier rubyid_available_sources'>available_sources</span><span class='lparen'>(</span><span class='kw'>true</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_join'>join</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>, </span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
566<span class='kw'>end</span></pre>
567 </td>
568 </tr>
569</table>
570</div>
571
572 <div class="method_details ">
573 <h3 class="signature " id="version-class_method">
574
575 + (<tt>String</tt>) <strong>version</strong>
576
577
578
579
580
581</h3><div class="docstring">
582 <div class="discussion">
583 <p>
584Returns the version of the library
585</p>
586
587
588 </div>
589</div>
590<div class="tags">
591
592<p class="tag_title">Returns:</p>
593<ul class="return">
594
595 <li>
596
597
598 <span class='type'>(<tt>String</tt>)</span>
599
600
601
602 &mdash;
603 <div class='inline'><p>
604the version
605</p>
606</div>
607
608 </li>
609
610</ul>
611
612</div><table class="source_code">
613 <tr>
614 <td>
615 <pre class="lines">
616
617
61847
61948
62049</pre>
621 </td>
622 <td>
623 <pre class="code"><span class="info file"># File 'lib/lyricli.rb', line 47</span>
624
625<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_version'>version</span>
626 <span class='const'>Gem</span><span class='period'>.</span><span class='id identifier rubyid_loaded_specs'>loaded_specs</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>lyricli</span><span class='tstring_end'>&quot;</span></span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_version'>version</span>
627<span class='kw'>end</span></pre>
628 </td>
629 </tr>
630</table>
631</div>
632
633 </div>
634
635</div>
636
637 <div id="footer">
638 Generated on Sat Oct 6 03:20:24 2012 by
639 <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
640 0.8.2.1 (ruby-1.9.2).
641</div>
642
643 </body>
644</html>