rsteamshot 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (74) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +12 -0
  3. data/.rspec +2 -0
  4. data/.travis.yml +5 -0
  5. data/CHANGELOG.md +5 -0
  6. data/CODE_OF_CONDUCT.md +74 -0
  7. data/Gemfile +6 -0
  8. data/LICENSE.txt +21 -0
  9. data/README.md +118 -0
  10. data/Rakefile +14 -0
  11. data/bin/console +14 -0
  12. data/bin/setup +8 -0
  13. data/docs/README_md.html +233 -0
  14. data/docs/Rsteamshot/App/BadAppsFile.html +106 -0
  15. data/docs/Rsteamshot/App.html +466 -0
  16. data/docs/Rsteamshot/Screenshot.html +562 -0
  17. data/docs/Rsteamshot/ScreenshotPage.html +347 -0
  18. data/docs/Rsteamshot/ScreenshotPaginator.html +307 -0
  19. data/docs/Rsteamshot/User.html +309 -0
  20. data/docs/Rsteamshot.html +147 -0
  21. data/docs/created.rid +9 -0
  22. data/docs/css/fonts.css +167 -0
  23. data/docs/css/rdoc.css +590 -0
  24. data/docs/fonts/Lato-Light.ttf +0 -0
  25. data/docs/fonts/Lato-LightItalic.ttf +0 -0
  26. data/docs/fonts/Lato-Regular.ttf +0 -0
  27. data/docs/fonts/Lato-RegularItalic.ttf +0 -0
  28. data/docs/fonts/SourceCodePro-Bold.ttf +0 -0
  29. data/docs/fonts/SourceCodePro-Regular.ttf +0 -0
  30. data/docs/images/add.png +0 -0
  31. data/docs/images/arrow_up.png +0 -0
  32. data/docs/images/brick.png +0 -0
  33. data/docs/images/brick_link.png +0 -0
  34. data/docs/images/bug.png +0 -0
  35. data/docs/images/bullet_black.png +0 -0
  36. data/docs/images/bullet_toggle_minus.png +0 -0
  37. data/docs/images/bullet_toggle_plus.png +0 -0
  38. data/docs/images/date.png +0 -0
  39. data/docs/images/delete.png +0 -0
  40. data/docs/images/find.png +0 -0
  41. data/docs/images/loadingAnimation.gif +0 -0
  42. data/docs/images/macFFBgHack.png +0 -0
  43. data/docs/images/package.png +0 -0
  44. data/docs/images/page_green.png +0 -0
  45. data/docs/images/page_white_text.png +0 -0
  46. data/docs/images/page_white_width.png +0 -0
  47. data/docs/images/plugin.png +0 -0
  48. data/docs/images/ruby.png +0 -0
  49. data/docs/images/tag_blue.png +0 -0
  50. data/docs/images/tag_green.png +0 -0
  51. data/docs/images/transparent.png +0 -0
  52. data/docs/images/wrench.png +0 -0
  53. data/docs/images/wrench_orange.png +0 -0
  54. data/docs/images/zoom.png +0 -0
  55. data/docs/index.html +242 -0
  56. data/docs/js/darkfish.js +161 -0
  57. data/docs/js/jquery.js +4 -0
  58. data/docs/js/navigation.js +142 -0
  59. data/docs/js/navigation.js.gz +0 -0
  60. data/docs/js/search.js +109 -0
  61. data/docs/js/search_index.js +1 -0
  62. data/docs/js/search_index.js.gz +0 -0
  63. data/docs/js/searcher.js +229 -0
  64. data/docs/js/searcher.js.gz +0 -0
  65. data/docs/table_of_contents.html +179 -0
  66. data/lib/rsteamshot/app.rb +213 -0
  67. data/lib/rsteamshot/screenshot.rb +224 -0
  68. data/lib/rsteamshot/screenshot_page.rb +62 -0
  69. data/lib/rsteamshot/screenshot_paginator.rb +77 -0
  70. data/lib/rsteamshot/user.rb +77 -0
  71. data/lib/rsteamshot/version.rb +4 -0
  72. data/lib/rsteamshot.rb +15 -0
  73. data/rsteamshot.gemspec +32 -0
  74. metadata +215 -0
@@ -0,0 +1,347 @@
1
+ <!DOCTYPE html>
2
+
3
+ <html>
4
+ <head>
5
+ <meta charset="UTF-8">
6
+
7
+ <title>class Rsteamshot::ScreenshotPage - RDoc Documentation</title>
8
+
9
+ <script type="text/javascript">
10
+ var rdoc_rel_prefix = "../";
11
+ var index_rel_prefix = "../";
12
+ </script>
13
+
14
+ <script src="../js/jquery.js"></script>
15
+ <script src="../js/darkfish.js"></script>
16
+
17
+ <link href="../css/fonts.css" rel="stylesheet">
18
+ <link href="../css/rdoc.css" rel="stylesheet">
19
+
20
+
21
+
22
+ <body id="top" role="document" class="class">
23
+ <nav role="navigation">
24
+ <div id="project-navigation">
25
+ <div id="home-section" role="region" title="Quick navigation" class="nav-section">
26
+ <h2>
27
+ <a href="../index.html" rel="home">Home</a>
28
+ </h2>
29
+
30
+ <div id="table-of-contents-navigation">
31
+ <a href="../table_of_contents.html#pages">Pages</a>
32
+ <a href="../table_of_contents.html#classes">Classes</a>
33
+ <a href="../table_of_contents.html#methods">Methods</a>
34
+ </div>
35
+ </div>
36
+
37
+ <div id="search-section" role="search" class="project-section initially-hidden">
38
+ <form action="#" method="get" accept-charset="utf-8">
39
+ <div id="search-field-wrapper">
40
+ <input id="search-field" role="combobox" aria-label="Search"
41
+ aria-autocomplete="list" aria-controls="search-results"
42
+ type="text" name="search" placeholder="Search" spellcheck="false"
43
+ title="Type to search, Up and Down to navigate, Enter to load">
44
+ </div>
45
+
46
+ <ul id="search-results" aria-label="Search Results"
47
+ aria-busy="false" aria-expanded="false"
48
+ aria-atomic="false" class="initially-hidden"></ul>
49
+ </form>
50
+ </div>
51
+
52
+ </div>
53
+
54
+
55
+
56
+ <div id="class-metadata">
57
+ <div id="sections-section" class="nav-section">
58
+ <h3>Sections</h3>
59
+
60
+ <ul class="link-list" role="directory">
61
+
62
+ <li><a href="#5Buntitled-5D"></a></li>
63
+
64
+ <li><a href="#Public">Public</a></li>
65
+
66
+ </ul>
67
+ </div>
68
+
69
+ <div id="parent-class-section" class="nav-section">
70
+ <h3>Parent</h3>
71
+
72
+
73
+ <p class="link">Object
74
+
75
+ </div>
76
+
77
+
78
+
79
+ <!-- Method Quickref -->
80
+ <div id="method-list-section" class="nav-section">
81
+ <h3>Methods</h3>
82
+
83
+ <ul class="link-list" role="directory">
84
+
85
+ <li ><a href="#method-c-new">::new</a>
86
+
87
+ <li ><a href="#method-i-fetch">#fetch</a>
88
+
89
+ <li ><a href="#method-i-includes_screenshot-3F">#includes_screenshot?</a>
90
+
91
+ </ul>
92
+ </div>
93
+
94
+ </div>
95
+ </nav>
96
+
97
+ <main role="main" aria-labelledby="class-Rsteamshot::ScreenshotPage">
98
+ <h1 id="class-Rsteamshot::ScreenshotPage" class="class">
99
+ class Rsteamshot::ScreenshotPage
100
+ </h1>
101
+
102
+ <section class="description">
103
+
104
+ <p>Represents a page of screenshots on Steam.</p>
105
+
106
+ </section>
107
+
108
+
109
+
110
+
111
+ <section id="5Buntitled-5D" class="documentation-section">
112
+
113
+
114
+
115
+
116
+
117
+
118
+
119
+
120
+
121
+ </section>
122
+
123
+
124
+
125
+ <section id="Public" class="documentation-section">
126
+
127
+ <header class="documentation-section-title">
128
+ <h2>
129
+ Public
130
+ </h2>
131
+ <span class="section-click-top">
132
+ <a href="#top">&uarr; top</a>
133
+ </span>
134
+ </header>
135
+
136
+
137
+
138
+
139
+
140
+
141
+
142
+ <section class="attribute-method-details" class="method-section">
143
+ <header>
144
+ <h3>Attributes</h3>
145
+ </header>
146
+
147
+
148
+ <div id="attribute-i-number" class="method-detail">
149
+ <div class="method-heading attribute-method-heading">
150
+ <span class="method-name">number</span><span
151
+ class="attribute-access-type">[R]</span>
152
+ </div>
153
+
154
+ <div class="method-description">
155
+
156
+ <h3 id="attribute-i-number-label-Returns">Returns<span><a href="#attribute-i-number-label-Returns">&para;</a> <a href="#top">&uarr;</a></span></h3>
157
+
158
+ <p>Returns the Integer number of this page.</p>
159
+
160
+ </div>
161
+ </div>
162
+
163
+ <div id="attribute-i-per_page" class="method-detail">
164
+ <div class="method-heading attribute-method-heading">
165
+ <span class="method-name">per_page</span><span
166
+ class="attribute-access-type">[R]</span>
167
+ </div>
168
+
169
+ <div class="method-description">
170
+
171
+ <h3 id="attribute-i-per_page-label-Returns">Returns<span><a href="#attribute-i-per_page-label-Returns">&para;</a> <a href="#top">&uarr;</a></span></h3>
172
+
173
+ <p>Returns the Integer count of how many screenshots to fetch per page.</p>
174
+
175
+ </div>
176
+ </div>
177
+
178
+ <div id="attribute-i-screenshots" class="method-detail">
179
+ <div class="method-heading attribute-method-heading">
180
+ <span class="method-name">screenshots</span><span
181
+ class="attribute-access-type">[R]</span>
182
+ </div>
183
+
184
+ <div class="method-description">
185
+
186
+ <h3 id="attribute-i-screenshots-label-Returns">Returns<span><a href="#attribute-i-screenshots-label-Returns">&para;</a> <a href="#top">&uarr;</a></span></h3>
187
+
188
+ <p>Returns an Array of the Rsteamshot::Screenshots found on this page.</p>
189
+
190
+ </div>
191
+ </div>
192
+
193
+ </section>
194
+
195
+
196
+
197
+ <section id="public-class-Public-method-details" class="method-section">
198
+ <header>
199
+ <h3>Public Class Methods</h3>
200
+ </header>
201
+
202
+
203
+ <div id="method-c-new" class="method-detail ">
204
+
205
+ <div class="method-heading">
206
+ <span class="method-name">new</span><span
207
+ class="method-args">(number, per_page)</span>
208
+
209
+ <span class="method-click-advice">click to toggle source</span>
210
+
211
+ </div>
212
+
213
+
214
+ <div class="method-description">
215
+
216
+ <p>Construct a new <a href="ScreenshotPage.html">ScreenshotPage</a> with the
217
+ given page number.</p>
218
+ <dl class="rdoc-list note-list"><dt>number
219
+ <dd>
220
+ <p>the page number; Integer</p>
221
+ </dd><dt><a href="ScreenshotPage.html#attribute-i-per_page">#per_page</a>
222
+ <dd>
223
+ <p>how many screenshots are shown on the Steam page</p>
224
+ </dd></dl>
225
+
226
+
227
+
228
+
229
+ <div class="method-source-code" id="new-source">
230
+ <pre><span class="ruby-comment"># File lib/rsteamshot/screenshot_page.rb, line 17</span>
231
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">number</span>, <span class="ruby-identifier">per_page</span>)
232
+ <span class="ruby-ivar">@number</span> = <span class="ruby-identifier">number</span>
233
+ <span class="ruby-ivar">@per_page</span> = <span class="ruby-identifier">per_page</span>
234
+ <span class="ruby-keyword">end</span></pre>
235
+ </div>
236
+
237
+ </div>
238
+
239
+
240
+
241
+
242
+ </div>
243
+
244
+
245
+ </section>
246
+
247
+ <section id="public-instance-Public-method-details" class="method-section">
248
+ <header>
249
+ <h3>Public Instance Methods</h3>
250
+ </header>
251
+
252
+
253
+ <div id="method-i-fetch" class="method-detail ">
254
+
255
+ <div class="method-heading">
256
+ <span class="method-name">fetch</span><span
257
+ class="method-args">(base_url) { |html| ... }</span>
258
+
259
+ <span class="method-click-advice">click to toggle source</span>
260
+
261
+ </div>
262
+
263
+
264
+ <div class="method-description">
265
+
266
+ <p>Fetch the contents of this page from Steam.</p>
267
+
268
+ <h3 id="method-i-fetch-label-Returns">Returns<span><a href="#method-i-fetch-label-Returns">&para;</a> <a href="#top">&uarr;</a></span></h3>
269
+
270
+ <p>Returns a Mechanize::Page.</p>
271
+
272
+
273
+
274
+
275
+ <div class="method-source-code" id="fetch-source">
276
+ <pre><span class="ruby-comment"># File lib/rsteamshot/screenshot_page.rb, line 34</span>
277
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">fetch</span>(<span class="ruby-identifier">base_url</span>)
278
+ <span class="ruby-keyword">return</span> <span class="ruby-keyword">if</span> <span class="ruby-ivar">@screenshots</span> <span class="ruby-comment"># already fetched</span>
279
+
280
+ <span class="ruby-identifier">url</span> = <span class="ruby-identifier">with_steam_page_param</span>(<span class="ruby-identifier">base_url</span>)
281
+ <span class="ruby-constant">Mechanize</span>.<span class="ruby-identifier">new</span>.<span class="ruby-identifier">get</span>(<span class="ruby-identifier">url</span>) <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">html</span><span class="ruby-operator">|</span>
282
+ <span class="ruby-ivar">@screenshots</span> = <span class="ruby-keyword">yield</span>(<span class="ruby-identifier">html</span>)
283
+ <span class="ruby-keyword">end</span>
284
+ <span class="ruby-keyword">end</span></pre>
285
+ </div>
286
+
287
+ </div>
288
+
289
+
290
+
291
+
292
+ </div>
293
+
294
+
295
+ <div id="method-i-includes_screenshot-3F" class="method-detail ">
296
+
297
+ <div class="method-heading">
298
+ <span class="method-name">includes_screenshot?</span><span
299
+ class="method-args">(screenshot_number)</span>
300
+
301
+ <span class="method-click-advice">click to toggle source</span>
302
+
303
+ </div>
304
+
305
+
306
+ <div class="method-description">
307
+
308
+ <p>Check if the nth screenshot would be on this page on Steam.</p>
309
+ <dl class="rdoc-list note-list"><dt>screenshot_number
310
+ <dd>
311
+ <p>the index of the screenshot you want to check</p>
312
+ </dd></dl>
313
+
314
+ <h3 id="method-i-includes_screenshot-3F-label-Returns">Returns<span><a href="#method-i-includes_screenshot-3F-label-Returns">&para;</a> <a href="#top">&uarr;</a></span></h3>
315
+
316
+ <p>Returns a Boolean.</p>
317
+
318
+
319
+
320
+
321
+ <div class="method-source-code" id="includes_screenshot-3F-source">
322
+ <pre><span class="ruby-comment"># File lib/rsteamshot/screenshot_page.rb, line 27</span>
323
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">includes_screenshot?</span>(<span class="ruby-identifier">screenshot_number</span>)
324
+ <span class="ruby-identifier">range</span>.<span class="ruby-identifier">cover?</span>(<span class="ruby-identifier">screenshot_number</span>)
325
+ <span class="ruby-keyword">end</span></pre>
326
+ </div>
327
+
328
+ </div>
329
+
330
+
331
+
332
+
333
+ </div>
334
+
335
+
336
+ </section>
337
+
338
+ </section>
339
+ </main>
340
+
341
+
342
+ <footer id="validator-badges" role="contentinfo">
343
+ <p><a href="http://validator.w3.org/check/referer">Validate</a>
344
+ <p>Generated by <a href="https://rdoc.github.io/rdoc">RDoc</a> 5.1.0.
345
+ <p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
346
+ </footer>
347
+
@@ -0,0 +1,307 @@
1
+ <!DOCTYPE html>
2
+
3
+ <html>
4
+ <head>
5
+ <meta charset="UTF-8">
6
+
7
+ <title>class Rsteamshot::ScreenshotPaginator - RDoc Documentation</title>
8
+
9
+ <script type="text/javascript">
10
+ var rdoc_rel_prefix = "../";
11
+ var index_rel_prefix = "../";
12
+ </script>
13
+
14
+ <script src="../js/jquery.js"></script>
15
+ <script src="../js/darkfish.js"></script>
16
+
17
+ <link href="../css/fonts.css" rel="stylesheet">
18
+ <link href="../css/rdoc.css" rel="stylesheet">
19
+
20
+
21
+
22
+ <body id="top" role="document" class="class">
23
+ <nav role="navigation">
24
+ <div id="project-navigation">
25
+ <div id="home-section" role="region" title="Quick navigation" class="nav-section">
26
+ <h2>
27
+ <a href="../index.html" rel="home">Home</a>
28
+ </h2>
29
+
30
+ <div id="table-of-contents-navigation">
31
+ <a href="../table_of_contents.html#pages">Pages</a>
32
+ <a href="../table_of_contents.html#classes">Classes</a>
33
+ <a href="../table_of_contents.html#methods">Methods</a>
34
+ </div>
35
+ </div>
36
+
37
+ <div id="search-section" role="search" class="project-section initially-hidden">
38
+ <form action="#" method="get" accept-charset="utf-8">
39
+ <div id="search-field-wrapper">
40
+ <input id="search-field" role="combobox" aria-label="Search"
41
+ aria-autocomplete="list" aria-controls="search-results"
42
+ type="text" name="search" placeholder="Search" spellcheck="false"
43
+ title="Type to search, Up and Down to navigate, Enter to load">
44
+ </div>
45
+
46
+ <ul id="search-results" aria-label="Search Results"
47
+ aria-busy="false" aria-expanded="false"
48
+ aria-atomic="false" class="initially-hidden"></ul>
49
+ </form>
50
+ </div>
51
+
52
+ </div>
53
+
54
+
55
+
56
+ <div id="class-metadata">
57
+ <div id="sections-section" class="nav-section">
58
+ <h3>Sections</h3>
59
+
60
+ <ul class="link-list" role="directory">
61
+
62
+ <li><a href="#5Buntitled-5D"></a></li>
63
+
64
+ <li><a href="#Public">Public</a></li>
65
+
66
+ </ul>
67
+ </div>
68
+
69
+ <div id="parent-class-section" class="nav-section">
70
+ <h3>Parent</h3>
71
+
72
+
73
+ <p class="link">Object
74
+
75
+ </div>
76
+
77
+
78
+
79
+ <!-- Method Quickref -->
80
+ <div id="method-list-section" class="nav-section">
81
+ <h3>Methods</h3>
82
+
83
+ <ul class="link-list" role="directory">
84
+
85
+ <li ><a href="#method-c-new">::new</a>
86
+
87
+ <li ><a href="#method-i-per_page">#per_page</a>
88
+
89
+ <li ><a href="#method-i-screenshots">#screenshots</a>
90
+
91
+ </ul>
92
+ </div>
93
+
94
+ </div>
95
+ </nav>
96
+
97
+ <main role="main" aria-labelledby="class-Rsteamshot::ScreenshotPaginator">
98
+ <h1 id="class-Rsteamshot::ScreenshotPaginator" class="class">
99
+ class Rsteamshot::ScreenshotPaginator
100
+ </h1>
101
+
102
+ <section class="description">
103
+
104
+ <p>Use to paginate screenshots fetched from Steam in chunks of fewer than 50
105
+ per page.</p>
106
+
107
+ </section>
108
+
109
+
110
+
111
+
112
+ <section id="5Buntitled-5D" class="documentation-section">
113
+
114
+
115
+
116
+
117
+
118
+
119
+
120
+
121
+
122
+ </section>
123
+
124
+
125
+
126
+ <section id="Public" class="documentation-section">
127
+
128
+ <header class="documentation-section-title">
129
+ <h2>
130
+ Public
131
+ </h2>
132
+ <span class="section-click-top">
133
+ <a href="#top">&uarr; top</a>
134
+ </span>
135
+ </header>
136
+
137
+
138
+
139
+
140
+
141
+
142
+
143
+
144
+
145
+ <section id="public-class-Public-method-details" class="method-section">
146
+ <header>
147
+ <h3>Public Class Methods</h3>
148
+ </header>
149
+
150
+
151
+ <div id="method-c-new" class="method-detail ">
152
+
153
+ <div class="method-heading">
154
+ <span class="method-name">new</span><span
155
+ class="method-args">(process_html, max_per_page:, per_page: 10, steam_per_page:)</span>
156
+
157
+ <span class="method-click-advice">click to toggle source</span>
158
+
159
+ </div>
160
+
161
+
162
+ <div class="method-description">
163
+
164
+ <p>Construct a new <a href="ScreenshotPaginator.html">ScreenshotPaginator</a>
165
+ that will process a page of HTML using the given lambda.</p>
166
+ <dl class="rdoc-list note-list"><dt>process_html
167
+ <dd>
168
+ <p>a lambda that will take a Mechanize::Page and return a list of <a
169
+ href="Screenshot.html">Rsteamshot::Screenshot</a> instances found in that
170
+ page</p>
171
+ </dd><dt>max_per_page
172
+ <dd>
173
+ <p>the most screenshots that can be returned in a page, based on how many
174
+ screenshots can be shown on the Steam page</p>
175
+ </dd><dt><a href="ScreenshotPaginator.html#method-i-per_page">#per_page</a>
176
+ <dd>
177
+ <p>how many screenshots you want returned; Integer; should be less than or
178
+ equal to max_per_page</p>
179
+ </dd><dt>steam_per_page
180
+ <dd>
181
+ <p>how many screenshots will actually be on the Steam page; Integer; should be
182
+ less than or equal to max_per_page</p>
183
+ </dd></dl>
184
+
185
+
186
+
187
+
188
+ <div class="method-source-code" id="new-source">
189
+ <pre><span class="ruby-comment"># File lib/rsteamshot/screenshot_paginator.rb, line 16</span>
190
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">process_html</span>, <span class="ruby-identifier">max_per_page</span>,, <span class="ruby-identifier">per_page</span><span class="ruby-operator">:</span> <span class="ruby-value">10</span>, <span class="ruby-identifier">steam_per_page</span>))
191
+ <span class="ruby-ivar">@process_html</span> = <span class="ruby-identifier">process_html</span>
192
+ <span class="ruby-ivar">@screenshot_pages</span> = []
193
+ <span class="ruby-ivar">@max_per_page</span> = <span class="ruby-identifier">max_per_page</span>
194
+ <span class="ruby-ivar">@raw_per_page</span> = <span class="ruby-identifier">per_page</span>
195
+ <span class="ruby-ivar">@steam_per_page</span> = <span class="ruby-identifier">normalize_per_page</span>(<span class="ruby-identifier">steam_per_page</span>)
196
+ <span class="ruby-keyword">end</span></pre>
197
+ </div>
198
+
199
+ </div>
200
+
201
+
202
+
203
+
204
+ </div>
205
+
206
+
207
+ </section>
208
+
209
+ <section id="public-instance-Public-method-details" class="method-section">
210
+ <header>
211
+ <h3>Public Instance Methods</h3>
212
+ </header>
213
+
214
+
215
+ <div id="method-i-per_page" class="method-detail ">
216
+
217
+ <div class="method-heading">
218
+ <span class="method-name">per_page</span><span
219
+ class="method-args">()</span>
220
+
221
+ <span class="method-click-advice">click to toggle source</span>
222
+
223
+ </div>
224
+
225
+
226
+ <div class="method-description">
227
+
228
+ <h3 id="method-i-per_page-label-Returns">Returns<span><a href="#method-i-per_page-label-Returns">&para;</a> <a href="#top">&uarr;</a></span></h3>
229
+
230
+ <p>Returns the Integer count of screenshots per page.</p>
231
+
232
+
233
+
234
+
235
+ <div class="method-source-code" id="per_page-source">
236
+ <pre><span class="ruby-comment"># File lib/rsteamshot/screenshot_paginator.rb, line 25</span>
237
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">per_page</span>
238
+ <span class="ruby-ivar">@per_page</span> = <span class="ruby-identifier">normalize_per_page</span>(<span class="ruby-ivar">@raw_per_page</span>)
239
+ <span class="ruby-keyword">end</span></pre>
240
+ </div>
241
+
242
+ </div>
243
+
244
+
245
+
246
+
247
+ </div>
248
+
249
+
250
+ <div id="method-i-screenshots" class="method-detail ">
251
+
252
+ <div class="method-heading">
253
+ <span class="method-name">screenshots</span><span
254
+ class="method-args">(page: 1, url:)</span>
255
+
256
+ <span class="method-click-advice">click to toggle source</span>
257
+
258
+ </div>
259
+
260
+
261
+ <div class="method-description">
262
+
263
+ <p>Get the specified number of screenshots from the given Steam URL.</p>
264
+ <dl class="rdoc-list note-list"><dt>page
265
+ <dd>
266
+ <p>which page of results to fetch; Integer; defaults to 1</p>
267
+ </dd><dt>url
268
+ <dd>
269
+ <p>URL to a Steam page with screenshots, should not include a page parameter;
270
+ String</p>
271
+ </dd></dl>
272
+
273
+ <h3 id="method-i-screenshots-label-Returns">Returns<span><a href="#method-i-screenshots-label-Returns">&para;</a> <a href="#top">&uarr;</a></span></h3>
274
+
275
+ <p>Returns an Array of Rsteamshot::Screenshots.</p>
276
+
277
+
278
+
279
+
280
+ <div class="method-source-code" id="screenshots-source">
281
+ <pre><span class="ruby-comment"># File lib/rsteamshot/screenshot_paginator.rb, line 35</span>
282
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">screenshots</span>(<span class="ruby-identifier">page</span><span class="ruby-operator">:</span> <span class="ruby-value">1</span>, <span class="ruby-identifier">url</span>))
283
+ <span class="ruby-identifier">offset</span> = <span class="ruby-identifier">get_offset</span>(<span class="ruby-identifier">page</span>)
284
+ <span class="ruby-identifier">fetch_screenshots</span>(<span class="ruby-identifier">offset</span>, <span class="ruby-identifier">url</span>).<span class="ruby-identifier">drop</span>(<span class="ruby-identifier">offset</span>).<span class="ruby-identifier">take</span>(<span class="ruby-identifier">per_page</span>)
285
+ <span class="ruby-keyword">end</span></pre>
286
+ </div>
287
+
288
+ </div>
289
+
290
+
291
+
292
+
293
+ </div>
294
+
295
+
296
+ </section>
297
+
298
+ </section>
299
+ </main>
300
+
301
+
302
+ <footer id="validator-badges" role="contentinfo">
303
+ <p><a href="http://validator.w3.org/check/referer">Validate</a>
304
+ <p>Generated by <a href="https://rdoc.github.io/rdoc">RDoc</a> 5.1.0.
305
+ <p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
306
+ </footer>
307
+