flickr.rb 1.1.0 → 1.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (75) hide show
  1. checksums.yaml +7 -0
  2. data/Changelog.txt +7 -2
  3. data/Gemfile +4 -0
  4. data/Gemfile.lock +24 -0
  5. data/LICENSE +16 -17
  6. data/Manifest.txt +2 -2
  7. data/README.txt +3 -1
  8. data/Rakefile +3 -24
  9. data/flickr.gemspec +22 -17
  10. data/lib/flickr.rb +104 -104
  11. data/rdoc/Flickr.html +1003 -0
  12. data/rdoc/Flickr/Config.html +267 -0
  13. data/rdoc/Flickr/Group.html +343 -0
  14. data/rdoc/Flickr/Photo.html +1396 -0
  15. data/rdoc/Flickr/PhotoCollection.html +229 -0
  16. data/rdoc/Flickr/Photoset.html +359 -0
  17. data/rdoc/Flickr/User.html +745 -0
  18. data/rdoc/README_txt.html +199 -0
  19. data/rdoc/created.rid +3 -1
  20. data/rdoc/fonts.css +167 -0
  21. data/rdoc/fonts/Lato-Light.ttf +0 -0
  22. data/rdoc/fonts/Lato-LightItalic.ttf +0 -0
  23. data/rdoc/fonts/Lato-Regular.ttf +0 -0
  24. data/rdoc/fonts/Lato-RegularItalic.ttf +0 -0
  25. data/rdoc/fonts/SourceCodePro-Bold.ttf +0 -0
  26. data/rdoc/fonts/SourceCodePro-Regular.ttf +0 -0
  27. data/rdoc/images/add.png +0 -0
  28. data/rdoc/images/arrow_up.png +0 -0
  29. data/rdoc/images/brick.png +0 -0
  30. data/rdoc/images/brick_link.png +0 -0
  31. data/rdoc/images/bug.png +0 -0
  32. data/rdoc/images/bullet_black.png +0 -0
  33. data/rdoc/images/bullet_toggle_minus.png +0 -0
  34. data/rdoc/images/bullet_toggle_plus.png +0 -0
  35. data/rdoc/images/date.png +0 -0
  36. data/rdoc/images/delete.png +0 -0
  37. data/rdoc/images/find.png +0 -0
  38. data/rdoc/images/loadingAnimation.gif +0 -0
  39. data/rdoc/images/macFFBgHack.png +0 -0
  40. data/rdoc/images/package.png +0 -0
  41. data/rdoc/images/page_green.png +0 -0
  42. data/rdoc/images/page_white_text.png +0 -0
  43. data/rdoc/images/page_white_width.png +0 -0
  44. data/rdoc/images/plugin.png +0 -0
  45. data/rdoc/images/ruby.png +0 -0
  46. data/rdoc/images/tag_blue.png +0 -0
  47. data/rdoc/images/tag_green.png +0 -0
  48. data/rdoc/images/transparent.png +0 -0
  49. data/rdoc/images/wrench.png +0 -0
  50. data/rdoc/images/wrench_orange.png +0 -0
  51. data/rdoc/images/zoom.png +0 -0
  52. data/rdoc/index.html +101 -21
  53. data/rdoc/js/darkfish.js +140 -0
  54. data/rdoc/js/jquery.js +18 -0
  55. data/rdoc/js/navigation.js +142 -0
  56. data/rdoc/js/search.js +109 -0
  57. data/rdoc/js/search_index.js +1 -0
  58. data/rdoc/js/searcher.js +228 -0
  59. data/rdoc/rdoc.css +580 -0
  60. data/rdoc/table_of_contents.html +473 -0
  61. data/test/flickr_test.rb +229 -227
  62. metadata +132 -68
  63. data/rdoc/classes/Flickr.html +0 -807
  64. data/rdoc/classes/Flickr/Config.html +0 -240
  65. data/rdoc/classes/Flickr/Group.html +0 -251
  66. data/rdoc/classes/Flickr/Photo.html +0 -1101
  67. data/rdoc/classes/Flickr/PhotoCollection.html +0 -194
  68. data/rdoc/classes/Flickr/Photoset.html +0 -266
  69. data/rdoc/classes/Flickr/User.html +0 -738
  70. data/rdoc/files/README_txt.html +0 -209
  71. data/rdoc/files/lib/flickr_rb.html +0 -162
  72. data/rdoc/fr_class_index.html +0 -33
  73. data/rdoc/fr_file_index.html +0 -28
  74. data/rdoc/fr_method_index.html +0 -112
  75. data/rdoc/rdoc-style.css +0 -208
@@ -1,738 +0,0 @@
1
- <?xml version="1.0" encoding="iso-8859-1"?>
2
- <!DOCTYPE html
3
- PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
-
6
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
7
- <head>
8
- <title>Class: Flickr::User</title>
9
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
- <meta http-equiv="Content-Script-Type" content="text/javascript" />
11
- <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
12
- <script type="text/javascript">
13
- // <![CDATA[
14
-
15
- function popupCode( url ) {
16
- window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
17
- }
18
-
19
- function toggleCode( id ) {
20
- if ( document.getElementById )
21
- elem = document.getElementById( id );
22
- else if ( document.all )
23
- elem = eval( "document.all." + id );
24
- else
25
- return false;
26
-
27
- elemStyle = elem.style;
28
-
29
- if ( elemStyle.display != "block" ) {
30
- elemStyle.display = "block"
31
- } else {
32
- elemStyle.display = "none"
33
- }
34
-
35
- return true;
36
- }
37
-
38
- // Make codeblocks hidden by default
39
- document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
40
-
41
- // ]]>
42
- </script>
43
-
44
- </head>
45
- <body>
46
-
47
-
48
-
49
- <div id="classHeader">
50
- <table class="header-table">
51
- <tr class="top-aligned-row">
52
- <td><strong>Class</strong></td>
53
- <td class="class-name-in-header">Flickr::User</td>
54
- </tr>
55
- <tr class="top-aligned-row">
56
- <td><strong>In:</strong></td>
57
- <td>
58
- <a href="../../files/lib/flickr_rb.html">
59
- lib/flickr.rb
60
- </a>
61
- <br />
62
- </td>
63
- </tr>
64
-
65
- <tr class="top-aligned-row">
66
- <td><strong>Parent:</strong></td>
67
- <td>
68
- Object
69
- </td>
70
- </tr>
71
- </table>
72
- </div>
73
- <!-- banner header -->
74
-
75
- <div id="bodyContent">
76
-
77
-
78
-
79
- <div id="contextContent">
80
-
81
- <div id="description">
82
- <p>
83
- Todo: logged_in? if logged in: flickr.blogs.getList flickr.favorites.add
84
- flickr.favorites.remove flickr.groups.browse flickr.photos.getCounts
85
- flickr.photos.getNotInSet flickr.photos.getUntagged flickr.photosets.create
86
- flickr.photosets.orderSets flickr.test.login uploading
87
- </p>
88
-
89
- </div>
90
-
91
-
92
- </div>
93
-
94
- <div id="method-list">
95
- <h3 class="section-bar">Methods</h3>
96
-
97
- <div class="name-list">
98
- <a href="#M000037">contacts</a>&nbsp;&nbsp;
99
- <a href="#M000042">contactsPhotos</a>&nbsp;&nbsp;
100
- <a href="#M000028">count</a>&nbsp;&nbsp;
101
- <a href="#M000038">favorites</a>&nbsp;&nbsp;
102
- <a href="#M000029">firstdate</a>&nbsp;&nbsp;
103
- <a href="#M000030">firstdatetaken</a>&nbsp;&nbsp;
104
- <a href="#M000034">groups</a>&nbsp;&nbsp;
105
- <a href="#M000027">location</a>&nbsp;&nbsp;
106
- <a href="#M000026">name</a>&nbsp;&nbsp;
107
- <a href="#M000024">new</a>&nbsp;&nbsp;
108
- <a href="#M000035">photos</a>&nbsp;&nbsp;
109
- <a href="#M000031">photos_url</a>&nbsp;&nbsp;
110
- <a href="#M000039">photosets</a>&nbsp;&nbsp;
111
- <a href="#M000041">popular_tags</a>&nbsp;&nbsp;
112
- <a href="#M000033">pretty_url</a>&nbsp;&nbsp;
113
- <a href="#M000036">tag</a>&nbsp;&nbsp;
114
- <a href="#M000040">tags</a>&nbsp;&nbsp;
115
- <a href="#M000043">to_s</a>&nbsp;&nbsp;
116
- <a href="#M000032">url</a>&nbsp;&nbsp;
117
- <a href="#M000025">username</a>&nbsp;&nbsp;
118
- </div>
119
- </div>
120
-
121
- </div>
122
-
123
-
124
- <!-- if includes -->
125
-
126
- <div id="section">
127
-
128
-
129
-
130
-
131
-
132
- <div id="attribute-list">
133
- <h3 class="section-bar">Attributes</h3>
134
-
135
- <div class="name-list">
136
- <table>
137
- <tr class="top-aligned-row context-row">
138
- <td class="context-item-name">client</td>
139
- <td class="context-item-value">&nbsp;[R]&nbsp;</td>
140
- <td class="context-item-desc"></td>
141
- </tr>
142
- <tr class="top-aligned-row context-row">
143
- <td class="context-item-name">count</td>
144
- <td class="context-item-value">&nbsp;[R]&nbsp;</td>
145
- <td class="context-item-desc"></td>
146
- </tr>
147
- <tr class="top-aligned-row context-row">
148
- <td class="context-item-name">firstdate</td>
149
- <td class="context-item-value">&nbsp;[R]&nbsp;</td>
150
- <td class="context-item-desc"></td>
151
- </tr>
152
- <tr class="top-aligned-row context-row">
153
- <td class="context-item-name">firstdatetaken</td>
154
- <td class="context-item-value">&nbsp;[R]&nbsp;</td>
155
- <td class="context-item-desc"></td>
156
- </tr>
157
- <tr class="top-aligned-row context-row">
158
- <td class="context-item-name">id</td>
159
- <td class="context-item-value">&nbsp;[R]&nbsp;</td>
160
- <td class="context-item-desc"></td>
161
- </tr>
162
- <tr class="top-aligned-row context-row">
163
- <td class="context-item-name">location</td>
164
- <td class="context-item-value">&nbsp;[R]&nbsp;</td>
165
- <td class="context-item-desc"></td>
166
- </tr>
167
- <tr class="top-aligned-row context-row">
168
- <td class="context-item-name">name</td>
169
- <td class="context-item-value">&nbsp;[R]&nbsp;</td>
170
- <td class="context-item-desc"></td>
171
- </tr>
172
- <tr class="top-aligned-row context-row">
173
- <td class="context-item-name">photos_url</td>
174
- <td class="context-item-value">&nbsp;[R]&nbsp;</td>
175
- <td class="context-item-desc"></td>
176
- </tr>
177
- <tr class="top-aligned-row context-row">
178
- <td class="context-item-name">url</td>
179
- <td class="context-item-value">&nbsp;[R]&nbsp;</td>
180
- <td class="context-item-desc"></td>
181
- </tr>
182
- </table>
183
- </div>
184
- </div>
185
-
186
-
187
-
188
- <!-- if method_list -->
189
- <div id="methods">
190
- <h3 class="section-bar">Public Class methods</h3>
191
-
192
- <div id="method-M000024" class="method-detail">
193
- <a name="M000024"></a>
194
-
195
- <div class="method-heading">
196
- <a href="#M000024" class="method-signature">
197
- <span class="method-name">new</span><span class="method-args">(id_or_params_hash=nil, username=nil, email=nil, password=nil, api_key={})</span>
198
- </a>
199
- </div>
200
-
201
- <div class="method-description">
202
- <p>
203
- A <a href="User.html">Flickr::User</a> can be instantiated in two ways. The
204
- old (deprecated) method is with an ordered series of values. The <a
205
- href="User.html#M000024">new</a> method is with a params Hash, which is
206
- easier when a variable number of params are supplied, which is the case
207
- here, and also avoids having to constantly supply nil values for the email
208
- and password, which are now irrelevant as authentication is no longer done
209
- this way. An associated flickr client will also be generated if an api key
210
- is passed among the arguments or in the params hash. Alternatively, and
211
- most likely, an existing client object may be passed in the params hash
212
- (e.g. &#8216;client&#8217; =&gt; some_existing_flickr_client_object), and
213
- this is what happends when users are initlialized as the result of a method
214
- called on the flickr client (e.g. flickr.users)
215
- </p>
216
- <p><a class="source-toggle" href="#"
217
- onclick="toggleCode('M000024-source');return false;">[Source]</a></p>
218
- <div class="method-source-code" id="M000024-source">
219
- <pre>
220
- <span class="ruby-comment cmt"># File lib/flickr.rb, line 297</span>
221
- 297: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">id_or_params_hash</span>=<span class="ruby-keyword kw">nil</span>, <span class="ruby-identifier">username</span>=<span class="ruby-keyword kw">nil</span>, <span class="ruby-identifier">email</span>=<span class="ruby-keyword kw">nil</span>, <span class="ruby-identifier">password</span>=<span class="ruby-keyword kw">nil</span>, <span class="ruby-identifier">api_key</span>={})
222
- 298: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">id_or_params_hash</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Hash</span>)
223
- 299: <span class="ruby-identifier">id_or_params_hash</span>.<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">k</span>,<span class="ruby-identifier">v</span><span class="ruby-operator">|</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">instance_variable_set</span>(<span class="ruby-node">&quot;@#{k}&quot;</span>, <span class="ruby-identifier">v</span>) } <span class="ruby-comment cmt"># convert extra_params into instance variables</span>
224
- 300: <span class="ruby-keyword kw">else</span>
225
- 301: <span class="ruby-ivar">@id</span> = <span class="ruby-identifier">id_or_params_hash</span>
226
- 302: <span class="ruby-ivar">@username</span> = <span class="ruby-identifier">username</span>
227
- 303: <span class="ruby-ivar">@email</span> = <span class="ruby-identifier">email</span>
228
- 304: <span class="ruby-ivar">@password</span> = <span class="ruby-identifier">password</span>
229
- 305: <span class="ruby-ivar">@api_key</span> = <span class="ruby-identifier">api_key</span>
230
- 306: <span class="ruby-keyword kw">end</span>
231
- 307: <span class="ruby-ivar">@client</span> <span class="ruby-operator">||=</span> <span class="ruby-constant">Flickr</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">:api_key</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-ivar">@api_key</span>, <span class="ruby-identifier">:shared_secret</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-ivar">@shared_secret</span>, <span class="ruby-identifier">:auth_token</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-ivar">@auth_token</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@api_key</span>
232
- 308: <span class="ruby-keyword kw">end</span>
233
- </pre>
234
- </div>
235
- </div>
236
- </div>
237
-
238
- <h3 class="section-bar">Public Instance methods</h3>
239
-
240
- <div id="method-M000037" class="method-detail">
241
- <a name="M000037"></a>
242
-
243
- <div class="method-heading">
244
- <a href="#M000037" class="method-signature">
245
- <span class="method-name">contacts</span><span class="method-args">()</span>
246
- </a>
247
- </div>
248
-
249
- <div class="method-description">
250
- <p>
251
- Implements flickr.contacts.getPublicList and flickr.contacts.getList
252
- </p>
253
- <p><a class="source-toggle" href="#"
254
- onclick="toggleCode('M000037-source');return false;">[Source]</a></p>
255
- <div class="method-source-code" id="M000037-source">
256
- <pre>
257
- <span class="ruby-comment cmt"># File lib/flickr.rb, line 369</span>
258
- 369: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">contacts</span>
259
- 370: <span class="ruby-ivar">@client</span>.<span class="ruby-identifier">contacts_getPublicList</span>(<span class="ruby-value str">'user_id'</span>=<span class="ruby-operator">&gt;</span><span class="ruby-ivar">@id</span>)[<span class="ruby-value str">'contacts'</span>][<span class="ruby-value str">'contact'</span>].<span class="ruby-identifier">collect</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">contact</span><span class="ruby-operator">|</span> <span class="ruby-constant">User</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">contact</span>[<span class="ruby-value str">'nsid'</span>], <span class="ruby-identifier">contact</span>[<span class="ruby-value str">'username'</span>], <span class="ruby-keyword kw">nil</span>, <span class="ruby-keyword kw">nil</span>, <span class="ruby-ivar">@api_key</span>) }
260
- 371: <span class="ruby-comment cmt">#or</span>
261
- 372: <span class="ruby-keyword kw">end</span>
262
- </pre>
263
- </div>
264
- </div>
265
- </div>
266
-
267
- <div id="method-M000042" class="method-detail">
268
- <a name="M000042"></a>
269
-
270
- <div class="method-heading">
271
- <a href="#M000042" class="method-signature">
272
- <span class="method-name">contactsPhotos</span><span class="method-args">()</span>
273
- </a>
274
- </div>
275
-
276
- <div class="method-description">
277
- <p>
278
- Implements flickr.photos.getContactsPublicPhotos and
279
- flickr.photos.getContactsPhotos
280
- </p>
281
- <p><a class="source-toggle" href="#"
282
- onclick="toggleCode('M000042-source');return false;">[Source]</a></p>
283
- <div class="method-source-code" id="M000042-source">
284
- <pre>
285
- <span class="ruby-comment cmt"># File lib/flickr.rb, line 395</span>
286
- 395: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">contactsPhotos</span>
287
- 396: <span class="ruby-ivar">@client</span>.<span class="ruby-identifier">photos_request</span>(<span class="ruby-value str">'photos.getContactsPublicPhotos'</span>, <span class="ruby-value str">'user_id'</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-ivar">@id</span>)
288
- 397: <span class="ruby-keyword kw">end</span>
289
- </pre>
290
- </div>
291
- </div>
292
- </div>
293
-
294
- <div id="method-M000028" class="method-detail">
295
- <a name="M000028"></a>
296
-
297
- <div class="method-heading">
298
- <a href="#M000028" class="method-signature">
299
- <span class="method-name">count</span><span class="method-args">()</span>
300
- </a>
301
- </div>
302
-
303
- <div class="method-description">
304
- <p><a class="source-toggle" href="#"
305
- onclick="toggleCode('M000028-source');return false;">[Source]</a></p>
306
- <div class="method-source-code" id="M000028-source">
307
- <pre>
308
- <span class="ruby-comment cmt"># File lib/flickr.rb, line 319</span>
309
- 319: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">count</span>
310
- 320: <span class="ruby-ivar">@count</span>.<span class="ruby-identifier">nil?</span> <span class="ruby-value">? </span><span class="ruby-identifier">getInfo</span>.<span class="ruby-identifier">count</span> <span class="ruby-operator">:</span> <span class="ruby-ivar">@count</span>
311
- 321: <span class="ruby-keyword kw">end</span>
312
- </pre>
313
- </div>
314
- </div>
315
- </div>
316
-
317
- <div id="method-M000038" class="method-detail">
318
- <a name="M000038"></a>
319
-
320
- <div class="method-heading">
321
- <a href="#M000038" class="method-signature">
322
- <span class="method-name">favorites</span><span class="method-args">()</span>
323
- </a>
324
- </div>
325
-
326
- <div class="method-description">
327
- <p>
328
- Implements flickr.favorites.getPublicList
329
- </p>
330
- <p><a class="source-toggle" href="#"
331
- onclick="toggleCode('M000038-source');return false;">[Source]</a></p>
332
- <div class="method-source-code" id="M000038-source">
333
- <pre>
334
- <span class="ruby-comment cmt"># File lib/flickr.rb, line 375</span>
335
- 375: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">favorites</span>
336
- 376: <span class="ruby-ivar">@client</span>.<span class="ruby-identifier">photos_request</span>(<span class="ruby-value str">'favorites.getPublicList'</span>, <span class="ruby-value str">'user_id'</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-ivar">@id</span>)
337
- 377: <span class="ruby-keyword kw">end</span>
338
- </pre>
339
- </div>
340
- </div>
341
- </div>
342
-
343
- <div id="method-M000029" class="method-detail">
344
- <a name="M000029"></a>
345
-
346
- <div class="method-heading">
347
- <a href="#M000029" class="method-signature">
348
- <span class="method-name">firstdate</span><span class="method-args">()</span>
349
- </a>
350
- </div>
351
-
352
- <div class="method-description">
353
- <p><a class="source-toggle" href="#"
354
- onclick="toggleCode('M000029-source');return false;">[Source]</a></p>
355
- <div class="method-source-code" id="M000029-source">
356
- <pre>
357
- <span class="ruby-comment cmt"># File lib/flickr.rb, line 322</span>
358
- 322: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">firstdate</span>
359
- 323: <span class="ruby-ivar">@firstdate</span>.<span class="ruby-identifier">nil?</span> <span class="ruby-value">? </span><span class="ruby-identifier">getInfo</span>.<span class="ruby-identifier">firstdate</span> <span class="ruby-operator">:</span> <span class="ruby-ivar">@firstdate</span>
360
- 324: <span class="ruby-keyword kw">end</span>
361
- </pre>
362
- </div>
363
- </div>
364
- </div>
365
-
366
- <div id="method-M000030" class="method-detail">
367
- <a name="M000030"></a>
368
-
369
- <div class="method-heading">
370
- <a href="#M000030" class="method-signature">
371
- <span class="method-name">firstdatetaken</span><span class="method-args">()</span>
372
- </a>
373
- </div>
374
-
375
- <div class="method-description">
376
- <p><a class="source-toggle" href="#"
377
- onclick="toggleCode('M000030-source');return false;">[Source]</a></p>
378
- <div class="method-source-code" id="M000030-source">
379
- <pre>
380
- <span class="ruby-comment cmt"># File lib/flickr.rb, line 325</span>
381
- 325: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">firstdatetaken</span>
382
- 326: <span class="ruby-ivar">@firstdatetaken</span>.<span class="ruby-identifier">nil?</span> <span class="ruby-value">? </span><span class="ruby-identifier">getInfo</span>.<span class="ruby-identifier">firstdatetaken</span> <span class="ruby-operator">:</span> <span class="ruby-ivar">@firstdatetaken</span>
383
- 327: <span class="ruby-keyword kw">end</span>
384
- </pre>
385
- </div>
386
- </div>
387
- </div>
388
-
389
- <div id="method-M000034" class="method-detail">
390
- <a name="M000034"></a>
391
-
392
- <div class="method-heading">
393
- <a href="#M000034" class="method-signature">
394
- <span class="method-name">groups</span><span class="method-args">()</span>
395
- </a>
396
- </div>
397
-
398
- <div class="method-description">
399
- <p>
400
- Implements flickr.people.getPublicGroups
401
- </p>
402
- <p><a class="source-toggle" href="#"
403
- onclick="toggleCode('M000034-source');return false;">[Source]</a></p>
404
- <div class="method-source-code" id="M000034-source">
405
- <pre>
406
- <span class="ruby-comment cmt"># File lib/flickr.rb, line 346</span>
407
- 346: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">groups</span>
408
- 347: <span class="ruby-identifier">collection</span> = <span class="ruby-ivar">@client</span>.<span class="ruby-identifier">people_getPublicGroups</span>(<span class="ruby-value str">'user_id'</span>=<span class="ruby-operator">&gt;</span><span class="ruby-ivar">@id</span>)[<span class="ruby-value str">'groups'</span>][<span class="ruby-value str">'group'</span>]
409
- 348: <span class="ruby-identifier">collection</span> = [<span class="ruby-identifier">collection</span>] <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">collection</span>.<span class="ruby-identifier">is_a?</span> <span class="ruby-constant">Hash</span>
410
- 349: <span class="ruby-identifier">collection</span>.<span class="ruby-identifier">collect</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">group</span><span class="ruby-operator">|</span> <span class="ruby-constant">Group</span>.<span class="ruby-identifier">new</span>( <span class="ruby-value str">&quot;id&quot;</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">group</span>[<span class="ruby-value str">'nsid'</span>],
411
- 350: <span class="ruby-value str">&quot;name&quot;</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">group</span>[<span class="ruby-value str">'name'</span>],
412
- 351: <span class="ruby-value str">&quot;eighteenplus&quot;</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">group</span>[<span class="ruby-value str">'eighteenplus'</span>],
413
- 352: <span class="ruby-value str">&quot;client&quot;</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-ivar">@client</span>) }
414
- 353: <span class="ruby-keyword kw">end</span>
415
- </pre>
416
- </div>
417
- </div>
418
- </div>
419
-
420
- <div id="method-M000027" class="method-detail">
421
- <a name="M000027"></a>
422
-
423
- <div class="method-heading">
424
- <a href="#M000027" class="method-signature">
425
- <span class="method-name">location</span><span class="method-args">()</span>
426
- </a>
427
- </div>
428
-
429
- <div class="method-description">
430
- <p><a class="source-toggle" href="#"
431
- onclick="toggleCode('M000027-source');return false;">[Source]</a></p>
432
- <div class="method-source-code" id="M000027-source">
433
- <pre>
434
- <span class="ruby-comment cmt"># File lib/flickr.rb, line 316</span>
435
- 316: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">location</span>
436
- 317: <span class="ruby-ivar">@location</span>.<span class="ruby-identifier">nil?</span> <span class="ruby-value">? </span><span class="ruby-identifier">getInfo</span>.<span class="ruby-identifier">location</span> <span class="ruby-operator">:</span> <span class="ruby-ivar">@location</span>
437
- 318: <span class="ruby-keyword kw">end</span>
438
- </pre>
439
- </div>
440
- </div>
441
- </div>
442
-
443
- <div id="method-M000026" class="method-detail">
444
- <a name="M000026"></a>
445
-
446
- <div class="method-heading">
447
- <a href="#M000026" class="method-signature">
448
- <span class="method-name">name</span><span class="method-args">()</span>
449
- </a>
450
- </div>
451
-
452
- <div class="method-description">
453
- <p><a class="source-toggle" href="#"
454
- onclick="toggleCode('M000026-source');return false;">[Source]</a></p>
455
- <div class="method-source-code" id="M000026-source">
456
- <pre>
457
- <span class="ruby-comment cmt"># File lib/flickr.rb, line 313</span>
458
- 313: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">name</span>
459
- 314: <span class="ruby-ivar">@name</span>.<span class="ruby-identifier">nil?</span> <span class="ruby-value">? </span><span class="ruby-identifier">getInfo</span>.<span class="ruby-identifier">name</span> <span class="ruby-operator">:</span> <span class="ruby-ivar">@name</span>
460
- 315: <span class="ruby-keyword kw">end</span>
461
- </pre>
462
- </div>
463
- </div>
464
- </div>
465
-
466
- <div id="method-M000035" class="method-detail">
467
- <a name="M000035"></a>
468
-
469
- <div class="method-heading">
470
- <a href="#M000035" class="method-signature">
471
- <span class="method-name">photos</span><span class="method-args">(options={})</span>
472
- </a>
473
- </div>
474
-
475
- <div class="method-description">
476
- <p>
477
- Implements flickr.people.getPublicPhotos. Options hash allows you to add
478
- extra restrictions as per flickr.people.getPublicPhotos docs, e.g.
479
- user.photos(&#8216;per_page&#8217; =&gt; &#8216;25&#8217;,
480
- &#8216;extras&#8217; =&gt; &#8216;date_taken&#8217;)
481
- </p>
482
- <p><a class="source-toggle" href="#"
483
- onclick="toggleCode('M000035-source');return false;">[Source]</a></p>
484
- <div class="method-source-code" id="M000035-source">
485
- <pre>
486
- <span class="ruby-comment cmt"># File lib/flickr.rb, line 358</span>
487
- 358: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">photos</span>(<span class="ruby-identifier">options</span>={})
488
- 359: <span class="ruby-ivar">@client</span>.<span class="ruby-identifier">photos_request</span>(<span class="ruby-value str">'people.getPublicPhotos'</span>, {<span class="ruby-value str">'user_id'</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-ivar">@id</span>}.<span class="ruby-identifier">merge</span>(<span class="ruby-identifier">options</span>))
489
- 360: <span class="ruby-comment cmt"># what about non-public photos?</span>
490
- 361: <span class="ruby-keyword kw">end</span>
491
- </pre>
492
- </div>
493
- </div>
494
- </div>
495
-
496
- <div id="method-M000031" class="method-detail">
497
- <a name="M000031"></a>
498
-
499
- <div class="method-heading">
500
- <a href="#M000031" class="method-signature">
501
- <span class="method-name">photos_url</span><span class="method-args">()</span>
502
- </a>
503
- </div>
504
-
505
- <div class="method-description">
506
- <p>
507
- Builds <a href="User.html#M000032">url</a> for user&#8216;s <a
508
- href="User.html#M000035">photos</a> page as per <a
509
- href="http://www.flickr.com/services/api/misc.urls.html">www.flickr.com/services/api/misc.urls.html</a>
510
- </p>
511
- <p><a class="source-toggle" href="#"
512
- onclick="toggleCode('M000031-source');return false;">[Source]</a></p>
513
- <div class="method-source-code" id="M000031-source">
514
- <pre>
515
- <span class="ruby-comment cmt"># File lib/flickr.rb, line 331</span>
516
- 331: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">photos_url</span>
517
- 332: <span class="ruby-node">&quot;http://www.flickr.com/photos/#{id}/&quot;</span>
518
- 333: <span class="ruby-keyword kw">end</span>
519
- </pre>
520
- </div>
521
- </div>
522
- </div>
523
-
524
- <div id="method-M000039" class="method-detail">
525
- <a name="M000039"></a>
526
-
527
- <div class="method-heading">
528
- <a href="#M000039" class="method-signature">
529
- <span class="method-name">photosets</span><span class="method-args">()</span>
530
- </a>
531
- </div>
532
-
533
- <div class="method-description">
534
- <p>
535
- Implements flickr.photosets.getList
536
- </p>
537
- <p><a class="source-toggle" href="#"
538
- onclick="toggleCode('M000039-source');return false;">[Source]</a></p>
539
- <div class="method-source-code" id="M000039-source">
540
- <pre>
541
- <span class="ruby-comment cmt"># File lib/flickr.rb, line 380</span>
542
- 380: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">photosets</span>
543
- 381: <span class="ruby-ivar">@client</span>.<span class="ruby-identifier">photosets_getList</span>(<span class="ruby-value str">'user_id'</span>=<span class="ruby-operator">&gt;</span><span class="ruby-ivar">@id</span>)[<span class="ruby-value str">'photosets'</span>][<span class="ruby-value str">'photoset'</span>].<span class="ruby-identifier">collect</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">photoset</span><span class="ruby-operator">|</span> <span class="ruby-constant">Photoset</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">photoset</span>[<span class="ruby-value str">'id'</span>], <span class="ruby-ivar">@api_key</span>) }
544
- 382: <span class="ruby-keyword kw">end</span>
545
- </pre>
546
- </div>
547
- </div>
548
- </div>
549
-
550
- <div id="method-M000041" class="method-detail">
551
- <a name="M000041"></a>
552
-
553
- <div class="method-heading">
554
- <a href="#M000041" class="method-signature">
555
- <span class="method-name">popular_tags</span><span class="method-args">(count = 10)</span>
556
- </a>
557
- </div>
558
-
559
- <div class="method-description">
560
- <p>
561
- Implements flickr.tags.getListUserPopular
562
- </p>
563
- <p><a class="source-toggle" href="#"
564
- onclick="toggleCode('M000041-source');return false;">[Source]</a></p>
565
- <div class="method-source-code" id="M000041-source">
566
- <pre>
567
- <span class="ruby-comment cmt"># File lib/flickr.rb, line 390</span>
568
- 390: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">popular_tags</span>(<span class="ruby-identifier">count</span> = <span class="ruby-value">10</span>)
569
- 391: <span class="ruby-ivar">@client</span>.<span class="ruby-identifier">tags_getListUserPopular</span>(<span class="ruby-value str">'user_id'</span>=<span class="ruby-operator">&gt;</span><span class="ruby-ivar">@id</span>, <span class="ruby-value str">'count'</span>=<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">count</span>)[<span class="ruby-value str">'who'</span>][<span class="ruby-value str">'tags'</span>][<span class="ruby-value str">'tag'</span>].<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">tag_score</span><span class="ruby-operator">|</span> <span class="ruby-identifier">tag_score</span>[<span class="ruby-value str">&quot;tag&quot;</span>] = <span class="ruby-identifier">tag_score</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-value str">&quot;content&quot;</span>) }
570
- 392: <span class="ruby-keyword kw">end</span>
571
- </pre>
572
- </div>
573
- </div>
574
- </div>
575
-
576
- <div id="method-M000033" class="method-detail">
577
- <a name="M000033"></a>
578
-
579
- <div class="method-heading">
580
- <a href="#M000033" class="method-signature">
581
- <span class="method-name">pretty_url</span><span class="method-args">()</span>
582
- </a>
583
- </div>
584
-
585
- <div class="method-description">
586
- <p><a class="source-toggle" href="#"
587
- onclick="toggleCode('M000033-source');return false;">[Source]</a></p>
588
- <div class="method-source-code" id="M000033-source">
589
- <pre>
590
- <span class="ruby-comment cmt"># File lib/flickr.rb, line 341</span>
591
- 341: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">pretty_url</span>
592
- 342: <span class="ruby-ivar">@pretty_url</span> <span class="ruby-operator">||=</span> <span class="ruby-ivar">@client</span>.<span class="ruby-identifier">urls_getUserProfile</span>(<span class="ruby-value str">'user_id'</span>=<span class="ruby-operator">&gt;</span><span class="ruby-ivar">@id</span>)[<span class="ruby-value str">'user'</span>][<span class="ruby-value str">'url'</span>]
593
- 343: <span class="ruby-keyword kw">end</span>
594
- </pre>
595
- </div>
596
- </div>
597
- </div>
598
-
599
- <div id="method-M000036" class="method-detail">
600
- <a name="M000036"></a>
601
-
602
- <div class="method-heading">
603
- <a href="#M000036" class="method-signature">
604
- <span class="method-name">tag</span><span class="method-args">(tag)</span>
605
- </a>
606
- </div>
607
-
608
- <div class="method-description">
609
- <p>
610
- Gets <a href="User.html#M000035">photos</a> with a given <a
611
- href="User.html#M000036">tag</a>
612
- </p>
613
- <p><a class="source-toggle" href="#"
614
- onclick="toggleCode('M000036-source');return false;">[Source]</a></p>
615
- <div class="method-source-code" id="M000036-source">
616
- <pre>
617
- <span class="ruby-comment cmt"># File lib/flickr.rb, line 364</span>
618
- 364: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">tag</span>(<span class="ruby-identifier">tag</span>)
619
- 365: <span class="ruby-ivar">@client</span>.<span class="ruby-identifier">photos</span>(<span class="ruby-value str">'user_id'</span>=<span class="ruby-operator">&gt;</span><span class="ruby-ivar">@id</span>, <span class="ruby-value str">'tags'</span>=<span class="ruby-operator">&gt;</span><span class="ruby-identifier">tag</span>)
620
- 366: <span class="ruby-keyword kw">end</span>
621
- </pre>
622
- </div>
623
- </div>
624
- </div>
625
-
626
- <div id="method-M000040" class="method-detail">
627
- <a name="M000040"></a>
628
-
629
- <div class="method-heading">
630
- <a href="#M000040" class="method-signature">
631
- <span class="method-name">tags</span><span class="method-args">()</span>
632
- </a>
633
- </div>
634
-
635
- <div class="method-description">
636
- <p>
637
- Implements flickr.tags.getListUser
638
- </p>
639
- <p><a class="source-toggle" href="#"
640
- onclick="toggleCode('M000040-source');return false;">[Source]</a></p>
641
- <div class="method-source-code" id="M000040-source">
642
- <pre>
643
- <span class="ruby-comment cmt"># File lib/flickr.rb, line 385</span>
644
- 385: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">tags</span>
645
- 386: <span class="ruby-ivar">@client</span>.<span class="ruby-identifier">tags_getListUser</span>(<span class="ruby-value str">'user_id'</span>=<span class="ruby-operator">&gt;</span><span class="ruby-ivar">@id</span>)[<span class="ruby-value str">'who'</span>][<span class="ruby-value str">'tags'</span>][<span class="ruby-value str">'tag'</span>].<span class="ruby-identifier">collect</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">tag</span><span class="ruby-operator">|</span> <span class="ruby-identifier">tag</span> }
646
- 387: <span class="ruby-keyword kw">end</span>
647
- </pre>
648
- </div>
649
- </div>
650
- </div>
651
-
652
- <div id="method-M000043" class="method-detail">
653
- <a name="M000043"></a>
654
-
655
- <div class="method-heading">
656
- <a href="#M000043" class="method-signature">
657
- <span class="method-name">to_s</span><span class="method-args">()</span>
658
- </a>
659
- </div>
660
-
661
- <div class="method-description">
662
- <p><a class="source-toggle" href="#"
663
- onclick="toggleCode('M000043-source');return false;">[Source]</a></p>
664
- <div class="method-source-code" id="M000043-source">
665
- <pre>
666
- <span class="ruby-comment cmt"># File lib/flickr.rb, line 399</span>
667
- 399: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_s</span>
668
- 400: <span class="ruby-ivar">@name</span>
669
- 401: <span class="ruby-keyword kw">end</span>
670
- </pre>
671
- </div>
672
- </div>
673
- </div>
674
-
675
- <div id="method-M000032" class="method-detail">
676
- <a name="M000032"></a>
677
-
678
- <div class="method-heading">
679
- <a href="#M000032" class="method-signature">
680
- <span class="method-name">url</span><span class="method-args">()</span>
681
- </a>
682
- </div>
683
-
684
- <div class="method-description">
685
- <p>
686
- Builds <a href="User.html#M000032">url</a> for user&#8216;s profile page as
687
- per <a
688
- href="http://www.flickr.com/services/api/misc.urls.html">www.flickr.com/services/api/misc.urls.html</a>
689
- </p>
690
- <p><a class="source-toggle" href="#"
691
- onclick="toggleCode('M000032-source');return false;">[Source]</a></p>
692
- <div class="method-source-code" id="M000032-source">
693
- <pre>
694
- <span class="ruby-comment cmt"># File lib/flickr.rb, line 337</span>
695
- 337: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">url</span>
696
- 338: <span class="ruby-node">&quot;http://www.flickr.com/people/#{id}/&quot;</span>
697
- 339: <span class="ruby-keyword kw">end</span>
698
- </pre>
699
- </div>
700
- </div>
701
- </div>
702
-
703
- <div id="method-M000025" class="method-detail">
704
- <a name="M000025"></a>
705
-
706
- <div class="method-heading">
707
- <a href="#M000025" class="method-signature">
708
- <span class="method-name">username</span><span class="method-args">()</span>
709
- </a>
710
- </div>
711
-
712
- <div class="method-description">
713
- <p><a class="source-toggle" href="#"
714
- onclick="toggleCode('M000025-source');return false;">[Source]</a></p>
715
- <div class="method-source-code" id="M000025-source">
716
- <pre>
717
- <span class="ruby-comment cmt"># File lib/flickr.rb, line 310</span>
718
- 310: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">username</span>
719
- 311: <span class="ruby-ivar">@username</span>.<span class="ruby-identifier">nil?</span> <span class="ruby-value">? </span><span class="ruby-identifier">getInfo</span>.<span class="ruby-identifier">username</span> <span class="ruby-operator">:</span> <span class="ruby-ivar">@username</span>
720
- 312: <span class="ruby-keyword kw">end</span>
721
- </pre>
722
- </div>
723
- </div>
724
- </div>
725
-
726
-
727
- </div>
728
-
729
-
730
- </div>
731
-
732
-
733
- <div id="validator-badges">
734
- <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
735
- </div>
736
-
737
- </body>
738
- </html>