rarbg 1.1.1 → 1.2.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,221 +0,0 @@
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
- File: CHANGELOG
8
-
9
- &mdash; Documentation by YARD 0.9.16
10
-
11
- </title>
12
-
13
- <link rel="stylesheet" href="css/style.css" type="text/css" charset="utf-8" />
14
-
15
- <link rel="stylesheet" href="css/common.css" type="text/css" charset="utf-8" />
16
-
17
- <script type="text/javascript" charset="utf-8">
18
- pathId = "CHANGELOG";
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="file_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</a> &raquo;
40
- <span class="title">File: CHANGELOG</span>
41
-
42
- </div>
43
-
44
- <div id="search">
45
-
46
- <a class="full_list_link" id="class_list_link"
47
- href="class_list.html">
48
-
49
- <svg width="24" height="24">
50
- <rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
51
- <rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
52
- <rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
53
- </svg>
54
- </a>
55
-
56
- </div>
57
- <div class="clear"></div>
58
- </div>
59
-
60
- <div id="content"><div id='filecontents'>
61
- <h1 id="label-Changelog">Changelog</h1>
62
-
63
- <p>All notable changes to this project will be documented in this file.<br>
64
- The format is based on <a href="https://keepachangelog.com/">Keep a
65
- Changelog</a>, and this project adheres to <a
66
- href="https://semver.org/">Semantic Versioning</a>.</p>
67
-
68
- <h2 id="label-Unreleased">Unreleased</h2>
69
-
70
- <p><a
71
- href="https://github.com/epistrephein/rarbg/compare/v1.1.1...master">Diff</a></p>
72
-
73
- <h2 id="label-1.1.1+-+2018-10-19">1.1.1 - 2018-10-19</h2>
74
-
75
- <p><a href="https://rubygems.org/gems/rarbg/versions/1.1.1">RubyGems</a> | <a
76
- href="https://github.com/epistrephein/rarbg/releases/tag/v1.1.1">Release</a>
77
- | <a
78
- href="https://github.com/epistrephein/rarbg/compare/v1.1.0...v1.1.1">Diff</a></p>
79
-
80
- <h3 id="label-Changed">Changed</h3>
81
- <ul><li>
82
- <p>Self-host documentation on GitHub pages.</p>
83
- </li></ul>
84
-
85
- <h2 id="label-1.1.0+-+2018-10-05">1.1.0 - 2018-10-05</h2>
86
-
87
- <p><a href="https://rubygems.org/gems/rarbg/versions/1.1.0">RubyGems</a> | <a
88
- href="https://github.com/epistrephein/rarbg/releases/tag/v1.1.0">Release</a>
89
- | <a
90
- href="https://github.com/epistrephein/rarbg/compare/v1.0.1...v1.1.0">Diff</a></p>
91
-
92
- <h4 id="label-Added">Added</h4>
93
- <ul><li>
94
- <p><code>list</code> and <code>search</code> methods are now available from
95
- top level namespace.</p>
96
- </li><li>
97
- <p><code>RARBG::CATEGORIES</code> now returns name/id pairs of all RARBG
98
- categories.</p>
99
- </li><li>
100
- <p>Faraday now uses the <code>APP_ID</code> as User agent.</p>
101
- </li></ul>
102
-
103
- <h2 id="label-1.0.1+-+2018-05-04">1.0.1 - 2018-05-04</h2>
104
-
105
- <p><a href="https://rubygems.org/gems/rarbg/versions/1.0.1">RubyGems</a> | <a
106
- href="https://github.com/epistrephein/rarbg/releases/tag/v1.0.1">Release</a>
107
- | <a
108
- href="https://github.com/epistrephein/rarbg/compare/v1.0.0...v1.0.1">Diff</a></p>
109
-
110
- <h4 id="label-Added">Added</h4>
111
- <ul><li>
112
- <p>Faraday now logs requests to stdout if in verbose mode (<code>-w</code> or
113
- <code>-v</code>).</p>
114
- </li></ul>
115
-
116
- <h4 id="label-Fixed">Fixed</h4>
117
- <ul><li>
118
- <p>Fixed code styling and some documentation errors.</p>
119
- </li><li>
120
- <p>Fixed IMDb id autocorrect in <code>search</code>.</p>
121
- </li></ul>
122
-
123
- <h2 id="label-1.0.0+-E2-80-93+2018-04-02">1.0.0 – 2018-04-02</h2>
124
-
125
- <p><a href="https://rubygems.org/gems/rarbg/versions/1.0.0">RubyGems</a> | <a
126
- href="https://github.com/epistrephein/rarbg/releases/tag/v1.0.0">Release</a>
127
- | <a
128
- href="https://github.com/epistrephein/rarbg/compare/v0.1.4...v1.0.0">Diff</a></p>
129
-
130
- <h4 id="label-Changed">Changed</h4>
131
- <ul><li>
132
- <p>Codebase has been completely refactored to be more resilient and
133
- error-free.</p>
134
- </li><li>
135
- <p>This release is NOT backward compatible with 0.1 versions.</p>
136
- </li><li>
137
- <p>Query parameters now use standard ruby syntax as expected and accept both
138
- symbol and string keys.</p>
139
- </li><li>
140
- <p>Compliance with API rate limiting (1req/2s) is now enforced automatically.</p>
141
- </li><li>
142
- <p>Empty results now return an empty array instead of raising an exception.</p>
143
- </li></ul>
144
-
145
- <h4 id="label-Removed">Removed</h4>
146
- <ul><li>
147
- <p>Removed <code>default_params</code>: query parameters are now passed per
148
- request.</p>
149
- </li><li>
150
- <p>Removed <code>search_string</code>, <code>search_imdb</code>,
151
- <code>search_themoviedb</code>, <code>search_tvdb</code>: search type must
152
- be specified as a keyword argument upon <code>search</code>.</p>
153
- </li><li>
154
- <p>Removed <code>RequestError</code> exception: all API-related errors now
155
- raise an <code>APIError</code> exception.</p>
156
- </li></ul>
157
-
158
- <h2 id="label-0.1.4+-E2-80-93+2017-12-22">0.1.4 – 2017-12-22</h2>
159
-
160
- <p><a href="https://rubygems.org/gems/rarbg/versions/0.1.4">RubyGems</a> | <a
161
- href="https://github.com/epistrephein/rarbg/releases/tag/v0.1.4">Release</a>
162
- | <a
163
- href="https://github.com/epistrephein/rarbg/compare/v0.1.3...v0.1.4">Diff</a></p>
164
-
165
- <h4 id="label-Fixed">Fixed</h4>
166
- <ul><li>
167
- <p>Set Faraday middleware before adapter to suppress warning.</p>
168
- </li></ul>
169
-
170
- <h2 id="label-0.1.3+-E2-80-93+2016-12-23">0.1.3 – 2016-12-23</h2>
171
-
172
- <p><a href="https://rubygems.org/gems/rarbg/versions/0.1.3">RubyGems</a> | <a
173
- href="https://github.com/epistrephein/rarbg/releases/tag/v0.1.3">Release</a>
174
- | <a
175
- href="https://github.com/epistrephein/rarbg/compare/v0.1.2...v0.1.3">Diff</a></p>
176
-
177
- <h4 id="label-Changed">Changed</h4>
178
- <ul><li>
179
- <p>Move <code>app_id</code> and <code>token</code> params to <code>call</code>
180
- method to prevent override.</p>
181
- </li></ul>
182
-
183
- <h2 id="label-0.1.2+-E2-80-93+2016-12-21">0.1.2 – 2016-12-21</h2>
184
-
185
- <p><a href="https://rubygems.org/gems/rarbg/versions/0.1.2">RubyGems</a> | <a
186
- href="https://github.com/epistrephein/rarbg/releases/tag/v0.1.2">Release</a>
187
- | <a
188
- href="https://github.com/epistrephein/rarbg/compare/v0.1.1...v0.1.2">Diff</a></p>
189
-
190
- <h4 id="label-Changed">Changed</h4>
191
- <ul><li>
192
- <p>Sleep for 2 seconds after <code>get_token</code> to avoid request limit
193
- error.</p>
194
- </li></ul>
195
-
196
- <h2 id="label-0.1.1+-E2-80-93+2016-12-21">0.1.1 – 2016-12-21</h2>
197
-
198
- <p><a href="https://rubygems.org/gems/rarbg/versions/0.1.1">RubyGems</a> | <a
199
- href="https://github.com/epistrephein/rarbg/releases/tag/v0.1.1">Release</a>
200
- | <a
201
- href="https://github.com/epistrephein/rarbg/compare/v0.1.0...v0.1.1">Diff</a></p>
202
-
203
- <h4 id="label-Fixed">Fixed</h4>
204
- <ul><li>
205
- <p>Fix invalid gemspec</p>
206
- </li></ul>
207
-
208
- <h2 id="label-0.1.0+-E2-80-93+2016-12-21">0.1.0 – 2016-12-21</h2>
209
-
210
- <p>Initial release. Yanked from <a href="https://rubygems.org">RubyGems</a>.</p>
211
- </div></div>
212
-
213
- <div id="footer">
214
- Generated on Fri Oct 19 11:11:03 2018 by
215
- <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
216
- 0.9.16 (ruby-2.4.5).
217
- </div>
218
-
219
- </div>
220
- </body>
221
- </html>
@@ -1,92 +0,0 @@
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
- File: LICENSE
8
-
9
- &mdash; Documentation by YARD 0.9.16
10
-
11
- </title>
12
-
13
- <link rel="stylesheet" href="css/style.css" type="text/css" charset="utf-8" />
14
-
15
- <link rel="stylesheet" href="css/common.css" type="text/css" charset="utf-8" />
16
-
17
- <script type="text/javascript" charset="utf-8">
18
- pathId = "LICENSE";
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="file_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</a> &raquo;
40
- <span class="title">File: LICENSE</span>
41
-
42
- </div>
43
-
44
- <div id="search">
45
-
46
- <a class="full_list_link" id="class_list_link"
47
- href="class_list.html">
48
-
49
- <svg width="24" height="24">
50
- <rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
51
- <rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
52
- <rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
53
- </svg>
54
- </a>
55
-
56
- </div>
57
- <div class="clear"></div>
58
- </div>
59
-
60
- <div id="content"><div id='filecontents'>
61
- <p>MIT License</p>
62
-
63
- <p>Copyright © 2016-2018 Tommaso Barbato</p>
64
-
65
- <p>Permission is hereby granted, free of charge, to any person obtaining a
66
- copy of this software and associated documentation files (the “Software”),
67
- to deal in the Software without restriction, including without limitation
68
- the rights to use, copy, modify, merge, publish, distribute, sublicense,
69
- and/or sell copies of the Software, and to permit persons to whom the
70
- Software is furnished to do so, subject to the following conditions:</p>
71
-
72
- <p>The above copyright notice and this permission notice shall be included in
73
- all copies or substantial portions of the Software.</p>
74
-
75
- <p>THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
76
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
77
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
78
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
79
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
80
- FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
81
- DEALINGS IN THE SOFTWARE.</p>
82
- </div></div>
83
-
84
- <div id="footer">
85
- Generated on Fri Oct 19 11:11:03 2018 by
86
- <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
87
- 0.9.16 (ruby-2.4.5).
88
- </div>
89
-
90
- </div>
91
- </body>
92
- </html>
@@ -1,236 +0,0 @@
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
- File: README
8
-
9
- &mdash; Documentation by YARD 0.9.16
10
-
11
- </title>
12
-
13
- <link rel="stylesheet" href="css/style.css" type="text/css" charset="utf-8" />
14
-
15
- <link rel="stylesheet" href="css/common.css" type="text/css" charset="utf-8" />
16
-
17
- <script type="text/javascript" charset="utf-8">
18
- pathId = "README";
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="file_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</a> &raquo;
40
- <span class="title">File: README</span>
41
-
42
- </div>
43
-
44
- <div id="search">
45
-
46
- <a class="full_list_link" id="class_list_link"
47
- href="class_list.html">
48
-
49
- <svg width="24" height="24">
50
- <rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
51
- <rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
52
- <rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
53
- </svg>
54
- </a>
55
-
56
- </div>
57
- <div class="clear"></div>
58
- </div>
59
-
60
- <div id="content"><div id='filecontents'>
61
- <h1 id="label-RARBG">RARBG</h1>
62
-
63
- <p><a href="https://rubygems.org/gems/rarbg"><img
64
- src="https://img.shields.io/gem/v/rarbg.svg?colorB=brightgreen"></a> <a
65
- href="https://travis-ci.org/epistrephein/rarbg"><img
66
- src="https://travis-ci.org/epistrephein/rarbg.svg?branch=master"></a> <a
67
- href="https://depfu.com/github/epistrephein/rarbg?project_id=5845"><img
68
- src="https://badges.depfu.com/badges/32877a5a58ad7eb3f5db321d85a23c1b/overview.svg"></a>
69
- <a
70
- href="https://codeclimate.com/github/epistrephein/rarbg/maintainability"><img
71
- src="https://api.codeclimate.com/v1/badges/adf6a91b754bb4aaacf2/maintainability"></a>
72
- <a
73
- href="https://codeclimate.com/github/epistrephein/rarbg/test_coverage"><img
74
- src="https://api.codeclimate.com/v1/badges/adf6a91b754bb4aaacf2/test_coverage"></a>
75
- <a href="https://inch-ci.org/github/epistrephein/rarbg"><img
76
- src="https://inch-ci.org/github/epistrephein/rarbg.svg?branch=master"></a>
77
- <a href="https://epistrephein.github.io/rarbg"><img
78
- src="https://img.shields.io/badge/docs-yard-blue.svg"></a></p>
79
-
80
- <p>Ruby wrapper for the RARBG Torrent API.</p>
81
-
82
- <h2 id="label-Installation">Installation</h2>
83
-
84
- <p>Install as a gem</p>
85
-
86
- <pre class="code ruby"><code class="ruby">$ gem install rarbg</code></pre>
87
-
88
- <p>Or add it to your Gemfile and execute <code>bundle install</code></p>
89
-
90
- <pre class="code ruby"><code class="ruby"><span class='id identifier rubyid_gem'>gem</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>rarbg</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>~&gt; 1.0</span><span class='tstring_end'>&#39;</span></span>
91
- </code></pre>
92
-
93
- <h2 id="label-Usage">Usage</h2>
94
-
95
- <p>This gem wraps all API methods available from <a
96
- href="https://torrentapi.org/apidocs_v2.txt">RARBG TorrentAPI</a>.</p>
97
-
98
- <p>An authentication token is automatically generated on first request, stored
99
- with timestamp and renewed every 800 seconds.</p>
100
-
101
- <p>Rate limit (1req/2s) is automatically enforced.</p>
102
-
103
- <h4 id="label-Getting+started">Getting started</h4>
104
-
105
- <p>Require the gem and initialize a new <code>RARBG::API</code> object.</p>
106
-
107
- <pre class="code ruby"><code class="ruby"><span class='id identifier rubyid_require'>require</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>rarbg</span><span class='tstring_end'>&#39;</span></span>
108
-
109
- <span class='id identifier rubyid_rarbg'>rarbg</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="RARBG.html" title="RARBG (module)">RARBG</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="RARBG/API.html" title="RARBG::API (class)">API</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="RARBG/API.html#initialize-instance_method" title="RARBG::API#initialize (method)">new</a></span></span>
110
- </code></pre>
111
-
112
- <h4 id="label-Methods">Methods</h4>
113
-
114
- <p>Use <a
115
- href="https://epistrephein.github.io/rarbg/RARBG/API.html#list-instance_method">list</a>
116
- to list torrents. Additional parameters are passed as keyword arguments and
117
- can be mixed together.</p>
118
-
119
- <p>All successful method calls return an array of hashes (or an empty array
120
- for no results).</p>
121
-
122
- <pre class="code ruby"><code class="ruby"><span class='comment'># List last 100 torrents.
123
- </span><span class='id identifier rubyid_rarbg'>rarbg</span><span class='period'>.</span><span class='id identifier rubyid_list'>list</span><span class='lparen'>(</span><span class='label'>limit:</span> <span class='int'>100</span><span class='rparen'>)</span>
124
-
125
- <span class='comment'># List torrents with at least 20 seeders, sorted by seeders.
126
- </span><span class='id identifier rubyid_rarbg'>rarbg</span><span class='period'>.</span><span class='id identifier rubyid_list'>list</span><span class='lparen'>(</span><span class='label'>min_seeders:</span> <span class='int'>20</span><span class='comma'>,</span> <span class='label'>sort:</span> <span class='symbol'>:seeders</span><span class='rparen'>)</span>
127
-
128
- <span class='comment'># List torrents with extended json infos.
129
- </span><span class='id identifier rubyid_rarbg'>rarbg</span><span class='period'>.</span><span class='id identifier rubyid_list'>list</span><span class='lparen'>(</span><span class='label'>format:</span> <span class='symbol'>:json_extended</span><span class='rparen'>)</span>
130
- </code></pre>
131
-
132
- <p>Use <a
133
- href="https://epistrephein.github.io/rarbg/RARBG/API.html#search-instance_method">search</a>
134
- to search torrents. One search type parameter among <code>string</code>,
135
- <code>imdb</code>, <code>themoviedb</code> and <code>tvdb</code> is
136
- required.</p>
137
-
138
- <pre class="code ruby"><code class="ruby"><span class='comment'># Search torrents using literal string query.
139
- </span><span class='id identifier rubyid_rarbg'>rarbg</span><span class='period'>.</span><span class='id identifier rubyid_search'>search</span><span class='lparen'>(</span><span class='label'>string:</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>Force Awakens</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span>
140
-
141
- <span class='comment'># Search by IMDB id, in `Movies/x264/1080` and `Movies/x264/720`.
142
- </span><span class='comment'># Note that &#39;tt&#39; can be omitted when passing an IMDB id.
143
- </span><span class='id identifier rubyid_rarbg'>rarbg</span><span class='period'>.</span><span class='id identifier rubyid_search'>search</span><span class='lparen'>(</span><span class='label'>imdb:</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>tt2488496</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span> <span class='label'>category:</span> <span class='lbracket'>[</span><span class='int'>44</span><span class='comma'>,</span> <span class='int'>45</span><span class='rbracket'>]</span><span class='rparen'>)</span>
144
-
145
- <span class='comment'># Search unranked torrents by TheMovieDB id, sorted by last.
146
- </span><span class='id identifier rubyid_rarbg'>rarbg</span><span class='period'>.</span><span class='id identifier rubyid_search'>search</span><span class='lparen'>(</span><span class='label'>themoviedb:</span> <span class='int'>140607</span><span class='comma'>,</span> <span class='label'>ranked:</span> <span class='kw'>false</span><span class='comma'>,</span> <span class='label'>sort:</span> <span class='symbol'>:last</span><span class='rparen'>)</span>
147
- </code></pre>
148
-
149
- <p>These methods are also available from the top module namespace for
150
- convenience.</p>
151
-
152
- <pre class="code ruby"><code class="ruby"><span class='const'><span class='object_link'><a href="RARBG.html" title="RARBG (module)">RARBG</a></span></span><span class='period'>.</span><span class='id identifier rubyid_list'>list</span><span class='lparen'>(</span><span class='label'>sort:</span> <span class='symbol'>:leechers</span><span class='comma'>,</span> <span class='label'>min_leechers:</span> <span class='int'>10</span><span class='rparen'>)</span>
153
-
154
- <span class='const'><span class='object_link'><a href="RARBG.html" title="RARBG (module)">RARBG</a></span></span><span class='period'>.</span><span class='id identifier rubyid_search'>search</span><span class='lparen'>(</span><span class='label'>string:</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>Star Wars</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span> <span class='label'>category:</span> <span class='lbracket'>[</span><span class='int'>48</span><span class='rbracket'>]</span><span class='rparen'>)</span>
155
- </code></pre>
156
-
157
- <p>A list of name/id pairs for each category is available for quick lookup.</p>
158
-
159
- <pre class="code ruby"><code class="ruby"><span class='const'><span class='object_link'><a href="RARBG.html" title="RARBG (module)">RARBG</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="RARBG.html#CATEGORIES-constant" title="RARBG::CATEGORIES (constant)">CATEGORIES</a></span></span>
160
- <span class='comment'># =&gt; { &quot;Movies/XVID&quot; =&gt; 14,
161
- </span><span class='comment'># &quot;Movies/XVID/720&quot; =&gt; 48,
162
- </span><span class='comment'># &quot;Movies/x264&quot; =&gt; 17,
163
- </span><span class='comment'># ...
164
- </span><span class='comment'># }
165
- </span></code></pre>
166
-
167
- <h4 id="label-Errors">Errors</h4>
168
-
169
- <p>API endpoint errors will raise a <code>RARBG::APIError</code> exception
170
- with the API error message.</p>
171
-
172
- <pre class="code ruby"><code class="ruby"><span class='id identifier rubyid_rarbg'>rarbg</span><span class='period'>.</span><span class='id identifier rubyid_list'>list</span><span class='lparen'>(</span><span class='label'>sort:</span> <span class='symbol'>:name</span><span class='rparen'>)</span>
173
- <span class='comment'># =&gt; RARBG::APIError: Invalid sort
174
- </span>
175
- <span class='id identifier rubyid_rarbg'>rarbg</span><span class='period'>.</span><span class='id identifier rubyid_search'>search</span><span class='lparen'>(</span><span class='label'>string:</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>Star Wars</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span> <span class='label'>min_seeders:</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>notanumber</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span>
176
- <span class='comment'># =&gt; RARBG::APIError: Invalid value for min_seeders
177
- </span>
178
- <span class='id identifier rubyid_rarbg'>rarbg</span><span class='period'>.</span><span class='id identifier rubyid_search'>search</span><span class='lparen'>(</span><span class='label'>imdb:</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>tt0121765</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span>
179
- <span class='comment'># =&gt; RARBG::APIError: Service unavailable (503)
180
- </span></code></pre>
181
-
182
- <p>Parameter validation errors on client side will raise an
183
- <code>ArgumentError</code>.</p>
184
-
185
- <pre class="code ruby"><code class="ruby"><span class='id identifier rubyid_rarbg'>rarbg</span><span class='period'>.</span><span class='id identifier rubyid_list'>list</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>a string instead of an hash</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span>
186
- <span class='comment'># =&gt; ArgumentError: Expected params hash
187
- </span>
188
- <span class='id identifier rubyid_rarbg'>rarbg</span><span class='period'>.</span><span class='id identifier rubyid_search'>search</span><span class='lparen'>(</span><span class='label'>limit:</span> <span class='int'>50</span><span class='rparen'>)</span>
189
- <span class='comment'># =&gt; ArgumentError: At least one parameter required among string, imdb, tvdb, themoviedb for search mode.
190
- </span></code></pre>
191
-
192
- <h2 id="label-Contributing">Contributing</h2>
193
-
194
- <p>Bug reports and pull requests are welcome on <a
195
- href="https://github.com/epistrephein/rarbg">GitHub</a>.</p>
196
-
197
- <p>This project is intended to be a safe, welcoming space for collaboration,
198
- and contributors are expected to adhere to the <a
199
- href="https://github.com/epistrephein/rarbg/blob/master/CODE_OF_CONDUCT.md">Code
200
- of Conduct</a>.</p>
201
-
202
- <p>You can contribute changes by forking the project and submitting a pull
203
- request. To get started:</p>
204
- <ol><li>
205
- <p>Fork the repo</p>
206
- </li><li>
207
- <p>Install the dependencies (<code>bin/setup</code>)</p>
208
- </li><li>
209
- <p>Create your feature branch (<code>git checkout -b my-new-feature</code>)</p>
210
- </li><li>
211
- <p>Commit your changes (<code>git commit -am &#39;Add some
212
- feature&#39;</code>)</p>
213
- </li><li>
214
- <p>Pass the test suite (<code>rake spec</code>)</p>
215
- </li><li>
216
- <p>Push to the branch (<code>git push origin my-new-feature</code>)</p>
217
- </li><li>
218
- <p>Create a new pull request</p>
219
- </li></ol>
220
-
221
- <h2 id="label-License">License</h2>
222
-
223
- <p>This gem is released as open source under the terms of the <a
224
- href="https://github.com/epistrephein/rarbg/blob/master/LICENSE">MIT
225
- License</a>.</p>
226
- </div></div>
227
-
228
- <div id="footer">
229
- Generated on Fri Oct 19 11:11:03 2018 by
230
- <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
231
- 0.9.16 (ruby-2.4.5).
232
- </div>
233
-
234
- </div>
235
- </body>
236
- </html>