rarbg 1.1.0 → 1.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.github/ISSUE_TEMPLATE.md +21 -0
- data/.travis.yml +3 -3
- data/.yardopts +1 -0
- data/CHANGELOG.md +10 -1
- data/README.md +11 -8
- data/Rakefile +2 -0
- data/docs/RARBG.html +195 -0
- data/docs/RARBG/API.html +1309 -0
- data/docs/RARBG/APIError.html +135 -0
- data/docs/_config.yml +2 -0
- data/docs/_index.html +135 -0
- data/docs/class_list.html +51 -0
- data/docs/css/common.css +1 -0
- data/docs/css/full_list.css +58 -0
- data/docs/css/style.css +496 -0
- data/docs/file.CHANGELOG.html +221 -0
- data/docs/file.LICENSE.html +92 -0
- data/docs/file.README.html +236 -0
- data/docs/file_list.html +66 -0
- data/docs/frames.html +17 -0
- data/docs/index.html +236 -0
- data/docs/js/app.js +292 -0
- data/docs/js/full_list.js +216 -0
- data/docs/js/jquery.js +4 -0
- data/docs/method_list.html +107 -0
- data/docs/top-level-namespace.html +110 -0
- data/lib/rarbg/api.rb +8 -6
- data/lib/rarbg/version.rb +1 -1
- data/rarbg.gemspec +1 -1
- metadata +25 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 875767e85f80c778779be897867dffad4731f9f8a4a7dca68cd76b47be386b5a
|
4
|
+
data.tar.gz: 1a340ef687b05465ff2290fc8feec5324102d90514c657641b47411149cfd7eb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9a8fca5afbe015a0d4fdb33a2ff3fcd77090b680e519c064d9686c291f5aa3366aa9ea456ae770042c79b5bc8bb7ba7477dfa945c85ee8327befa2b1052adeb2
|
7
|
+
data.tar.gz: 1d64bf8971f55b9bebaa8cd19cc45d0667f77b53fbba7fa896ad81d8099f40ffb649e5d32994fdd20cca0c11f8fdf849bfdb2661982d54a5f4d4f25d4918ca99
|
@@ -0,0 +1,21 @@
|
|
1
|
+
## Bug description
|
2
|
+
A clear and concise description of what the bug is.
|
3
|
+
|
4
|
+
## Expected behavior
|
5
|
+
A clear and concise description of what you expected to happen.
|
6
|
+
|
7
|
+
## Steps to reproduce
|
8
|
+
1. Instantiate object...
|
9
|
+
2. Call method...
|
10
|
+
3. Error is raised...
|
11
|
+
|
12
|
+
## Environment
|
13
|
+
- Gem version:
|
14
|
+
- Ruby version:
|
15
|
+
- OS and version:
|
16
|
+
|
17
|
+
## Logs
|
18
|
+
If applicable, add logs or screenshots to help explain your problem.
|
19
|
+
|
20
|
+
## Additional context
|
21
|
+
Add any other context about the problem here.
|
data/.travis.yml
CHANGED
data/.yardopts
CHANGED
data/CHANGELOG.md
CHANGED
@@ -5,7 +5,16 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/),
|
|
5
5
|
and this project adheres to [Semantic Versioning](https://semver.org/).
|
6
6
|
|
7
7
|
## Unreleased
|
8
|
-
[Diff](https://github.com/epistrephein/rarbg/compare/v1.1.
|
8
|
+
[Diff](https://github.com/epistrephein/rarbg/compare/v1.1.1...master)
|
9
|
+
|
10
|
+
|
11
|
+
## 1.1.1 - 2018-10-19
|
12
|
+
[RubyGems](https://rubygems.org/gems/rarbg/versions/1.1.1) |
|
13
|
+
[Release](https://github.com/epistrephein/rarbg/releases/tag/v1.1.1) |
|
14
|
+
[Diff](https://github.com/epistrephein/rarbg/compare/v1.1.0...v1.1.1)
|
15
|
+
|
16
|
+
### Changed
|
17
|
+
- Self-host documentation on GitHub pages.
|
9
18
|
|
10
19
|
|
11
20
|
## 1.1.0 - 2018-10-05
|
data/README.md
CHANGED
@@ -1,11 +1,11 @@
|
|
1
1
|
# RARBG
|
2
2
|
[![Gem Version](https://img.shields.io/gem/v/rarbg.svg?colorB=brightgreen)](https://rubygems.org/gems/rarbg)
|
3
|
-
[![Build
|
3
|
+
[![Build Status](https://travis-ci.org/epistrephein/rarbg.svg?branch=master)](https://travis-ci.org/epistrephein/rarbg)
|
4
4
|
[![Dependencies](https://badges.depfu.com/badges/32877a5a58ad7eb3f5db321d85a23c1b/overview.svg)](https://depfu.com/github/epistrephein/rarbg?project_id=5845)
|
5
5
|
[![Maintainability](https://api.codeclimate.com/v1/badges/adf6a91b754bb4aaacf2/maintainability)](https://codeclimate.com/github/epistrephein/rarbg/maintainability)
|
6
6
|
[![Test Coverage](https://api.codeclimate.com/v1/badges/adf6a91b754bb4aaacf2/test_coverage)](https://codeclimate.com/github/epistrephein/rarbg/test_coverage)
|
7
|
-
[![Inline
|
8
|
-
[![Documentation](https://img.shields.io/badge/docs-yard-blue.svg)](https://
|
7
|
+
[![Inline Docs](https://inch-ci.org/github/epistrephein/rarbg.svg?branch=master)](https://inch-ci.org/github/epistrephein/rarbg)
|
8
|
+
[![Documentation](https://img.shields.io/badge/docs-yard-blue.svg)](https://epistrephein.github.io/rarbg)
|
9
9
|
|
10
10
|
Ruby wrapper for the RARBG Torrent API.
|
11
11
|
|
@@ -29,6 +29,8 @@ This gem wraps all API methods available from [RARBG TorrentAPI](https://torrent
|
|
29
29
|
|
30
30
|
An authentication token is automatically generated on first request, stored with timestamp and renewed every 800 seconds.
|
31
31
|
|
32
|
+
Rate limit (1req/2s) is automatically enforced.
|
33
|
+
|
32
34
|
#### Getting started
|
33
35
|
|
34
36
|
Require the gem and initialize a new `RARBG::API` object.
|
@@ -41,10 +43,10 @@ rarbg = RARBG::API.new
|
|
41
43
|
|
42
44
|
#### Methods
|
43
45
|
|
44
|
-
Use `list` to list torrents.
|
46
|
+
Use [`list`](https://epistrephein.github.io/rarbg/RARBG/API.html#list-instance_method) to list torrents.
|
45
47
|
Additional parameters are passed as keyword arguments and can be mixed together.
|
46
48
|
|
47
|
-
All successful method calls return an array of hashes.
|
49
|
+
All successful method calls return an array of hashes (or an empty array for no results).
|
48
50
|
|
49
51
|
```ruby
|
50
52
|
# List last 100 torrents.
|
@@ -57,7 +59,7 @@ rarbg.list(min_seeders: 20, sort: :seeders)
|
|
57
59
|
rarbg.list(format: :json_extended)
|
58
60
|
```
|
59
61
|
|
60
|
-
Use `search` to search torrents.
|
62
|
+
Use [`search`](https://epistrephein.github.io/rarbg/RARBG/API.html#search-instance_method) to search torrents.
|
61
63
|
One search type parameter among `string`, `imdb`, `themoviedb` and `tvdb` is required.
|
62
64
|
|
63
65
|
```ruby
|
@@ -80,7 +82,7 @@ RARBG.list(sort: :leechers, min_leechers: 10)
|
|
80
82
|
RARBG.search(string: 'Star Wars', category: [48])
|
81
83
|
```
|
82
84
|
|
83
|
-
A list of name/id pairs for each category is
|
85
|
+
A list of name/id pairs for each category is available for quick lookup.
|
84
86
|
|
85
87
|
```ruby
|
86
88
|
RARBG::CATEGORIES
|
@@ -120,7 +122,8 @@ rarbg.search(limit: 50)
|
|
120
122
|
|
121
123
|
Bug reports and pull requests are welcome on [GitHub](https://github.com/epistrephein/rarbg).
|
122
124
|
|
123
|
-
This project is intended to be a safe, welcoming space for collaboration,
|
125
|
+
This project is intended to be a safe, welcoming space for collaboration,
|
126
|
+
and contributors are expected to adhere to the [Code of Conduct](https://github.com/epistrephein/rarbg/blob/master/CODE_OF_CONDUCT.md).
|
124
127
|
|
125
128
|
You can contribute changes by forking the project and submitting a pull request. To get started:
|
126
129
|
|
data/Rakefile
CHANGED
data/docs/RARBG.html
ADDED
@@ -0,0 +1,195 @@
|
|
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
|
+
Module: RARBG
|
8
|
+
|
9
|
+
— 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 = "RARBG";
|
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 (R)</a> »
|
40
|
+
|
41
|
+
|
42
|
+
<span class="title">RARBG</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>Module: RARBG
|
63
|
+
|
64
|
+
|
65
|
+
|
66
|
+
</h1>
|
67
|
+
<div class="box_info">
|
68
|
+
|
69
|
+
|
70
|
+
|
71
|
+
|
72
|
+
|
73
|
+
|
74
|
+
|
75
|
+
|
76
|
+
|
77
|
+
|
78
|
+
|
79
|
+
<dl>
|
80
|
+
<dt>Defined in:</dt>
|
81
|
+
<dd>lib/rarbg.rb<span class="defines">,<br />
|
82
|
+
lib/rarbg/api.rb,<br /> lib/rarbg/version.rb,<br /> lib/rarbg/categories.rb</span>
|
83
|
+
</dd>
|
84
|
+
</dl>
|
85
|
+
|
86
|
+
</div>
|
87
|
+
|
88
|
+
<h2>Overview</h2><div class="docstring">
|
89
|
+
<div class="discussion">
|
90
|
+
|
91
|
+
<p>Main namespace for RARBG</p>
|
92
|
+
|
93
|
+
|
94
|
+
</div>
|
95
|
+
</div>
|
96
|
+
<div class="tags">
|
97
|
+
|
98
|
+
|
99
|
+
</div><h2>Defined Under Namespace</h2>
|
100
|
+
<p class="children">
|
101
|
+
|
102
|
+
|
103
|
+
|
104
|
+
|
105
|
+
<strong class="classes">Classes:</strong> <span class='object_link'><a href="RARBG/API.html" title="RARBG::API (class)">API</a></span>, <span class='object_link'><a href="RARBG/APIError.html" title="RARBG::APIError (class)">APIError</a></span>
|
106
|
+
|
107
|
+
|
108
|
+
</p>
|
109
|
+
|
110
|
+
|
111
|
+
<h2>
|
112
|
+
Constant Summary
|
113
|
+
<small><a href="#" class="constants_summary_toggle">collapse</a></small>
|
114
|
+
</h2>
|
115
|
+
|
116
|
+
<dl class="constants">
|
117
|
+
|
118
|
+
<dt id="VERSION-constant" class="">VERSION =
|
119
|
+
<div class="docstring">
|
120
|
+
<div class="discussion">
|
121
|
+
|
122
|
+
<p>Gem version</p>
|
123
|
+
|
124
|
+
|
125
|
+
</div>
|
126
|
+
</div>
|
127
|
+
<div class="tags">
|
128
|
+
|
129
|
+
|
130
|
+
</div>
|
131
|
+
</dt>
|
132
|
+
<dd><pre class="code"><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>1.1.1</span><span class='tstring_end'>'</span></span></pre></dd>
|
133
|
+
|
134
|
+
<dt id="CATEGORIES-constant" class="">CATEGORIES =
|
135
|
+
<div class="docstring">
|
136
|
+
<div class="discussion">
|
137
|
+
|
138
|
+
<p>RARBG categories</p>
|
139
|
+
|
140
|
+
|
141
|
+
</div>
|
142
|
+
</div>
|
143
|
+
<div class="tags">
|
144
|
+
|
145
|
+
|
146
|
+
</div>
|
147
|
+
</dt>
|
148
|
+
<dd><pre class="code"><span class='lbrace'>{</span>
|
149
|
+
<span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>Movies/XVID</span><span class='tstring_end'>'</span></span> <span class='op'>=></span> <span class='int'>14</span><span class='comma'>,</span>
|
150
|
+
<span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>Movies/XVID/720</span><span class='tstring_end'>'</span></span> <span class='op'>=></span> <span class='int'>48</span><span class='comma'>,</span>
|
151
|
+
<span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>Movies/x264</span><span class='tstring_end'>'</span></span> <span class='op'>=></span> <span class='int'>17</span><span class='comma'>,</span>
|
152
|
+
<span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>Movies/x264/1080</span><span class='tstring_end'>'</span></span> <span class='op'>=></span> <span class='int'>44</span><span class='comma'>,</span>
|
153
|
+
<span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>Movies/x264/720</span><span class='tstring_end'>'</span></span> <span class='op'>=></span> <span class='int'>45</span><span class='comma'>,</span>
|
154
|
+
<span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>Movies/x264/3D</span><span class='tstring_end'>'</span></span> <span class='op'>=></span> <span class='int'>47</span><span class='comma'>,</span>
|
155
|
+
<span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>Movies/x264/4k</span><span class='tstring_end'>'</span></span> <span class='op'>=></span> <span class='int'>50</span><span class='comma'>,</span>
|
156
|
+
<span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>Movies/x265/4k</span><span class='tstring_end'>'</span></span> <span class='op'>=></span> <span class='int'>51</span><span class='comma'>,</span>
|
157
|
+
<span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>Movies/x265/4k/HDR</span><span class='tstring_end'>'</span></span> <span class='op'>=></span> <span class='int'>52</span><span class='comma'>,</span>
|
158
|
+
<span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>Movies/Full BD</span><span class='tstring_end'>'</span></span> <span class='op'>=></span> <span class='int'>42</span><span class='comma'>,</span>
|
159
|
+
<span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>Movies/BD Remux</span><span class='tstring_end'>'</span></span> <span class='op'>=></span> <span class='int'>46</span><span class='comma'>,</span>
|
160
|
+
<span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>TV Episodes</span><span class='tstring_end'>'</span></span> <span class='op'>=></span> <span class='int'>18</span><span class='comma'>,</span>
|
161
|
+
<span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>TV HD Episodes</span><span class='tstring_end'>'</span></span> <span class='op'>=></span> <span class='int'>41</span><span class='comma'>,</span>
|
162
|
+
<span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>TV UHD Episodes</span><span class='tstring_end'>'</span></span> <span class='op'>=></span> <span class='int'>49</span><span class='comma'>,</span>
|
163
|
+
<span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>Music/MP3</span><span class='tstring_end'>'</span></span> <span class='op'>=></span> <span class='int'>23</span><span class='comma'>,</span>
|
164
|
+
<span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>Music/FLAC</span><span class='tstring_end'>'</span></span> <span class='op'>=></span> <span class='int'>25</span><span class='comma'>,</span>
|
165
|
+
<span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>Games/PC ISO</span><span class='tstring_end'>'</span></span> <span class='op'>=></span> <span class='int'>27</span><span class='comma'>,</span>
|
166
|
+
<span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>Games/PC RIP</span><span class='tstring_end'>'</span></span> <span class='op'>=></span> <span class='int'>28</span><span class='comma'>,</span>
|
167
|
+
<span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>Games/PS3</span><span class='tstring_end'>'</span></span> <span class='op'>=></span> <span class='int'>40</span><span class='comma'>,</span>
|
168
|
+
<span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>Games/PS4</span><span class='tstring_end'>'</span></span> <span class='op'>=></span> <span class='int'>53</span><span class='comma'>,</span>
|
169
|
+
<span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>Games/XBOX-360</span><span class='tstring_end'>'</span></span> <span class='op'>=></span> <span class='int'>32</span><span class='comma'>,</span>
|
170
|
+
<span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>Software/PC ISO</span><span class='tstring_end'>'</span></span> <span class='op'>=></span> <span class='int'>33</span><span class='comma'>,</span>
|
171
|
+
<span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>XXX</span><span class='tstring_end'>'</span></span> <span class='op'>=></span> <span class='int'>4</span>
|
172
|
+
<span class='rbrace'>}</span><span class='period'>.</span><span class='id identifier rubyid_freeze'>freeze</span></pre></dd>
|
173
|
+
|
174
|
+
</dl>
|
175
|
+
|
176
|
+
|
177
|
+
|
178
|
+
|
179
|
+
|
180
|
+
|
181
|
+
|
182
|
+
|
183
|
+
|
184
|
+
|
185
|
+
</div>
|
186
|
+
|
187
|
+
<div id="footer">
|
188
|
+
Generated on Fri Oct 19 11:11:03 2018 by
|
189
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
190
|
+
0.9.16 (ruby-2.4.5).
|
191
|
+
</div>
|
192
|
+
|
193
|
+
</div>
|
194
|
+
</body>
|
195
|
+
</html>
|
data/docs/RARBG/API.html
ADDED
@@ -0,0 +1,1309 @@
|
|
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: RARBG::API
|
8
|
+
|
9
|
+
— 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 = "RARBG::API";
|
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 (A)</a> »
|
40
|
+
<span class='title'><span class='object_link'><a href="../RARBG.html" title="RARBG (module)">RARBG</a></span></span>
|
41
|
+
»
|
42
|
+
<span class="title">API</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: RARBG::API
|
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">RARBG::API</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/rarbg/api.rb</dd>
|
98
|
+
</dl>
|
99
|
+
|
100
|
+
</div>
|
101
|
+
|
102
|
+
<h2>Overview</h2><div class="docstring">
|
103
|
+
<div class="discussion">
|
104
|
+
|
105
|
+
<p>Base class for RARBG API.</p>
|
106
|
+
|
107
|
+
|
108
|
+
</div>
|
109
|
+
</div>
|
110
|
+
<div class="tags">
|
111
|
+
|
112
|
+
|
113
|
+
</div>
|
114
|
+
|
115
|
+
<h2>
|
116
|
+
Constant Summary
|
117
|
+
<small><a href="#" class="constants_summary_toggle">collapse</a></small>
|
118
|
+
</h2>
|
119
|
+
|
120
|
+
<dl class="constants">
|
121
|
+
|
122
|
+
<dt id="API_ENDPOINT-constant" class="">API_ENDPOINT =
|
123
|
+
<div class="docstring">
|
124
|
+
<div class="discussion">
|
125
|
+
|
126
|
+
<p>RARBG API endpoint.</p>
|
127
|
+
|
128
|
+
|
129
|
+
</div>
|
130
|
+
</div>
|
131
|
+
<div class="tags">
|
132
|
+
|
133
|
+
|
134
|
+
</div>
|
135
|
+
</dt>
|
136
|
+
<dd><pre class="code"><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>https://torrentapi.org/pubapi_v2.php</span><span class='tstring_end'>'</span></span></pre></dd>
|
137
|
+
|
138
|
+
<dt id="APP_ID-constant" class="">APP_ID =
|
139
|
+
<div class="docstring">
|
140
|
+
<div class="discussion">
|
141
|
+
|
142
|
+
<p>App name identifier.</p>
|
143
|
+
|
144
|
+
|
145
|
+
</div>
|
146
|
+
</div>
|
147
|
+
<div class="tags">
|
148
|
+
|
149
|
+
|
150
|
+
</div>
|
151
|
+
</dt>
|
152
|
+
<dd><pre class="code"><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>rarbg-rubygem</span><span class='tstring_end'>'</span></span></pre></dd>
|
153
|
+
|
154
|
+
<dt id="TOKEN_EXPIRATION-constant" class="">TOKEN_EXPIRATION =
|
155
|
+
<div class="docstring">
|
156
|
+
<div class="discussion">
|
157
|
+
|
158
|
+
<p>Default token expiration time.</p>
|
159
|
+
|
160
|
+
|
161
|
+
</div>
|
162
|
+
</div>
|
163
|
+
<div class="tags">
|
164
|
+
|
165
|
+
|
166
|
+
</div>
|
167
|
+
</dt>
|
168
|
+
<dd><pre class="code"><span class='int'>800</span></pre></dd>
|
169
|
+
|
170
|
+
<dt id="RATE_LIMIT-constant" class="">RATE_LIMIT =
|
171
|
+
<div class="docstring">
|
172
|
+
<div class="discussion">
|
173
|
+
|
174
|
+
<p>Default API rate limit.</p>
|
175
|
+
|
176
|
+
|
177
|
+
</div>
|
178
|
+
</div>
|
179
|
+
<div class="tags">
|
180
|
+
|
181
|
+
|
182
|
+
</div>
|
183
|
+
</dt>
|
184
|
+
<dd><pre class="code"><span class='float'>2.1</span></pre></dd>
|
185
|
+
|
186
|
+
</dl>
|
187
|
+
|
188
|
+
|
189
|
+
|
190
|
+
|
191
|
+
|
192
|
+
<h2>Instance Attribute Summary <small><a href="#" class="summary_toggle">collapse</a></small></h2>
|
193
|
+
<ul class="summary">
|
194
|
+
|
195
|
+
<li class="public ">
|
196
|
+
<span class="summary_signature">
|
197
|
+
|
198
|
+
<a href="#conn-instance_method" title="#conn (instance method)">#<strong>conn</strong> ⇒ Faraday::Connection </a>
|
199
|
+
|
200
|
+
|
201
|
+
|
202
|
+
</span>
|
203
|
+
|
204
|
+
|
205
|
+
|
206
|
+
|
207
|
+
<span class="note title readonly">readonly</span>
|
208
|
+
|
209
|
+
|
210
|
+
|
211
|
+
|
212
|
+
|
213
|
+
|
214
|
+
|
215
|
+
|
216
|
+
|
217
|
+
<span class="summary_desc"><div class='inline'>
|
218
|
+
<p>The Faraday connection object.</p>
|
219
|
+
</div></span>
|
220
|
+
|
221
|
+
</li>
|
222
|
+
|
223
|
+
|
224
|
+
<li class="public ">
|
225
|
+
<span class="summary_signature">
|
226
|
+
|
227
|
+
<a href="#last_request-instance_method" title="#last_request (instance method)">#<strong>last_request</strong> ⇒ Integer </a>
|
228
|
+
|
229
|
+
|
230
|
+
|
231
|
+
</span>
|
232
|
+
|
233
|
+
|
234
|
+
|
235
|
+
|
236
|
+
<span class="note title readonly">readonly</span>
|
237
|
+
|
238
|
+
|
239
|
+
|
240
|
+
|
241
|
+
|
242
|
+
|
243
|
+
|
244
|
+
|
245
|
+
|
246
|
+
<span class="summary_desc"><div class='inline'>
|
247
|
+
<p>The monotonic timestamp of the last request performed.</p>
|
248
|
+
</div></span>
|
249
|
+
|
250
|
+
</li>
|
251
|
+
|
252
|
+
|
253
|
+
<li class="public ">
|
254
|
+
<span class="summary_signature">
|
255
|
+
|
256
|
+
<a href="#token-instance_method" title="#token (instance method)">#<strong>token</strong> ⇒ String </a>
|
257
|
+
|
258
|
+
|
259
|
+
|
260
|
+
</span>
|
261
|
+
|
262
|
+
|
263
|
+
|
264
|
+
|
265
|
+
<span class="note title readonly">readonly</span>
|
266
|
+
|
267
|
+
|
268
|
+
|
269
|
+
|
270
|
+
|
271
|
+
|
272
|
+
|
273
|
+
|
274
|
+
|
275
|
+
<span class="summary_desc"><div class='inline'>
|
276
|
+
<p>The token used for authentication.</p>
|
277
|
+
</div></span>
|
278
|
+
|
279
|
+
</li>
|
280
|
+
|
281
|
+
|
282
|
+
<li class="public ">
|
283
|
+
<span class="summary_signature">
|
284
|
+
|
285
|
+
<a href="#token_time-instance_method" title="#token_time (instance method)">#<strong>token_time</strong> ⇒ Integer </a>
|
286
|
+
|
287
|
+
|
288
|
+
|
289
|
+
</span>
|
290
|
+
|
291
|
+
|
292
|
+
|
293
|
+
|
294
|
+
<span class="note title readonly">readonly</span>
|
295
|
+
|
296
|
+
|
297
|
+
|
298
|
+
|
299
|
+
|
300
|
+
|
301
|
+
|
302
|
+
|
303
|
+
|
304
|
+
<span class="summary_desc"><div class='inline'>
|
305
|
+
<p>The monotonic timestamp of the token request.</p>
|
306
|
+
</div></span>
|
307
|
+
|
308
|
+
</li>
|
309
|
+
|
310
|
+
|
311
|
+
</ul>
|
312
|
+
|
313
|
+
|
314
|
+
|
315
|
+
|
316
|
+
|
317
|
+
<h2>
|
318
|
+
Instance Method Summary
|
319
|
+
<small><a href="#" class="summary_toggle">collapse</a></small>
|
320
|
+
</h2>
|
321
|
+
|
322
|
+
<ul class="summary">
|
323
|
+
|
324
|
+
<li class="public ">
|
325
|
+
<span class="summary_signature">
|
326
|
+
|
327
|
+
<a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong> ⇒ API </a>
|
328
|
+
|
329
|
+
|
330
|
+
|
331
|
+
</span>
|
332
|
+
|
333
|
+
|
334
|
+
<span class="note title constructor">constructor</span>
|
335
|
+
|
336
|
+
|
337
|
+
|
338
|
+
|
339
|
+
|
340
|
+
|
341
|
+
|
342
|
+
|
343
|
+
<span class="summary_desc"><div class='inline'>
|
344
|
+
<p>Initialize a new istance of <code>RARBG::API</code>.</p>
|
345
|
+
</div></span>
|
346
|
+
|
347
|
+
</li>
|
348
|
+
|
349
|
+
|
350
|
+
<li class="public ">
|
351
|
+
<span class="summary_signature">
|
352
|
+
|
353
|
+
<a href="#list-instance_method" title="#list (instance method)">#<strong>list</strong>(params = {}) ⇒ Array<Hash> </a>
|
354
|
+
|
355
|
+
|
356
|
+
|
357
|
+
</span>
|
358
|
+
|
359
|
+
|
360
|
+
|
361
|
+
|
362
|
+
|
363
|
+
|
364
|
+
|
365
|
+
|
366
|
+
|
367
|
+
<span class="summary_desc"><div class='inline'>
|
368
|
+
<p>List torrents.</p>
|
369
|
+
</div></span>
|
370
|
+
|
371
|
+
</li>
|
372
|
+
|
373
|
+
|
374
|
+
<li class="public ">
|
375
|
+
<span class="summary_signature">
|
376
|
+
|
377
|
+
<a href="#search-instance_method" title="#search (instance method)">#<strong>search</strong>(params = {}) ⇒ Array<Hash> </a>
|
378
|
+
|
379
|
+
|
380
|
+
|
381
|
+
</span>
|
382
|
+
|
383
|
+
|
384
|
+
|
385
|
+
|
386
|
+
|
387
|
+
|
388
|
+
|
389
|
+
|
390
|
+
|
391
|
+
<span class="summary_desc"><div class='inline'>
|
392
|
+
<p>Search torrents.</p>
|
393
|
+
</div></span>
|
394
|
+
|
395
|
+
</li>
|
396
|
+
|
397
|
+
|
398
|
+
</ul>
|
399
|
+
|
400
|
+
|
401
|
+
<div id="constructor_details" class="method_details_list">
|
402
|
+
<h2>Constructor Details</h2>
|
403
|
+
|
404
|
+
<div class="method_details first">
|
405
|
+
<h3 class="signature first" id="initialize-instance_method">
|
406
|
+
|
407
|
+
#<strong>initialize</strong> ⇒ <tt><span class='object_link'><a href="" title="RARBG::API (class)">API</a></span></tt>
|
408
|
+
|
409
|
+
|
410
|
+
|
411
|
+
|
412
|
+
|
413
|
+
</h3><div class="docstring">
|
414
|
+
<div class="discussion">
|
415
|
+
|
416
|
+
<p>Initialize a new istance of <code>RARBG::API</code>.</p>
|
417
|
+
|
418
|
+
|
419
|
+
</div>
|
420
|
+
</div>
|
421
|
+
<div class="tags">
|
422
|
+
|
423
|
+
<div class="examples">
|
424
|
+
<p class="tag_title">Examples:</p>
|
425
|
+
|
426
|
+
|
427
|
+
<pre class="example code"><code><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="" title="RARBG::API (class)">API</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span></code></pre>
|
428
|
+
|
429
|
+
</div>
|
430
|
+
|
431
|
+
|
432
|
+
</div><table class="source_code">
|
433
|
+
<tr>
|
434
|
+
<td>
|
435
|
+
<pre class="lines">
|
436
|
+
|
437
|
+
|
438
|
+
41
|
439
|
+
42
|
440
|
+
43
|
441
|
+
44
|
442
|
+
45
|
443
|
+
46
|
444
|
+
47
|
445
|
+
48
|
446
|
+
49
|
447
|
+
50
|
448
|
+
51
|
449
|
+
52
|
450
|
+
53
|
451
|
+
54</pre>
|
452
|
+
</td>
|
453
|
+
<td>
|
454
|
+
<pre class="code"><span class="info file"># File 'lib/rarbg/api.rb', line 41</span>
|
455
|
+
|
456
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span>
|
457
|
+
<span class='ivar'>@conn</span> <span class='op'>=</span> <span class='const'>Faraday</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='label'>url:</span> <span class='const'><span class='object_link'><a href="#API_ENDPOINT-constant" title="RARBG::API::API_ENDPOINT (constant)">API_ENDPOINT</a></span></span><span class='rparen'>)</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_conn'>conn</span><span class='op'>|</span>
|
458
|
+
<span class='id identifier rubyid_conn'>conn</span><span class='period'>.</span><span class='id identifier rubyid_request'>request</span> <span class='symbol'>:json</span>
|
459
|
+
<span class='id identifier rubyid_conn'>conn</span><span class='period'>.</span><span class='id identifier rubyid_response'>response</span> <span class='symbol'>:json</span>
|
460
|
+
<span class='id identifier rubyid_conn'>conn</span><span class='period'>.</span><span class='id identifier rubyid_response'>response</span> <span class='symbol'>:logger</span> <span class='kw'>if</span> <span class='gvar'>$VERBOSE</span>
|
461
|
+
<span class='id identifier rubyid_conn'>conn</span><span class='period'>.</span><span class='id identifier rubyid_adapter'>adapter</span> <span class='const'>Faraday</span><span class='period'>.</span><span class='id identifier rubyid_default_adapter'>default_adapter</span>
|
462
|
+
|
463
|
+
<span class='id identifier rubyid_conn'>conn</span><span class='period'>.</span><span class='id identifier rubyid_options'>options</span><span class='period'>.</span><span class='id identifier rubyid_timeout'>timeout</span> <span class='op'>=</span> <span class='int'>90</span>
|
464
|
+
<span class='id identifier rubyid_conn'>conn</span><span class='period'>.</span><span class='id identifier rubyid_options'>options</span><span class='period'>.</span><span class='id identifier rubyid_open_timeout'>open_timeout</span> <span class='op'>=</span> <span class='int'>10</span>
|
465
|
+
|
466
|
+
<span class='id identifier rubyid_conn'>conn</span><span class='period'>.</span><span class='id identifier rubyid_headers'>headers</span><span class='lbracket'>[</span><span class='symbol'>:user_agent</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="#APP_ID-constant" title="RARBG::API::APP_ID (constant)">APP_ID</a></span></span>
|
467
|
+
<span class='id identifier rubyid_conn'>conn</span><span class='period'>.</span><span class='id identifier rubyid_params'>params</span><span class='lbracket'>[</span><span class='symbol'>:app_id</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="#APP_ID-constant" title="RARBG::API::APP_ID (constant)">APP_ID</a></span></span>
|
468
|
+
<span class='kw'>end</span>
|
469
|
+
<span class='kw'>end</span></pre>
|
470
|
+
</td>
|
471
|
+
</tr>
|
472
|
+
</table>
|
473
|
+
</div>
|
474
|
+
|
475
|
+
</div>
|
476
|
+
|
477
|
+
<div id="instance_attr_details" class="attr_details">
|
478
|
+
<h2>Instance Attribute Details</h2>
|
479
|
+
|
480
|
+
|
481
|
+
<span id=""></span>
|
482
|
+
<div class="method_details first">
|
483
|
+
<h3 class="signature first" id="conn-instance_method">
|
484
|
+
|
485
|
+
#<strong>conn</strong> ⇒ <tt>Faraday::Connection</tt> <span class="extras">(readonly)</span>
|
486
|
+
|
487
|
+
|
488
|
+
|
489
|
+
|
490
|
+
|
491
|
+
</h3><div class="docstring">
|
492
|
+
<div class="discussion">
|
493
|
+
|
494
|
+
<p>Returns the Faraday connection object.</p>
|
495
|
+
|
496
|
+
|
497
|
+
</div>
|
498
|
+
</div>
|
499
|
+
<div class="tags">
|
500
|
+
|
501
|
+
<p class="tag_title">Returns:</p>
|
502
|
+
<ul class="return">
|
503
|
+
|
504
|
+
<li>
|
505
|
+
|
506
|
+
|
507
|
+
<span class='type'>(<tt>Faraday::Connection</tt>)</span>
|
508
|
+
|
509
|
+
|
510
|
+
|
511
|
+
—
|
512
|
+
<div class='inline'>
|
513
|
+
<p>the Faraday connection object.</p>
|
514
|
+
</div>
|
515
|
+
|
516
|
+
</li>
|
517
|
+
|
518
|
+
</ul>
|
519
|
+
|
520
|
+
</div><table class="source_code">
|
521
|
+
<tr>
|
522
|
+
<td>
|
523
|
+
<pre class="lines">
|
524
|
+
|
525
|
+
|
526
|
+
26
|
527
|
+
27
|
528
|
+
28</pre>
|
529
|
+
</td>
|
530
|
+
<td>
|
531
|
+
<pre class="code"><span class="info file"># File 'lib/rarbg/api.rb', line 26</span>
|
532
|
+
|
533
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_conn'>conn</span>
|
534
|
+
<span class='ivar'>@conn</span>
|
535
|
+
<span class='kw'>end</span></pre>
|
536
|
+
</td>
|
537
|
+
</tr>
|
538
|
+
</table>
|
539
|
+
</div>
|
540
|
+
|
541
|
+
|
542
|
+
<span id=""></span>
|
543
|
+
<div class="method_details ">
|
544
|
+
<h3 class="signature " id="last_request-instance_method">
|
545
|
+
|
546
|
+
#<strong>last_request</strong> ⇒ <tt>Integer</tt> <span class="extras">(readonly)</span>
|
547
|
+
|
548
|
+
|
549
|
+
|
550
|
+
|
551
|
+
|
552
|
+
</h3><div class="docstring">
|
553
|
+
<div class="discussion">
|
554
|
+
|
555
|
+
<p>Returns the monotonic timestamp of the last request performed.</p>
|
556
|
+
|
557
|
+
|
558
|
+
</div>
|
559
|
+
</div>
|
560
|
+
<div class="tags">
|
561
|
+
|
562
|
+
<p class="tag_title">Returns:</p>
|
563
|
+
<ul class="return">
|
564
|
+
|
565
|
+
<li>
|
566
|
+
|
567
|
+
|
568
|
+
<span class='type'>(<tt>Integer</tt>)</span>
|
569
|
+
|
570
|
+
|
571
|
+
|
572
|
+
—
|
573
|
+
<div class='inline'>
|
574
|
+
<p>the monotonic timestamp of the last request performed.</p>
|
575
|
+
</div>
|
576
|
+
|
577
|
+
</li>
|
578
|
+
|
579
|
+
</ul>
|
580
|
+
|
581
|
+
</div><table class="source_code">
|
582
|
+
<tr>
|
583
|
+
<td>
|
584
|
+
<pre class="lines">
|
585
|
+
|
586
|
+
|
587
|
+
35
|
588
|
+
36
|
589
|
+
37</pre>
|
590
|
+
</td>
|
591
|
+
<td>
|
592
|
+
<pre class="code"><span class="info file"># File 'lib/rarbg/api.rb', line 35</span>
|
593
|
+
|
594
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_last_request'>last_request</span>
|
595
|
+
<span class='ivar'>@last_request</span>
|
596
|
+
<span class='kw'>end</span></pre>
|
597
|
+
</td>
|
598
|
+
</tr>
|
599
|
+
</table>
|
600
|
+
</div>
|
601
|
+
|
602
|
+
|
603
|
+
<span id=""></span>
|
604
|
+
<div class="method_details ">
|
605
|
+
<h3 class="signature " id="token-instance_method">
|
606
|
+
|
607
|
+
#<strong>token</strong> ⇒ <tt>String</tt> <span class="extras">(readonly)</span>
|
608
|
+
|
609
|
+
|
610
|
+
|
611
|
+
|
612
|
+
|
613
|
+
</h3><div class="docstring">
|
614
|
+
<div class="discussion">
|
615
|
+
|
616
|
+
<p>Returns the token used for authentication.</p>
|
617
|
+
|
618
|
+
|
619
|
+
</div>
|
620
|
+
</div>
|
621
|
+
<div class="tags">
|
622
|
+
|
623
|
+
<p class="tag_title">Returns:</p>
|
624
|
+
<ul class="return">
|
625
|
+
|
626
|
+
<li>
|
627
|
+
|
628
|
+
|
629
|
+
<span class='type'>(<tt>String</tt>)</span>
|
630
|
+
|
631
|
+
|
632
|
+
|
633
|
+
—
|
634
|
+
<div class='inline'>
|
635
|
+
<p>the token used for authentication.</p>
|
636
|
+
</div>
|
637
|
+
|
638
|
+
</li>
|
639
|
+
|
640
|
+
</ul>
|
641
|
+
|
642
|
+
</div><table class="source_code">
|
643
|
+
<tr>
|
644
|
+
<td>
|
645
|
+
<pre class="lines">
|
646
|
+
|
647
|
+
|
648
|
+
29
|
649
|
+
30
|
650
|
+
31</pre>
|
651
|
+
</td>
|
652
|
+
<td>
|
653
|
+
<pre class="code"><span class="info file"># File 'lib/rarbg/api.rb', line 29</span>
|
654
|
+
|
655
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_token'>token</span>
|
656
|
+
<span class='ivar'>@token</span>
|
657
|
+
<span class='kw'>end</span></pre>
|
658
|
+
</td>
|
659
|
+
</tr>
|
660
|
+
</table>
|
661
|
+
</div>
|
662
|
+
|
663
|
+
|
664
|
+
<span id=""></span>
|
665
|
+
<div class="method_details ">
|
666
|
+
<h3 class="signature " id="token_time-instance_method">
|
667
|
+
|
668
|
+
#<strong>token_time</strong> ⇒ <tt>Integer</tt> <span class="extras">(readonly)</span>
|
669
|
+
|
670
|
+
|
671
|
+
|
672
|
+
|
673
|
+
|
674
|
+
</h3><div class="docstring">
|
675
|
+
<div class="discussion">
|
676
|
+
|
677
|
+
<p>Returns the monotonic timestamp of the token request.</p>
|
678
|
+
|
679
|
+
|
680
|
+
</div>
|
681
|
+
</div>
|
682
|
+
<div class="tags">
|
683
|
+
|
684
|
+
<p class="tag_title">Returns:</p>
|
685
|
+
<ul class="return">
|
686
|
+
|
687
|
+
<li>
|
688
|
+
|
689
|
+
|
690
|
+
<span class='type'>(<tt>Integer</tt>)</span>
|
691
|
+
|
692
|
+
|
693
|
+
|
694
|
+
—
|
695
|
+
<div class='inline'>
|
696
|
+
<p>the monotonic timestamp of the token request.</p>
|
697
|
+
</div>
|
698
|
+
|
699
|
+
</li>
|
700
|
+
|
701
|
+
</ul>
|
702
|
+
|
703
|
+
</div><table class="source_code">
|
704
|
+
<tr>
|
705
|
+
<td>
|
706
|
+
<pre class="lines">
|
707
|
+
|
708
|
+
|
709
|
+
32
|
710
|
+
33
|
711
|
+
34</pre>
|
712
|
+
</td>
|
713
|
+
<td>
|
714
|
+
<pre class="code"><span class="info file"># File 'lib/rarbg/api.rb', line 32</span>
|
715
|
+
|
716
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_token_time'>token_time</span>
|
717
|
+
<span class='ivar'>@token_time</span>
|
718
|
+
<span class='kw'>end</span></pre>
|
719
|
+
</td>
|
720
|
+
</tr>
|
721
|
+
</table>
|
722
|
+
</div>
|
723
|
+
|
724
|
+
</div>
|
725
|
+
|
726
|
+
|
727
|
+
<div id="instance_method_details" class="method_details_list">
|
728
|
+
<h2>Instance Method Details</h2>
|
729
|
+
|
730
|
+
|
731
|
+
<div class="method_details first">
|
732
|
+
<h3 class="signature first" id="list-instance_method">
|
733
|
+
|
734
|
+
#<strong>list</strong>(params = {}) ⇒ <tt>Array<Hash></tt>
|
735
|
+
|
736
|
+
|
737
|
+
|
738
|
+
|
739
|
+
|
740
|
+
</h3><div class="docstring">
|
741
|
+
<div class="discussion">
|
742
|
+
|
743
|
+
<p>List torrents.</p>
|
744
|
+
|
745
|
+
|
746
|
+
</div>
|
747
|
+
</div>
|
748
|
+
<div class="tags">
|
749
|
+
|
750
|
+
<div class="examples">
|
751
|
+
<p class="tag_title">Examples:</p>
|
752
|
+
|
753
|
+
|
754
|
+
<p class="example_title"><div class='inline'>
|
755
|
+
<p>List last 100 ranked torrents in <code>Movies/x264/1080</code></p>
|
756
|
+
</div></p>
|
757
|
+
|
758
|
+
<pre class="example code"><code><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="" title="RARBG::API (class)">API</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="#initialize-instance_method" title="RARBG::API#initialize (method)">new</a></span></span>
|
759
|
+
<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='comma'>,</span> <span class='label'>ranked:</span> <span class='kw'>true</span><span class='comma'>,</span> <span class='label'>category:</span> <span class='lbracket'>[</span><span class='int'>44</span><span class='rbracket'>]</span><span class='rparen'>)</span></code></pre>
|
760
|
+
|
761
|
+
|
762
|
+
<p class="example_title"><div class='inline'>
|
763
|
+
<p>List torrents with at least 50 seeders</p>
|
764
|
+
</div></p>
|
765
|
+
|
766
|
+
<pre class="example code"><code><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="" title="RARBG::API (class)">API</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="#initialize-instance_method" title="RARBG::API#initialize (method)">new</a></span></span>
|
767
|
+
<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'>50</span><span class='rparen'>)</span></code></pre>
|
768
|
+
|
769
|
+
</div>
|
770
|
+
<p class="tag_title">Parameters:</p>
|
771
|
+
<ul class="param">
|
772
|
+
|
773
|
+
<li>
|
774
|
+
|
775
|
+
<span class='name'>params</span>
|
776
|
+
|
777
|
+
|
778
|
+
<span class='type'>(<tt>Hash</tt>)</span>
|
779
|
+
|
780
|
+
|
781
|
+
<em class="default">(defaults to: <tt>{}</tt>)</em>
|
782
|
+
|
783
|
+
|
784
|
+
—
|
785
|
+
<div class='inline'>
|
786
|
+
<p>A customizable set of parameters.</p>
|
787
|
+
</div>
|
788
|
+
|
789
|
+
</li>
|
790
|
+
|
791
|
+
</ul>
|
792
|
+
|
793
|
+
|
794
|
+
|
795
|
+
|
796
|
+
<p class="tag_title">Options Hash (<tt>params</tt>):</p>
|
797
|
+
<ul class="option">
|
798
|
+
|
799
|
+
<li>
|
800
|
+
<span class="name">:category</span>
|
801
|
+
<span class="type">(<tt>Array<Integer></tt>)</span>
|
802
|
+
<span class="default">
|
803
|
+
|
804
|
+
</span>
|
805
|
+
|
806
|
+
— <div class='inline'>
|
807
|
+
<p>Filter results by category.</p>
|
808
|
+
</div>
|
809
|
+
|
810
|
+
</li>
|
811
|
+
|
812
|
+
<li>
|
813
|
+
<span class="name">:format</span>
|
814
|
+
<span class="type">(<tt>Symbol</tt>)</span>
|
815
|
+
<span class="default">
|
816
|
+
|
817
|
+
</span>
|
818
|
+
|
819
|
+
— <div class='inline'>
|
820
|
+
<p>Format results. Valid values: <code>:json</code>,
|
821
|
+
<code>:json_extended</code>. Default: <code>:json</code>.</p>
|
822
|
+
</div>
|
823
|
+
|
824
|
+
</li>
|
825
|
+
|
826
|
+
<li>
|
827
|
+
<span class="name">:limit</span>
|
828
|
+
<span class="type">(<tt>Integer</tt>)</span>
|
829
|
+
<span class="default">
|
830
|
+
|
831
|
+
</span>
|
832
|
+
|
833
|
+
— <div class='inline'>
|
834
|
+
<p>Limit results number. Valid values: <code>25</code>, <code>50</code>,
|
835
|
+
<code>100</code>. Default: <code>25</code>.</p>
|
836
|
+
</div>
|
837
|
+
|
838
|
+
</li>
|
839
|
+
|
840
|
+
<li>
|
841
|
+
<span class="name">:min_seeders</span>
|
842
|
+
<span class="type">(<tt>Integer</tt>)</span>
|
843
|
+
<span class="default">
|
844
|
+
|
845
|
+
</span>
|
846
|
+
|
847
|
+
— <div class='inline'>
|
848
|
+
<p>Filter results by minimum seeders.</p>
|
849
|
+
</div>
|
850
|
+
|
851
|
+
</li>
|
852
|
+
|
853
|
+
<li>
|
854
|
+
<span class="name">:min_leechers</span>
|
855
|
+
<span class="type">(<tt>Integer</tt>)</span>
|
856
|
+
<span class="default">
|
857
|
+
|
858
|
+
</span>
|
859
|
+
|
860
|
+
— <div class='inline'>
|
861
|
+
<p>Filter results by minimum leechers.</p>
|
862
|
+
</div>
|
863
|
+
|
864
|
+
</li>
|
865
|
+
|
866
|
+
<li>
|
867
|
+
<span class="name">:ranked</span>
|
868
|
+
<span class="type">(<tt>Boolean</tt>)</span>
|
869
|
+
<span class="default">
|
870
|
+
|
871
|
+
</span>
|
872
|
+
|
873
|
+
— <div class='inline'>
|
874
|
+
<p>Include/exclude unranked torrents. Default: <code>true</code>.</p>
|
875
|
+
</div>
|
876
|
+
|
877
|
+
</li>
|
878
|
+
|
879
|
+
<li>
|
880
|
+
<span class="name">:sort</span>
|
881
|
+
<span class="type">(<tt>Symbol</tt>)</span>
|
882
|
+
<span class="default">
|
883
|
+
|
884
|
+
</span>
|
885
|
+
|
886
|
+
— <div class='inline'>
|
887
|
+
<p>Sort results. Valid values: <code>:last</code>, <code>:seeders</code>,
|
888
|
+
<code>:leechers</code>. Default: <code>:last</code>.</p>
|
889
|
+
</div>
|
890
|
+
|
891
|
+
</li>
|
892
|
+
|
893
|
+
</ul>
|
894
|
+
|
895
|
+
|
896
|
+
<p class="tag_title">Returns:</p>
|
897
|
+
<ul class="return">
|
898
|
+
|
899
|
+
<li>
|
900
|
+
|
901
|
+
|
902
|
+
<span class='type'>(<tt>Array<Hash></tt>)</span>
|
903
|
+
|
904
|
+
|
905
|
+
|
906
|
+
—
|
907
|
+
<div class='inline'>
|
908
|
+
<p>Return torrents that match the specified parameters.</p>
|
909
|
+
</div>
|
910
|
+
|
911
|
+
</li>
|
912
|
+
|
913
|
+
</ul>
|
914
|
+
<p class="tag_title">Raises:</p>
|
915
|
+
<ul class="raise">
|
916
|
+
|
917
|
+
<li>
|
918
|
+
|
919
|
+
|
920
|
+
<span class='type'>(<tt>ArgumentError</tt>)</span>
|
921
|
+
|
922
|
+
|
923
|
+
|
924
|
+
—
|
925
|
+
<div class='inline'>
|
926
|
+
<p>Exception raised if <code>params</code> is not an <code>Hash</code>.</p>
|
927
|
+
</div>
|
928
|
+
|
929
|
+
</li>
|
930
|
+
|
931
|
+
<li>
|
932
|
+
|
933
|
+
|
934
|
+
<span class='type'>(<tt><span class='object_link'><a href="APIError.html" title="RARBG::APIError (class)">RARBG::APIError</a></span></tt>)</span>
|
935
|
+
|
936
|
+
|
937
|
+
|
938
|
+
—
|
939
|
+
<div class='inline'>
|
940
|
+
<p>Exception raised when request fails or endpoint responds with an error.</p>
|
941
|
+
</div>
|
942
|
+
|
943
|
+
</li>
|
944
|
+
|
945
|
+
</ul>
|
946
|
+
|
947
|
+
</div><table class="source_code">
|
948
|
+
<tr>
|
949
|
+
<td>
|
950
|
+
<pre class="lines">
|
951
|
+
|
952
|
+
|
953
|
+
86
|
954
|
+
87
|
955
|
+
88
|
956
|
+
89
|
957
|
+
90
|
958
|
+
91
|
959
|
+
92
|
960
|
+
93
|
961
|
+
94</pre>
|
962
|
+
</td>
|
963
|
+
<td>
|
964
|
+
<pre class="code"><span class="info file"># File 'lib/rarbg/api.rb', line 86</span>
|
965
|
+
|
966
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_list'>list</span><span class='lparen'>(</span><span class='id identifier rubyid_params'>params</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
|
967
|
+
<span class='id identifier rubyid_raise'>raise</span> <span class='const'>ArgumentError</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>Expected params hash</span><span class='tstring_end'>'</span></span> <span class='kw'>unless</span> <span class='id identifier rubyid_params'>params</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'>Hash</span><span class='rparen'>)</span>
|
968
|
+
|
969
|
+
<span class='id identifier rubyid_params'>params</span><span class='period'>.</span><span class='id identifier rubyid_update'>update</span><span class='lparen'>(</span>
|
970
|
+
<span class='label'>mode:</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>list</span><span class='tstring_end'>'</span></span><span class='comma'>,</span>
|
971
|
+
<span class='label'>token:</span> <span class='id identifier rubyid_token?'>token?</span>
|
972
|
+
<span class='rparen'>)</span>
|
973
|
+
<span class='id identifier rubyid_call'>call</span><span class='lparen'>(</span><span class='id identifier rubyid_params'>params</span><span class='rparen'>)</span>
|
974
|
+
<span class='kw'>end</span></pre>
|
975
|
+
</td>
|
976
|
+
</tr>
|
977
|
+
</table>
|
978
|
+
</div>
|
979
|
+
|
980
|
+
<div class="method_details ">
|
981
|
+
<h3 class="signature " id="search-instance_method">
|
982
|
+
|
983
|
+
#<strong>search</strong>(params = {}) ⇒ <tt>Array<Hash></tt>
|
984
|
+
|
985
|
+
|
986
|
+
|
987
|
+
|
988
|
+
|
989
|
+
</h3><div class="docstring">
|
990
|
+
<div class="discussion">
|
991
|
+
|
992
|
+
<p>Search torrents.</p>
|
993
|
+
|
994
|
+
|
995
|
+
</div>
|
996
|
+
</div>
|
997
|
+
<div class="tags">
|
998
|
+
|
999
|
+
<div class="examples">
|
1000
|
+
<p class="tag_title">Examples:</p>
|
1001
|
+
|
1002
|
+
|
1003
|
+
<p class="example_title"><div class='inline'>
|
1004
|
+
<p>Search by IMDb ID, sorted by leechers and in extended format.</p>
|
1005
|
+
</div></p>
|
1006
|
+
|
1007
|
+
<pre class="example code"><code><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="" title="RARBG::API (class)">API</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="#initialize-instance_method" title="RARBG::API#initialize (method)">new</a></span></span>
|
1008
|
+
<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'>'</span><span class='tstring_content'>tt012831</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='label'>sort:</span> <span class='symbol'>:leechers</span><span class='comma'>,</span> <span class='label'>format:</span> <span class='symbol'>:json_extended</span><span class='rparen'>)</span></code></pre>
|
1009
|
+
|
1010
|
+
|
1011
|
+
<p class="example_title"><div class='inline'>
|
1012
|
+
<p>Search unranked torrents by string, with at least 2 seeders.</p>
|
1013
|
+
</div></p>
|
1014
|
+
|
1015
|
+
<pre class="example code"><code><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="" title="RARBG::API (class)">API</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="#initialize-instance_method" title="RARBG::API#initialize (method)">new</a></span></span>
|
1016
|
+
<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'>'</span><span class='tstring_content'>Star Wars</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='label'>ranked:</span> <span class='kw'>false</span><span class='comma'>,</span> <span class='label'>min_seeders:</span> <span class='int'>2</span><span class='rparen'>)</span></code></pre>
|
1017
|
+
|
1018
|
+
</div>
|
1019
|
+
<p class="tag_title">Parameters:</p>
|
1020
|
+
<ul class="param">
|
1021
|
+
|
1022
|
+
<li>
|
1023
|
+
|
1024
|
+
<span class='name'>params</span>
|
1025
|
+
|
1026
|
+
|
1027
|
+
<span class='type'>(<tt>Hash</tt>)</span>
|
1028
|
+
|
1029
|
+
|
1030
|
+
<em class="default">(defaults to: <tt>{}</tt>)</em>
|
1031
|
+
|
1032
|
+
|
1033
|
+
—
|
1034
|
+
<div class='inline'>
|
1035
|
+
<p>A customizable set of parameters.</p>
|
1036
|
+
</div>
|
1037
|
+
|
1038
|
+
</li>
|
1039
|
+
|
1040
|
+
</ul>
|
1041
|
+
|
1042
|
+
|
1043
|
+
|
1044
|
+
|
1045
|
+
<p class="tag_title">Options Hash (<tt>params</tt>):</p>
|
1046
|
+
<ul class="option">
|
1047
|
+
|
1048
|
+
<li>
|
1049
|
+
<span class="name">:string</span>
|
1050
|
+
<span class="type">(<tt>String</tt>)</span>
|
1051
|
+
<span class="default">
|
1052
|
+
|
1053
|
+
</span>
|
1054
|
+
|
1055
|
+
— <div class='inline'>
|
1056
|
+
<p>Search by string.</p>
|
1057
|
+
</div>
|
1058
|
+
|
1059
|
+
</li>
|
1060
|
+
|
1061
|
+
<li>
|
1062
|
+
<span class="name">:imdb</span>
|
1063
|
+
<span class="type">(<tt>String</tt>)</span>
|
1064
|
+
<span class="default">
|
1065
|
+
|
1066
|
+
</span>
|
1067
|
+
|
1068
|
+
— <div class='inline'>
|
1069
|
+
<p>Search by IMDb id.</p>
|
1070
|
+
</div>
|
1071
|
+
|
1072
|
+
</li>
|
1073
|
+
|
1074
|
+
<li>
|
1075
|
+
<span class="name">:tvdb</span>
|
1076
|
+
<span class="type">(<tt>String</tt>)</span>
|
1077
|
+
<span class="default">
|
1078
|
+
|
1079
|
+
</span>
|
1080
|
+
|
1081
|
+
— <div class='inline'>
|
1082
|
+
<p>Search by TVDB id.</p>
|
1083
|
+
</div>
|
1084
|
+
|
1085
|
+
</li>
|
1086
|
+
|
1087
|
+
<li>
|
1088
|
+
<span class="name">:themoviedb</span>
|
1089
|
+
<span class="type">(<tt>String</tt>)</span>
|
1090
|
+
<span class="default">
|
1091
|
+
|
1092
|
+
</span>
|
1093
|
+
|
1094
|
+
— <div class='inline'>
|
1095
|
+
<p>Search by The Movie DB id.</p>
|
1096
|
+
</div>
|
1097
|
+
|
1098
|
+
</li>
|
1099
|
+
|
1100
|
+
<li>
|
1101
|
+
<span class="name">:category</span>
|
1102
|
+
<span class="type">(<tt>Array<Integer></tt>)</span>
|
1103
|
+
<span class="default">
|
1104
|
+
|
1105
|
+
</span>
|
1106
|
+
|
1107
|
+
— <div class='inline'>
|
1108
|
+
<p>Filter results by category.</p>
|
1109
|
+
</div>
|
1110
|
+
|
1111
|
+
</li>
|
1112
|
+
|
1113
|
+
<li>
|
1114
|
+
<span class="name">:format</span>
|
1115
|
+
<span class="type">(<tt>Symbol</tt>)</span>
|
1116
|
+
<span class="default">
|
1117
|
+
|
1118
|
+
</span>
|
1119
|
+
|
1120
|
+
— <div class='inline'>
|
1121
|
+
<p>Format results. Valid values: <code>:json</code>,
|
1122
|
+
<code>:json_extended</code>. Default: <code>:json</code></p>
|
1123
|
+
</div>
|
1124
|
+
|
1125
|
+
</li>
|
1126
|
+
|
1127
|
+
<li>
|
1128
|
+
<span class="name">:limit</span>
|
1129
|
+
<span class="type">(<tt>Integer</tt>)</span>
|
1130
|
+
<span class="default">
|
1131
|
+
|
1132
|
+
</span>
|
1133
|
+
|
1134
|
+
— <div class='inline'>
|
1135
|
+
<p>Limit results number. Valid values: <code>25</code>, <code>50</code>,
|
1136
|
+
<code>100</code>. Default: <code>25</code>.</p>
|
1137
|
+
</div>
|
1138
|
+
|
1139
|
+
</li>
|
1140
|
+
|
1141
|
+
<li>
|
1142
|
+
<span class="name">:min_seeders</span>
|
1143
|
+
<span class="type">(<tt>Integer</tt>)</span>
|
1144
|
+
<span class="default">
|
1145
|
+
|
1146
|
+
</span>
|
1147
|
+
|
1148
|
+
— <div class='inline'>
|
1149
|
+
<p>Filter results by minimum seeders.</p>
|
1150
|
+
</div>
|
1151
|
+
|
1152
|
+
</li>
|
1153
|
+
|
1154
|
+
<li>
|
1155
|
+
<span class="name">:min_leechers</span>
|
1156
|
+
<span class="type">(<tt>Integer</tt>)</span>
|
1157
|
+
<span class="default">
|
1158
|
+
|
1159
|
+
</span>
|
1160
|
+
|
1161
|
+
— <div class='inline'>
|
1162
|
+
<p>Filter results by minimum leechers.</p>
|
1163
|
+
</div>
|
1164
|
+
|
1165
|
+
</li>
|
1166
|
+
|
1167
|
+
<li>
|
1168
|
+
<span class="name">:ranked</span>
|
1169
|
+
<span class="type">(<tt>Boolean</tt>)</span>
|
1170
|
+
<span class="default">
|
1171
|
+
|
1172
|
+
</span>
|
1173
|
+
|
1174
|
+
— <div class='inline'>
|
1175
|
+
<p>Include/exclude unranked torrents. Default: <code>true</code>.</p>
|
1176
|
+
</div>
|
1177
|
+
|
1178
|
+
</li>
|
1179
|
+
|
1180
|
+
<li>
|
1181
|
+
<span class="name">:sort</span>
|
1182
|
+
<span class="type">(<tt>Symbol</tt>)</span>
|
1183
|
+
<span class="default">
|
1184
|
+
|
1185
|
+
</span>
|
1186
|
+
|
1187
|
+
— <div class='inline'>
|
1188
|
+
<p>Sort results. Valid values: <code>:last</code>, <code>:seeders</code>,
|
1189
|
+
<code>:leechers</code>. Default: <code>:last</code>.</p>
|
1190
|
+
</div>
|
1191
|
+
|
1192
|
+
</li>
|
1193
|
+
|
1194
|
+
</ul>
|
1195
|
+
|
1196
|
+
|
1197
|
+
<p class="tag_title">Returns:</p>
|
1198
|
+
<ul class="return">
|
1199
|
+
|
1200
|
+
<li>
|
1201
|
+
|
1202
|
+
|
1203
|
+
<span class='type'>(<tt>Array<Hash></tt>)</span>
|
1204
|
+
|
1205
|
+
|
1206
|
+
|
1207
|
+
—
|
1208
|
+
<div class='inline'>
|
1209
|
+
<p>Return torrents that match the specified parameters.</p>
|
1210
|
+
</div>
|
1211
|
+
|
1212
|
+
</li>
|
1213
|
+
|
1214
|
+
</ul>
|
1215
|
+
<p class="tag_title">Raises:</p>
|
1216
|
+
<ul class="raise">
|
1217
|
+
|
1218
|
+
<li>
|
1219
|
+
|
1220
|
+
|
1221
|
+
<span class='type'>(<tt>ArgumentError</tt>)</span>
|
1222
|
+
|
1223
|
+
|
1224
|
+
|
1225
|
+
—
|
1226
|
+
<div class='inline'>
|
1227
|
+
<p>Exception raised if <code>params</code> is not an <code>Hash</code>.</p>
|
1228
|
+
</div>
|
1229
|
+
|
1230
|
+
</li>
|
1231
|
+
|
1232
|
+
<li>
|
1233
|
+
|
1234
|
+
|
1235
|
+
<span class='type'>(<tt>ArgumentError</tt>)</span>
|
1236
|
+
|
1237
|
+
|
1238
|
+
|
1239
|
+
—
|
1240
|
+
<div class='inline'>
|
1241
|
+
<p>Exception raised if no search type param is passed (among
|
1242
|
+
<code>string</code>, <code>imdb</code>, <code>tvdb</code>,
|
1243
|
+
<code>themoviedb</code>).</p>
|
1244
|
+
</div>
|
1245
|
+
|
1246
|
+
</li>
|
1247
|
+
|
1248
|
+
<li>
|
1249
|
+
|
1250
|
+
|
1251
|
+
<span class='type'>(<tt><span class='object_link'><a href="APIError.html" title="RARBG::APIError (class)">RARBG::APIError</a></span></tt>)</span>
|
1252
|
+
|
1253
|
+
|
1254
|
+
|
1255
|
+
—
|
1256
|
+
<div class='inline'>
|
1257
|
+
<p>Exception raised when request fails or endpoint responds with an error.</p>
|
1258
|
+
</div>
|
1259
|
+
|
1260
|
+
</li>
|
1261
|
+
|
1262
|
+
</ul>
|
1263
|
+
|
1264
|
+
</div><table class="source_code">
|
1265
|
+
<tr>
|
1266
|
+
<td>
|
1267
|
+
<pre class="lines">
|
1268
|
+
|
1269
|
+
|
1270
|
+
133
|
1271
|
+
134
|
1272
|
+
135
|
1273
|
+
136
|
1274
|
+
137
|
1275
|
+
138
|
1276
|
+
139
|
1277
|
+
140
|
1278
|
+
141</pre>
|
1279
|
+
</td>
|
1280
|
+
<td>
|
1281
|
+
<pre class="code"><span class="info file"># File 'lib/rarbg/api.rb', line 133</span>
|
1282
|
+
|
1283
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_search'>search</span><span class='lparen'>(</span><span class='id identifier rubyid_params'>params</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
|
1284
|
+
<span class='id identifier rubyid_raise'>raise</span> <span class='const'>ArgumentError</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>Expected params hash</span><span class='tstring_end'>'</span></span> <span class='kw'>unless</span> <span class='id identifier rubyid_params'>params</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'>Hash</span><span class='rparen'>)</span>
|
1285
|
+
|
1286
|
+
<span class='id identifier rubyid_params'>params</span><span class='period'>.</span><span class='id identifier rubyid_update'>update</span><span class='lparen'>(</span>
|
1287
|
+
<span class='label'>mode:</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>search</span><span class='tstring_end'>'</span></span><span class='comma'>,</span>
|
1288
|
+
<span class='label'>token:</span> <span class='id identifier rubyid_token?'>token?</span>
|
1289
|
+
<span class='rparen'>)</span>
|
1290
|
+
<span class='id identifier rubyid_call'>call</span><span class='lparen'>(</span><span class='id identifier rubyid_params'>params</span><span class='rparen'>)</span>
|
1291
|
+
<span class='kw'>end</span></pre>
|
1292
|
+
</td>
|
1293
|
+
</tr>
|
1294
|
+
</table>
|
1295
|
+
</div>
|
1296
|
+
|
1297
|
+
</div>
|
1298
|
+
|
1299
|
+
</div>
|
1300
|
+
|
1301
|
+
<div id="footer">
|
1302
|
+
Generated on Fri Oct 19 11:11:04 2018 by
|
1303
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
1304
|
+
0.9.16 (ruby-2.4.5).
|
1305
|
+
</div>
|
1306
|
+
|
1307
|
+
</div>
|
1308
|
+
</body>
|
1309
|
+
</html>
|