flickr.rb 1.2.0 → 1.2.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (73) hide show
  1. checksums.yaml +4 -4
  2. data/Changelog.txt +7 -4
  3. data/Gemfile.lock +3 -3
  4. data/README.md +5 -1
  5. data/Rakefile +6 -7
  6. data/doc/Flickr.html +1813 -0
  7. data/doc/Flickr/Config.html +468 -0
  8. data/doc/Flickr/Group.html +974 -0
  9. data/doc/Flickr/Photo.html +2467 -0
  10. data/doc/Flickr/PhotoCollection.html +529 -0
  11. data/doc/Flickr/Photoset.html +942 -0
  12. data/doc/Flickr/User.html +1672 -0
  13. data/doc/_index.html +190 -0
  14. data/doc/class_list.html +54 -0
  15. data/doc/css/common.css +1 -0
  16. data/doc/css/full_list.css +57 -0
  17. data/doc/css/style.css +339 -0
  18. data/doc/file.Changelog.html +73 -0
  19. data/doc/file.LICENSE.html +94 -0
  20. data/{rdoc/README_md.html → doc/file.README.html} +85 -121
  21. data/doc/file_list.html +62 -0
  22. data/doc/frames.html +26 -0
  23. data/doc/index.html +216 -0
  24. data/doc/js/app.js +219 -0
  25. data/doc/js/full_list.js +178 -0
  26. data/doc/js/jquery.js +4 -0
  27. data/doc/method_list.html +725 -0
  28. data/doc/top-level-namespace.html +112 -0
  29. data/flickr.gemspec +3 -3
  30. data/lib/flickr.rb +1 -1
  31. metadata +27 -46
  32. data/rdoc/Flickr.html +0 -1044
  33. data/rdoc/Flickr/Config.html +0 -300
  34. data/rdoc/Flickr/Group.html +0 -373
  35. data/rdoc/Flickr/Photo.html +0 -1427
  36. data/rdoc/Flickr/PhotoCollection.html +0 -261
  37. data/rdoc/Flickr/Photoset.html +0 -389
  38. data/rdoc/Flickr/User.html +0 -775
  39. data/rdoc/created.rid +0 -3
  40. data/rdoc/images/add.png +0 -0
  41. data/rdoc/images/arrow_up.png +0 -0
  42. data/rdoc/images/brick.png +0 -0
  43. data/rdoc/images/brick_link.png +0 -0
  44. data/rdoc/images/bug.png +0 -0
  45. data/rdoc/images/bullet_black.png +0 -0
  46. data/rdoc/images/bullet_toggle_minus.png +0 -0
  47. data/rdoc/images/bullet_toggle_plus.png +0 -0
  48. data/rdoc/images/date.png +0 -0
  49. data/rdoc/images/delete.png +0 -0
  50. data/rdoc/images/find.png +0 -0
  51. data/rdoc/images/loadingAnimation.gif +0 -0
  52. data/rdoc/images/macFFBgHack.png +0 -0
  53. data/rdoc/images/package.png +0 -0
  54. data/rdoc/images/page_green.png +0 -0
  55. data/rdoc/images/page_white_text.png +0 -0
  56. data/rdoc/images/page_white_width.png +0 -0
  57. data/rdoc/images/plugin.png +0 -0
  58. data/rdoc/images/ruby.png +0 -0
  59. data/rdoc/images/tag_blue.png +0 -0
  60. data/rdoc/images/tag_green.png +0 -0
  61. data/rdoc/images/transparent.png +0 -0
  62. data/rdoc/images/wrench.png +0 -0
  63. data/rdoc/images/wrench_orange.png +0 -0
  64. data/rdoc/images/zoom.png +0 -0
  65. data/rdoc/index.html +0 -92
  66. data/rdoc/js/darkfish.js +0 -155
  67. data/rdoc/js/jquery.js +0 -18
  68. data/rdoc/js/navigation.js +0 -142
  69. data/rdoc/js/search.js +0 -94
  70. data/rdoc/js/search_index.js +0 -1
  71. data/rdoc/js/searcher.js +0 -228
  72. data/rdoc/rdoc.css +0 -595
  73. data/rdoc/table_of_contents.html +0 -241
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a2839dc51d7158f2dd122918426745eba5ebac3b
4
- data.tar.gz: f22833fed59a888c2121bac68b068f0347082809
3
+ metadata.gz: 7052f49b62e8990a4630b78a2dde2884435cdad8
4
+ data.tar.gz: 177a9493bc65e60912f318b11f70c7c69b273d6b
5
5
  SHA512:
6
- metadata.gz: 09fb1d306927fede79b5433cf5030d5751c70b7fbf4a3e221898515eb2df56d0f08b17362e0d924b85fac3a72e2a3722c9ae62f9fcfadacd3ce08c9285d66b71
7
- data.tar.gz: 08679aabcefc91079ca7b606e2264bcce19301fdcdabc737fd49b8514c9dc5575fe0cb979ede9445bdcae89493d438f9edd91c279fdc84d65aaf16ea8a8cb934
6
+ metadata.gz: f261c02ccb4ced50b5e2738fbfe93cc6e3aa0b2844f223de737863a9899c562c1868da7f576486f2ecdfb7ad3f3ae231dff26bdbfb6e12012444f8ad28167d30
7
+ data.tar.gz: edf64a7dda15ad79b6ffad62d049f9faa714a4147dfb63cd18d7c0ea1d8060be2d0a595b174cf1e5a5e2d187c5c694ee50c7a989cc45ca67dcb79ab71020db3d
@@ -1,17 +1,20 @@
1
- 1.2.0 2014-05-13
1
+ == 1.2.1 2014-06-29
2
+ * fixed compatibility issue with ruby 1.9.3 - #6 - thanks to @electronick https://github.com/RaVbaker/flickr/issues/6
3
+
4
+ == 1.2.0 2014-05-13
2
5
  * New image sizes support: Large square, Small 320, Medium 640 - #5 - https://github.com/RaVbaker/flickr/issues/5
3
6
  * SSL support for requests to Flickr API - #4 - https://github.com/RaVbaker/flickr/issues/4
4
7
  This change might not be backward compatible so I changed gem version to 1.2. See README.md for more info about SSL
5
8
 
6
- 1.1.2 2014-04-17
9
+ == 1.1.2 2014-04-17
7
10
  * No changes at all. I failed to set a gem update date for 1.1.1
8
11
 
9
- 1.1.1 2014-04-17
12
+ == 1.1.1 2014-04-17
10
13
  * Migrated to usage of Bundler for dependency tracking
11
14
  * Fixes retrieving list of photos no matter which sibling they are in XML structure
12
15
  * Made tests compatible with latest version of mocha
13
16
 
14
- 1.1.0 2010-05-16
17
+ == 1.1.0 2010-05-16
15
18
  * Major improvement - now gem is very easy to use as a rails plugin with external configuration for api connection. - /config/flickr.api.yml
16
19
 
17
20
  == 1.0.9 2010-05-16
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- flickr.rb (1.2.0)
4
+ flickr.rb (1.2.1)
5
5
  xml-simple (>= 1.0.7)
6
6
 
7
7
  GEM
@@ -11,8 +11,8 @@ GEM
11
11
  mocha (1.0.0)
12
12
  metaclass (~> 0.0.1)
13
13
  rake (10.1.1)
14
- rdoc (4.0.0)
15
14
  xml-simple (1.1.3)
15
+ yard (0.8.7.4)
16
16
 
17
17
  PLATFORMS
18
18
  ruby
@@ -21,4 +21,4 @@ DEPENDENCIES
21
21
  flickr.rb!
22
22
  mocha
23
23
  rake
24
- rdoc
24
+ yard
data/README.md CHANGED
@@ -10,7 +10,7 @@ An insanely easy interface to the Flickr photo-sharing service. By Scott Raymond
10
10
 
11
11
  It's a simple interface for using Flickr API - [https://www.flickr.com/services/api/](https://www.flickr.com/services/api/)
12
12
 
13
- ## FEATURES/PROBLEMS:
13
+ ## FEATURES:
14
14
 
15
15
  The flickr gem (famously featured in a RubyonRails screencast) had broken with Flickr's new authentication scheme and updated API.
16
16
  This has now been largely corrected, though not all current API calls are supported yet. If you need something let me know in pull requests.
@@ -93,6 +93,10 @@ If you want to use this gem/plugin with Rails (for version 3) you can create con
93
93
  auth_token: authSecretTokenBeta
94
94
 
95
95
 
96
+ ## DOCUMENTATION
97
+
98
+ Full documentation: [ravbaker.github.io/flickr](http://ravbaker.github.io/flickr).
99
+
96
100
 
97
101
  ## CONTRIBUTING
98
102
 
data/Rakefile CHANGED
@@ -1,7 +1,7 @@
1
1
  require 'rake'
2
2
  require 'rake/testtask'
3
- require 'rdoc/task'
4
3
  require "bundler/gem_tasks"
4
+ require 'yard'
5
5
 
6
6
  task :default => :test
7
7
 
@@ -14,12 +14,11 @@ Rake::TestTask.new(:test) do |t|
14
14
  end
15
15
 
16
16
  desc 'Generate documentation for the flickr plugin.'
17
- Rake::RDocTask.new(:rdoc) do |rdoc|
18
- rdoc.rdoc_dir = 'rdoc'
19
- rdoc.title = 'Flickr'
20
- rdoc.options << '--line-numbers' << '--inline-source'
21
- rdoc.rdoc_files.include('README.md')
22
- rdoc.rdoc_files.include('lib/**/*.rb')
17
+ task :rdoc => :yard
18
+
19
+ YARD::Rake::YardocTask.new do |t|
20
+ # t.files = ['lib/**/*.rb'] # optional
21
+ # t.options = ['- LICENSE Changelog.txt'] # optional
23
22
  end
24
23
 
25
24
  task "Dump Gemspec file"
@@ -0,0 +1,1813 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4
+ <head>
5
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6
+ <title>
7
+ Class: Flickr
8
+
9
+ &mdash; Documentation by YARD 0.8.7.4
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
+ hasFrames = window.top.frames.main ? true : false;
19
+ relpath = '';
20
+ framesUrl = "frames.html#!Flickr.html";
21
+ </script>
22
+
23
+
24
+ <script type="text/javascript" charset="utf-8" src="js/jquery.js"></script>
25
+
26
+ <script type="text/javascript" charset="utf-8" src="js/app.js"></script>
27
+
28
+
29
+ </head>
30
+ <body>
31
+ <div id="header">
32
+ <div id="menu">
33
+
34
+ <a href="_index.html">Index (F)</a> &raquo;
35
+
36
+
37
+ <span class="title">Flickr</span>
38
+
39
+
40
+ <div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
41
+ </div>
42
+
43
+ <div id="search">
44
+
45
+ <a class="full_list_link" id="class_list_link"
46
+ href="class_list.html">
47
+ Class List
48
+ </a>
49
+
50
+ <a class="full_list_link" id="method_list_link"
51
+ href="method_list.html">
52
+ Method List
53
+ </a>
54
+
55
+ <a class="full_list_link" id="file_list_link"
56
+ href="file_list.html">
57
+ File List
58
+ </a>
59
+
60
+ </div>
61
+ <div class="clear"></div>
62
+ </div>
63
+
64
+ <iframe id="search_frame"></iframe>
65
+
66
+ <div id="content"><h1>Class: Flickr
67
+
68
+
69
+
70
+ </h1>
71
+
72
+ <dl class="box">
73
+
74
+ <dt class="r1">Inherits:</dt>
75
+ <dd class="r1">
76
+ <span class="inheritName">Object</span>
77
+
78
+ <ul class="fullTree">
79
+ <li>Object</li>
80
+
81
+ <li class="next">Flickr</li>
82
+
83
+ </ul>
84
+ <a href="#" class="inheritanceTree">show all</a>
85
+
86
+ </dd>
87
+
88
+
89
+
90
+
91
+
92
+
93
+
94
+
95
+
96
+ <dt class="r2 last">Defined in:</dt>
97
+ <dd class="r2 last">lib/flickr.rb</dd>
98
+
99
+ </dl>
100
+ <div class="clear"></div>
101
+
102
+ <h2>Overview</h2><div class="docstring">
103
+ <div class="discussion">
104
+
105
+ <p>Flickr client class. Requires an API key</p>
106
+
107
+
108
+ </div>
109
+ </div>
110
+ <div class="tags">
111
+
112
+
113
+ </div><h2>Defined Under Namespace</h2>
114
+ <p class="children">
115
+
116
+
117
+
118
+
119
+ <strong class="classes">Classes:</strong> <span class='object_link'><a href="Flickr/Config.html" title="Flickr::Config (class)">Config</a></span>, <span class='object_link'><a href="Flickr/Group.html" title="Flickr::Group (class)">Group</a></span>, <span class='object_link'><a href="Flickr/Photo.html" title="Flickr::Photo (class)">Photo</a></span>, <span class='object_link'><a href="Flickr/PhotoCollection.html" title="Flickr::PhotoCollection (class)">PhotoCollection</a></span>, <span class='object_link'><a href="Flickr/Photoset.html" title="Flickr::Photoset (class)">Photoset</a></span>, <span class='object_link'><a href="Flickr/User.html" title="Flickr::User (class)">User</a></span>
120
+
121
+
122
+ </p>
123
+
124
+ <h2>Constant Summary</h2>
125
+
126
+ <dl class="constants">
127
+
128
+ <dt id="HOST_URL-constant" class="">HOST_URL =
129
+
130
+ </dt>
131
+ <dd><pre class="code"><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>https://api.flickr.com</span><span class='tstring_end'>&#39;</span></span></pre></dd>
132
+
133
+ <dt id="API_PATH-constant" class="">API_PATH =
134
+
135
+ </dt>
136
+ <dd><pre class="code"><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>/services/rest</span><span class='tstring_end'>&#39;</span></span></pre></dd>
137
+
138
+ <dt id="VALID_SIZES-constant" class="">VALID_SIZES =
139
+ <div class="docstring">
140
+ <div class="discussion">
141
+
142
+ <p>Flickr, annoyingly, uses a number of representations to specify the size of
143
+ a photo, depending on the context. It gives a label such a “Small” or
144
+ “Medium” to a size of photo, when returning all possible sizes. However,
145
+ when generating the uri for the page that features that size of photo, or
146
+ the source url for the image itself it uses a single letter. Bizarrely,
147
+ these letters are different depending on whether you want the Flickr page
148
+ for the photo or the source uri – e.g. a “Small” photo (240 pixels on its
149
+ longest side) may be viewed at “<a
150
+ href="http://www.flickr.com/photos/sco/2397458775/sizes/s">www.flickr.com/photos/sco/2397458775/sizes/s</a>/”
151
+ but its source is at “<img
152
+ src="http://farm4.static.flickr.com/3118/2397458775_2ec2ddc324_m.jpg" />”.
153
+ The VALID_SIZES hash associates the correct letter with a label</p>
154
+
155
+
156
+ </div>
157
+ </div>
158
+ <div class="tags">
159
+
160
+
161
+ </div>
162
+ </dt>
163
+ <dd><pre class="code"><span class='lbrace'>{</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Square</span><span class='tstring_end'>&quot;</span></span> <span class='op'>=&gt;</span> <span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>s</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>sq</span><span class='tstring_end'>&quot;</span></span><span class='rbracket'>]</span><span class='comma'>,</span>
164
+ <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Large Square</span><span class='tstring_end'>&quot;</span></span> <span class='op'>=&gt;</span> <span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>q</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>q</span><span class='tstring_end'>&quot;</span></span><span class='rbracket'>]</span><span class='comma'>,</span>
165
+ <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Thumbnail</span><span class='tstring_end'>&quot;</span></span> <span class='op'>=&gt;</span> <span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>t</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>t</span><span class='tstring_end'>&quot;</span></span><span class='rbracket'>]</span><span class='comma'>,</span>
166
+ <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Small</span><span class='tstring_end'>&quot;</span></span> <span class='op'>=&gt;</span> <span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>m</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>s</span><span class='tstring_end'>&quot;</span></span><span class='rbracket'>]</span><span class='comma'>,</span>
167
+ <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Small 320</span><span class='tstring_end'>&quot;</span></span> <span class='op'>=&gt;</span> <span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>n</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>n</span><span class='tstring_end'>&quot;</span></span><span class='rbracket'>]</span><span class='comma'>,</span>
168
+ <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Medium</span><span class='tstring_end'>&quot;</span></span> <span class='op'>=&gt;</span> <span class='lbracket'>[</span><span class='kw'>nil</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>m</span><span class='tstring_end'>&quot;</span></span><span class='rbracket'>]</span><span class='comma'>,</span>
169
+ <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Medium 640</span><span class='tstring_end'>&quot;</span></span> <span class='op'>=&gt;</span> <span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>z</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>z</span><span class='tstring_end'>&quot;</span></span><span class='rbracket'>]</span><span class='comma'>,</span>
170
+ <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Large</span><span class='tstring_end'>&quot;</span></span> <span class='op'>=&gt;</span> <span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>b</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>l</span><span class='tstring_end'>&quot;</span></span><span class='rbracket'>]</span>
171
+ <span class='rbrace'>}</span></pre></dd>
172
+
173
+ </dl>
174
+
175
+
176
+
177
+
178
+
179
+ <h2>Instance Attribute Summary <small>(<a href="#" class="summary_toggle">collapse</a>)</small></h2>
180
+ <ul class="summary">
181
+
182
+ <li class="public ">
183
+ <span class="summary_signature">
184
+
185
+ <a href="#api_key-instance_method" title="#api_key (instance method)">- (Object) <strong>api_key</strong> </a>
186
+
187
+
188
+
189
+ </span>
190
+
191
+
192
+
193
+
194
+ <span class="note title readonly">readonly</span>
195
+
196
+
197
+
198
+
199
+
200
+
201
+
202
+
203
+
204
+ <span class="summary_desc"><div class='inline'>
205
+ <p>Returns the value of attribute api_key.</p>
206
+ </div></span>
207
+
208
+ </li>
209
+
210
+
211
+ <li class="public ">
212
+ <span class="summary_signature">
213
+
214
+ <a href="#auth_token-instance_method" title="#auth_token (instance method)">- (Object) <strong>auth_token</strong> </a>
215
+
216
+
217
+
218
+ </span>
219
+
220
+
221
+
222
+
223
+ <span class="note title readonly">readonly</span>
224
+
225
+
226
+
227
+
228
+
229
+
230
+
231
+
232
+
233
+ <span class="summary_desc"><div class='inline'>
234
+ <p>Returns the value of attribute auth_token.</p>
235
+ </div></span>
236
+
237
+ </li>
238
+
239
+
240
+ <li class="public ">
241
+ <span class="summary_signature">
242
+
243
+ <a href="#user-instance_method" title="#user (instance method)">- (Object) <strong>user</strong> </a>
244
+
245
+
246
+
247
+ </span>
248
+
249
+
250
+
251
+
252
+
253
+
254
+
255
+
256
+
257
+
258
+
259
+
260
+ <span class="summary_desc"><div class='inline'>
261
+ <p>Returns the value of attribute user.</p>
262
+ </div></span>
263
+
264
+ </li>
265
+
266
+
267
+ </ul>
268
+
269
+
270
+
271
+
272
+
273
+ <h2>
274
+ Instance Method Summary
275
+ <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
276
+ </h2>
277
+
278
+ <ul class="summary">
279
+
280
+ <li class="public ">
281
+ <span class="summary_signature">
282
+
283
+ <a href="#find_by_url-instance_method" title="#find_by_url (instance method)">- (Object) <strong>find_by_url</strong>(url) </a>
284
+
285
+
286
+
287
+ </span>
288
+
289
+
290
+
291
+
292
+
293
+
294
+
295
+
296
+
297
+ <span class="summary_desc"><div class='inline'>
298
+ <p>Implements flickr.urls.lookupGroup and flickr.urls.lookupUser.</p>
299
+ </div></span>
300
+
301
+ </li>
302
+
303
+
304
+ <li class="public ">
305
+ <span class="summary_signature">
306
+
307
+ <a href="#get_token_from-instance_method" title="#get_token_from (instance method)">- (Object) <strong>get_token_from</strong>(frob) </a>
308
+
309
+
310
+
311
+ </span>
312
+
313
+
314
+
315
+
316
+
317
+
318
+
319
+
320
+
321
+ <span class="summary_desc"><div class='inline'>
322
+ <p>Gets authentication token given a Flickr frob, which is returned when user
323
+ allows access to their account for the application with the api_key which
324
+ made the request.</p>
325
+ </div></span>
326
+
327
+ </li>
328
+
329
+
330
+ <li class="public ">
331
+ <span class="summary_signature">
332
+
333
+ <a href="#groups-instance_method" title="#groups (instance method)">- (Object) <strong>groups</strong>(group_name, options = {}) </a>
334
+
335
+
336
+
337
+ </span>
338
+
339
+
340
+
341
+
342
+
343
+
344
+
345
+
346
+
347
+ <span class="summary_desc"><div class='inline'>
348
+ <p>Implements flickr.groups.search.</p>
349
+ </div></span>
350
+
351
+ </li>
352
+
353
+
354
+ <li class="public ">
355
+ <span class="summary_signature">
356
+
357
+ <a href="#http_get-instance_method" title="#http_get (instance method)">- (Object) <strong>http_get</strong>(url) </a>
358
+
359
+
360
+
361
+ </span>
362
+
363
+
364
+
365
+
366
+
367
+
368
+
369
+
370
+
371
+ <span class="summary_desc"><div class='inline'>
372
+ <p>Does an HTTP GET on a given URL and returns the response body.</p>
373
+ </div></span>
374
+
375
+ </li>
376
+
377
+
378
+ <li class="public ">
379
+ <span class="summary_signature">
380
+
381
+ <a href="#initialize-instance_method" title="#initialize (instance method)">- (Flickr) <strong>initialize</strong>(api_key_or_params = {}) </a>
382
+
383
+
384
+
385
+ </span>
386
+
387
+
388
+ <span class="note title constructor">constructor</span>
389
+
390
+
391
+
392
+
393
+
394
+
395
+
396
+
397
+ <span class="summary_desc"><div class='inline'>
398
+ <p>To use the Flickr API you need an api key (see <a
399
+ href="http://www.flickr.com/services/api/misc.api_keys.html">www.flickr.com/services/api/misc.api_keys.html</a>),
400
+ and the flickr client object shuld be initialized with this.</p>
401
+ </div></span>
402
+
403
+ </li>
404
+
405
+
406
+ <li class="public ">
407
+ <span class="summary_signature">
408
+
409
+ <a href="#licenses-instance_method" title="#licenses (instance method)">- (Object) <strong>licenses</strong> </a>
410
+
411
+
412
+
413
+ </span>
414
+
415
+
416
+
417
+
418
+
419
+
420
+
421
+
422
+
423
+ <span class="summary_desc"><div class='inline'>
424
+ <p>Implements flickr.photos.licenses.getInfo.</p>
425
+ </div></span>
426
+
427
+ </li>
428
+
429
+
430
+ <li class="public ">
431
+ <span class="summary_signature">
432
+
433
+ <a href="#login_url-instance_method" title="#login_url (instance method)">- (Object) <strong>login_url</strong>(perms) </a>
434
+
435
+
436
+
437
+ </span>
438
+
439
+
440
+
441
+
442
+
443
+
444
+
445
+
446
+
447
+ <span class="summary_desc"><div class='inline'>
448
+ <p>Returns url for user to login in to Flickr to authenticate app for a user.</p>
449
+ </div></span>
450
+
451
+ </li>
452
+
453
+
454
+ <li class="public ">
455
+ <span class="summary_signature">
456
+
457
+ <a href="#method_missing-instance_method" title="#method_missing (instance method)">- (Object) <strong>method_missing</strong>(method_id, params = {}) </a>
458
+
459
+
460
+
461
+ </span>
462
+
463
+
464
+
465
+
466
+
467
+
468
+
469
+
470
+
471
+ <span class="summary_desc"><div class='inline'>
472
+ <p>Implements everything else.</p>
473
+ </div></span>
474
+
475
+ </li>
476
+
477
+
478
+ <li class="public ">
479
+ <span class="summary_signature">
480
+
481
+ <a href="#photos-instance_method" title="#photos (instance method)">- (Object) <strong>photos</strong>(*criteria) </a>
482
+
483
+
484
+
485
+ </span>
486
+
487
+
488
+
489
+
490
+
491
+
492
+
493
+
494
+
495
+ <span class="summary_desc"><div class='inline'>
496
+ <p>Implements flickr.photos.getRecent and flickr.photos.search.</p>
497
+ </div></span>
498
+
499
+ </li>
500
+
501
+
502
+ <li class="public ">
503
+ <span class="summary_signature">
504
+
505
+ <a href="#photos_request-instance_method" title="#photos_request (instance method)">- (Object) <strong>photos_request</strong>(method, params = {}, list_node = &quot;photos&quot;) </a>
506
+
507
+
508
+
509
+ </span>
510
+
511
+
512
+
513
+
514
+
515
+
516
+
517
+
518
+
519
+ <span class="summary_desc"><div class='inline'>
520
+ <p>acts like request but returns a PhotoCollection (a list of Photo objects).</p>
521
+ </div></span>
522
+
523
+ </li>
524
+
525
+
526
+ <li class="public ">
527
+ <span class="summary_signature">
528
+
529
+ <a href="#photos_search-instance_method" title="#photos_search (instance method)">- (Object) <strong>photos_search</strong>(params = {}) </a>
530
+
531
+
532
+
533
+ (also: #search)
534
+
535
+ </span>
536
+
537
+
538
+
539
+
540
+
541
+
542
+
543
+
544
+
545
+ <span class="summary_desc"><div class='inline'></div></span>
546
+
547
+ </li>
548
+
549
+
550
+ <li class="public ">
551
+ <span class="summary_signature">
552
+
553
+ <a href="#photoset-instance_method" title="#photoset (instance method)">- (Object) <strong>photoset</strong>(photoset_id) </a>
554
+
555
+
556
+
557
+ </span>
558
+
559
+
560
+
561
+
562
+
563
+
564
+
565
+
566
+
567
+ <span class="summary_desc"><div class='inline'></div></span>
568
+
569
+ </li>
570
+
571
+
572
+ <li class="public ">
573
+ <span class="summary_signature">
574
+
575
+ <a href="#recent-instance_method" title="#recent (instance method)">- (Object) <strong>recent</strong> </a>
576
+
577
+
578
+
579
+ </span>
580
+
581
+
582
+
583
+
584
+
585
+
586
+
587
+
588
+
589
+ <span class="summary_desc"><div class='inline'>
590
+ <p>flickr.photos.getRecent 100 newest photos from everyone.</p>
591
+ </div></span>
592
+
593
+ </li>
594
+
595
+
596
+ <li class="public ">
597
+ <span class="summary_signature">
598
+
599
+ <a href="#related_tags-instance_method" title="#related_tags (instance method)">- (Object) <strong>related_tags</strong>(tag) </a>
600
+
601
+
602
+
603
+ </span>
604
+
605
+
606
+
607
+
608
+
609
+
610
+
611
+
612
+
613
+ <span class="summary_desc"><div class='inline'>
614
+ <p>Implements flickr.tags.getRelated.</p>
615
+ </div></span>
616
+
617
+ </li>
618
+
619
+
620
+ <li class="public ">
621
+ <span class="summary_signature">
622
+
623
+ <a href="#request-instance_method" title="#request (instance method)">- (Object) <strong>request</strong>(method, params = {}) </a>
624
+
625
+
626
+
627
+ </span>
628
+
629
+
630
+
631
+
632
+
633
+
634
+
635
+
636
+
637
+ <span class="summary_desc"><div class='inline'>
638
+ <p>Takes a Flickr API method name and set of parameters; returns an XmlSimple
639
+ object with the response.</p>
640
+ </div></span>
641
+
642
+ </li>
643
+
644
+
645
+ <li class="public ">
646
+ <span class="summary_signature">
647
+
648
+ <a href="#request_url-instance_method" title="#request_url (instance method)">- (Object) <strong>request_url</strong>(method, params = {}) </a>
649
+
650
+
651
+
652
+ </span>
653
+
654
+
655
+
656
+
657
+
658
+
659
+
660
+
661
+
662
+ <span class="summary_desc"><div class='inline'>
663
+ <p>Builds url for Flickr API REST request from given the flickr method name
664
+ (exclusing the &#39;flickr.&#39; that begins each method call) and params
665
+ (where applicable) which should be supplied as a Hash (e.g
666
+ &#39;user_id&#39; =&gt; “foo123”).</p>
667
+ </div></span>
668
+
669
+ </li>
670
+
671
+
672
+ <li class="public ">
673
+ <span class="summary_signature">
674
+
675
+ <a href="#set_up_configuration-instance_method" title="#set_up_configuration (instance method)">- (Object) <strong>set_up_configuration</strong>(api_key_or_params = {}) </a>
676
+
677
+
678
+
679
+ </span>
680
+
681
+
682
+
683
+
684
+
685
+
686
+
687
+
688
+
689
+ <span class="summary_desc"><div class='inline'></div></span>
690
+
691
+ </li>
692
+
693
+
694
+ <li class="public ">
695
+ <span class="summary_signature">
696
+
697
+ <a href="#signature_from-instance_method" title="#signature_from (instance method)">- (Object) <strong>signature_from</strong>(params = {}) </a>
698
+
699
+
700
+
701
+ </span>
702
+
703
+
704
+
705
+
706
+
707
+
708
+
709
+
710
+
711
+ <span class="summary_desc"><div class='inline'></div></span>
712
+
713
+ </li>
714
+
715
+
716
+ <li class="public ">
717
+ <span class="summary_signature">
718
+
719
+ <a href="#tag-instance_method" title="#tag (instance method)">- (Object) <strong>tag</strong>(tag) </a>
720
+
721
+
722
+
723
+ </span>
724
+
725
+
726
+
727
+
728
+
729
+
730
+
731
+
732
+
733
+ <span class="summary_desc"><div class='inline'>
734
+ <p>Gets public photos with a given tag.</p>
735
+ </div></span>
736
+
737
+ </li>
738
+
739
+
740
+ <li class="public ">
741
+ <span class="summary_signature">
742
+
743
+ <a href="#users-instance_method" title="#users (instance method)">- (Object) <strong>users</strong>(lookup = nil) </a>
744
+
745
+
746
+
747
+ </span>
748
+
749
+
750
+
751
+
752
+
753
+
754
+
755
+
756
+
757
+ <span class="summary_desc"><div class='inline'>
758
+ <p>Implements flickr.people.findByEmail and flickr.people.findByUsername.</p>
759
+ </div></span>
760
+
761
+ </li>
762
+
763
+
764
+ </ul>
765
+
766
+
767
+ <div id="constructor_details" class="method_details_list">
768
+ <h2>Constructor Details</h2>
769
+
770
+ <div class="method_details first">
771
+ <h3 class="signature first" id="initialize-instance_method">
772
+
773
+ - (<tt><span class='object_link'><a href="" title="Flickr (class)">Flickr</a></span></tt>) <strong>initialize</strong>(api_key_or_params = {})
774
+
775
+
776
+
777
+
778
+
779
+ </h3><div class="docstring">
780
+ <div class="discussion">
781
+
782
+ <p>To use the Flickr API you need an api key (see <a
783
+ href="http://www.flickr.com/services/api/misc.api_keys.html">www.flickr.com/services/api/misc.api_keys.html</a>),
784
+ and the flickr client object shuld be initialized with this. You&#39;ll
785
+ also need a shared secret code if you want to use authentication (e.g. to
786
+ get a user&#39;s private photos) There are two ways to initialize the
787
+ Flickr client. The preferred way is with a hash of params, e.g.
788
+ &#39;api_key&#39; =&gt; &#39;your_api_key&#39;, &#39;shared_secret&#39;
789
+ =&gt; &#39;shared_secret_code&#39;, &#39;verify_ssl&#39; =&gt; true,
790
+ &#39;ca_file&#39; =&gt; &#39;/path/to/cert.pem&#39;. Other way is to use in
791
+ Rails an config file RAILS_ROOT/config/flickr.api.yml and there use params
792
+ as key/values even specified for every environment.</p>
793
+
794
+
795
+ </div>
796
+ </div>
797
+ <div class="tags">
798
+
799
+
800
+ </div><table class="source_code">
801
+ <tr>
802
+ <td>
803
+ <pre class="lines">
804
+
805
+
806
+ 81
807
+ 82
808
+ 83
809
+ 84
810
+ 85
811
+ 86
812
+ 87
813
+ 88
814
+ 89</pre>
815
+ </td>
816
+ <td>
817
+ <pre class="code"><span class="info file"># File 'lib/flickr.rb', line 81</span>
818
+
819
+ <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_api_key_or_params'>api_key_or_params</span><span class='op'>=</span><span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
820
+ <span class='ivar'>@host</span> <span class='op'>=</span> <span class='const'>HOST_URL</span>
821
+ <span class='ivar'>@api</span> <span class='op'>=</span> <span class='const'>API_PATH</span>
822
+ <span class='ivar'>@verify_ssl</span> <span class='op'>=</span> <span class='kw'>true</span>
823
+ <span class='id identifier rubyid_api_key_or_params'>api_key_or_params</span><span class='op'>=</span><span class='lbrace'>{</span><span class='rbrace'>}</span> <span class='kw'>if</span> <span class='id identifier rubyid_api_key_or_params'>api_key_or_params</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span> <span class='comment'># fix for nil value as argument
824
+ </span> <span class='id identifier rubyid_api_key_or_params'>api_key_or_params</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='symbol'>:api_key</span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_api_key_or_params'>api_key_or_params</span><span class='rbrace'>}</span> <span class='kw'>if</span> <span class='id identifier rubyid_api_key_or_params'>api_key_or_params</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'>String</span><span class='rparen'>)</span>
825
+ <span class='id identifier rubyid_api_key_or_params'>api_key_or_params</span> <span class='op'>=</span> <span class='const'>Config</span><span class='period'>.</span><span class='id identifier rubyid_get'>get</span> <span class='kw'>if</span> <span class='const'>Config</span><span class='period'>.</span><span class='id identifier rubyid_parsed?'>parsed?</span> <span class='kw'>and</span> <span class='id identifier rubyid_api_key_or_params'>api_key_or_params</span><span class='period'>.</span><span class='id identifier rubyid_empty?'>empty?</span>
826
+ <span class='id identifier rubyid_set_up_configuration'>set_up_configuration</span> <span class='id identifier rubyid_api_key_or_params'>api_key_or_params</span> <span class='kw'>if</span> <span class='id identifier rubyid_api_key_or_params'>api_key_or_params</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span> <span class='const'>Hash</span>
827
+ <span class='kw'>end</span></pre>
828
+ </td>
829
+ </tr>
830
+ </table>
831
+ </div>
832
+
833
+ </div>
834
+ <div id="method_missing_details" class="method_details_list">
835
+ <h2>Dynamic Method Handling</h2>
836
+ <p class="notice this">
837
+ This class handles dynamic methods through the <tt>method_missing</tt> method
838
+
839
+ </p>
840
+
841
+ <div class="method_details first">
842
+ <h3 class="signature first" id="method_missing-instance_method">
843
+
844
+ - (<tt>Object</tt>) <strong>method_missing</strong>(method_id, params = {})
845
+
846
+
847
+
848
+
849
+
850
+ </h3><div class="docstring">
851
+ <div class="discussion">
852
+
853
+ <p>Implements everything else. Any method not defined explicitly will be
854
+ passed on to the Flickr API, and return an XmlSimple document. For example,
855
+ Flickr#test_echo is not defined, so it will pass the call to the
856
+ flickr.test.echo method.</p>
857
+
858
+
859
+ </div>
860
+ </div>
861
+ <div class="tags">
862
+
863
+
864
+ </div><table class="source_code">
865
+ <tr>
866
+ <td>
867
+ <pre class="lines">
868
+
869
+
870
+ 179
871
+ 180
872
+ 181</pre>
873
+ </td>
874
+ <td>
875
+ <pre class="code"><span class="info file"># File 'lib/flickr.rb', line 179</span>
876
+
877
+ <span class='kw'>def</span> <span class='id identifier rubyid_method_missing'>method_missing</span><span class='lparen'>(</span><span class='id identifier rubyid_method_id'>method_id</span><span class='comma'>,</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>
878
+ <span class='id identifier rubyid_request'>request</span><span class='lparen'>(</span><span class='id identifier rubyid_method_id'>method_id</span><span class='period'>.</span><span class='id identifier rubyid_id2name'>id2name</span><span class='period'>.</span><span class='id identifier rubyid_gsub'>gsub</span><span class='lparen'>(</span><span class='tstring'><span class='regexp_beg'>/</span><span class='tstring_content'>_</span><span class='regexp_end'>/</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>.</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span><span class='comma'>,</span> <span class='id identifier rubyid_params'>params</span><span class='rparen'>)</span>
879
+ <span class='kw'>end</span></pre>
880
+ </td>
881
+ </tr>
882
+ </table>
883
+ </div>
884
+
885
+ </div>
886
+
887
+ <div id="instance_attr_details" class="attr_details">
888
+ <h2>Instance Attribute Details</h2>
889
+
890
+
891
+ <span id=""></span>
892
+ <div class="method_details first">
893
+ <h3 class="signature first" id="api_key-instance_method">
894
+
895
+ - (<tt>Object</tt>) <strong>api_key</strong> <span class="extras">(readonly)</span>
896
+
897
+
898
+
899
+
900
+
901
+ </h3><div class="docstring">
902
+ <div class="discussion">
903
+
904
+ <p>Returns the value of attribute api_key</p>
905
+
906
+
907
+ </div>
908
+ </div>
909
+ <div class="tags">
910
+
911
+
912
+ </div><table class="source_code">
913
+ <tr>
914
+ <td>
915
+ <pre class="lines">
916
+
917
+
918
+ 43
919
+ 44
920
+ 45</pre>
921
+ </td>
922
+ <td>
923
+ <pre class="code"><span class="info file"># File 'lib/flickr.rb', line 43</span>
924
+
925
+ <span class='kw'>def</span> <span class='id identifier rubyid_api_key'>api_key</span>
926
+ <span class='ivar'>@api_key</span>
927
+ <span class='kw'>end</span></pre>
928
+ </td>
929
+ </tr>
930
+ </table>
931
+ </div>
932
+
933
+
934
+ <span id=""></span>
935
+ <div class="method_details ">
936
+ <h3 class="signature " id="auth_token-instance_method">
937
+
938
+ - (<tt>Object</tt>) <strong>auth_token</strong> <span class="extras">(readonly)</span>
939
+
940
+
941
+
942
+
943
+
944
+ </h3><div class="docstring">
945
+ <div class="discussion">
946
+
947
+ <p>Returns the value of attribute auth_token</p>
948
+
949
+
950
+ </div>
951
+ </div>
952
+ <div class="tags">
953
+
954
+
955
+ </div><table class="source_code">
956
+ <tr>
957
+ <td>
958
+ <pre class="lines">
959
+
960
+
961
+ 43
962
+ 44
963
+ 45</pre>
964
+ </td>
965
+ <td>
966
+ <pre class="code"><span class="info file"># File 'lib/flickr.rb', line 43</span>
967
+
968
+ <span class='kw'>def</span> <span class='id identifier rubyid_auth_token'>auth_token</span>
969
+ <span class='ivar'>@auth_token</span>
970
+ <span class='kw'>end</span></pre>
971
+ </td>
972
+ </tr>
973
+ </table>
974
+ </div>
975
+
976
+
977
+ <span id="user=-instance_method"></span>
978
+ <div class="method_details ">
979
+ <h3 class="signature " id="user-instance_method">
980
+
981
+ - (<tt>Object</tt>) <strong>user</strong>
982
+
983
+
984
+
985
+
986
+
987
+ </h3><div class="docstring">
988
+ <div class="discussion">
989
+
990
+ <p>Returns the value of attribute user</p>
991
+
992
+
993
+ </div>
994
+ </div>
995
+ <div class="tags">
996
+
997
+
998
+ </div><table class="source_code">
999
+ <tr>
1000
+ <td>
1001
+ <pre class="lines">
1002
+
1003
+
1004
+ 44
1005
+ 45
1006
+ 46</pre>
1007
+ </td>
1008
+ <td>
1009
+ <pre class="code"><span class="info file"># File 'lib/flickr.rb', line 44</span>
1010
+
1011
+ <span class='kw'>def</span> <span class='id identifier rubyid_user'>user</span>
1012
+ <span class='ivar'>@user</span>
1013
+ <span class='kw'>end</span></pre>
1014
+ </td>
1015
+ </tr>
1016
+ </table>
1017
+ </div>
1018
+
1019
+ </div>
1020
+
1021
+
1022
+ <div id="instance_method_details" class="method_details_list">
1023
+ <h2>Instance Method Details</h2>
1024
+
1025
+
1026
+ <div class="method_details first">
1027
+ <h3 class="signature first" id="find_by_url-instance_method">
1028
+
1029
+ - (<tt>Object</tt>) <strong>find_by_url</strong>(url)
1030
+
1031
+
1032
+
1033
+
1034
+
1035
+ </h3><div class="docstring">
1036
+ <div class="discussion">
1037
+
1038
+ <p>Implements flickr.urls.lookupGroup and flickr.urls.lookupUser</p>
1039
+
1040
+
1041
+ </div>
1042
+ </div>
1043
+ <div class="tags">
1044
+
1045
+
1046
+ </div><table class="source_code">
1047
+ <tr>
1048
+ <td>
1049
+ <pre class="lines">
1050
+
1051
+
1052
+ 113
1053
+ 114
1054
+ 115
1055
+ 116</pre>
1056
+ </td>
1057
+ <td>
1058
+ <pre class="code"><span class="info file"># File 'lib/flickr.rb', line 113</span>
1059
+
1060
+ <span class='kw'>def</span> <span class='id identifier rubyid_find_by_url'>find_by_url</span><span class='lparen'>(</span><span class='id identifier rubyid_url'>url</span><span class='rparen'>)</span>
1061
+ <span class='id identifier rubyid_response'>response</span> <span class='op'>=</span> <span class='id identifier rubyid_urls_lookupUser'>urls_lookupUser</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>url</span><span class='tstring_end'>&#39;</span></span><span class='op'>=&gt;</span><span class='id identifier rubyid_url'>url</span><span class='rparen'>)</span> <span class='kw'>rescue</span> <span class='id identifier rubyid_urls_lookupGroup'>urls_lookupGroup</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>url</span><span class='tstring_end'>&#39;</span></span><span class='op'>=&gt;</span><span class='id identifier rubyid_url'>url</span><span class='rparen'>)</span> <span class='kw'>rescue</span> <span class='kw'>nil</span>
1062
+ <span class='lparen'>(</span><span class='id identifier rubyid_response'>response</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>user</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span><span class='rparen'>)</span> <span class='op'>?</span> <span class='const'>User</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_response'>response</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>user</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>id</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span><span class='comma'>,</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='ivar'>@api_key</span><span class='rparen'>)</span> <span class='op'>:</span> <span class='const'>Group</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_response'>response</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>group</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>id</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span><span class='comma'>,</span> <span class='ivar'>@api_key</span><span class='rparen'>)</span> <span class='kw'>unless</span> <span class='id identifier rubyid_response'>response</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
1063
+ <span class='kw'>end</span></pre>
1064
+ </td>
1065
+ </tr>
1066
+ </table>
1067
+ </div>
1068
+
1069
+ <div class="method_details ">
1070
+ <h3 class="signature " id="get_token_from-instance_method">
1071
+
1072
+ - (<tt>Object</tt>) <strong>get_token_from</strong>(frob)
1073
+
1074
+
1075
+
1076
+
1077
+
1078
+ </h3><div class="docstring">
1079
+ <div class="discussion">
1080
+
1081
+ <p>Gets authentication token given a Flickr frob, which is returned when user
1082
+ allows access to their account for the application with the api_key which
1083
+ made the request</p>
1084
+
1085
+
1086
+ </div>
1087
+ </div>
1088
+ <div class="tags">
1089
+
1090
+
1091
+ </div><table class="source_code">
1092
+ <tr>
1093
+ <td>
1094
+ <pre class="lines">
1095
+
1096
+
1097
+ 102
1098
+ 103
1099
+ 104
1100
+ 105
1101
+ 106
1102
+ 107
1103
+ 108
1104
+ 109
1105
+ 110</pre>
1106
+ </td>
1107
+ <td>
1108
+ <pre class="code"><span class="info file"># File 'lib/flickr.rb', line 102</span>
1109
+
1110
+ <span class='kw'>def</span> <span class='id identifier rubyid_get_token_from'>get_token_from</span><span class='lparen'>(</span><span class='id identifier rubyid_frob'>frob</span><span class='rparen'>)</span>
1111
+ <span class='id identifier rubyid_auth_response'>auth_response</span> <span class='op'>=</span> <span class='id identifier rubyid_request'>request</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>auth.getToken</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='symbol'>:frob</span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_frob'>frob</span><span class='rparen'>)</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>auth</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span>
1112
+ <span class='ivar'>@auth_token</span> <span class='op'>=</span> <span class='id identifier rubyid_auth_response'>auth_response</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>token</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span>
1113
+ <span class='ivar'>@user</span> <span class='op'>=</span> <span class='const'>User</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>id</span><span class='tstring_end'>&#39;</span></span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_auth_response'>auth_response</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>user</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>nsid</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span><span class='comma'>,</span>
1114
+ <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>username</span><span class='tstring_end'>&#39;</span></span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_auth_response'>auth_response</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>user</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>username</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span><span class='comma'>,</span>
1115
+ <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>name</span><span class='tstring_end'>&#39;</span></span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_auth_response'>auth_response</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>user</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>fullname</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span><span class='comma'>,</span>
1116
+ <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>client</span><span class='tstring_end'>&#39;</span></span> <span class='op'>=&gt;</span> <span class='kw'>self</span><span class='rparen'>)</span>
1117
+ <span class='ivar'>@auth_token</span>
1118
+ <span class='kw'>end</span></pre>
1119
+ </td>
1120
+ </tr>
1121
+ </table>
1122
+ </div>
1123
+
1124
+ <div class="method_details ">
1125
+ <h3 class="signature " id="groups-instance_method">
1126
+
1127
+ - (<tt>Object</tt>) <strong>groups</strong>(group_name, options = {})
1128
+
1129
+
1130
+
1131
+
1132
+
1133
+ </h3><div class="docstring">
1134
+ <div class="discussion">
1135
+
1136
+ <p>Implements flickr.groups.search</p>
1137
+
1138
+
1139
+ </div>
1140
+ </div>
1141
+ <div class="tags">
1142
+
1143
+
1144
+ </div><table class="source_code">
1145
+ <tr>
1146
+ <td>
1147
+ <pre class="lines">
1148
+
1149
+
1150
+ 146
1151
+ 147
1152
+ 148
1153
+ 149
1154
+ 150
1155
+ 151
1156
+ 152
1157
+ 153
1158
+ 154</pre>
1159
+ </td>
1160
+ <td>
1161
+ <pre class="code"><span class="info file"># File 'lib/flickr.rb', line 146</span>
1162
+
1163
+ <span class='kw'>def</span> <span class='id identifier rubyid_groups'>groups</span><span class='lparen'>(</span><span class='id identifier rubyid_group_name'>group_name</span><span class='comma'>,</span> <span class='id identifier rubyid_options'>options</span><span class='op'>=</span><span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
1164
+ <span class='id identifier rubyid_collection'>collection</span> <span class='op'>=</span> <span class='id identifier rubyid_groups_search'>groups_search</span><span class='lparen'>(</span><span class='lbrace'>{</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>text</span><span class='tstring_end'>&quot;</span></span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_group_name'>group_name</span><span class='rbrace'>}</span><span class='period'>.</span><span class='id identifier rubyid_merge'>merge</span><span class='lparen'>(</span><span class='id identifier rubyid_options'>options</span><span class='rparen'>)</span><span class='rparen'>)</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>groups</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>group</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span>
1165
+ <span class='id identifier rubyid_collection'>collection</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='id identifier rubyid_collection'>collection</span><span class='rbracket'>]</span> <span class='kw'>if</span> <span class='id identifier rubyid_collection'>collection</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span> <span class='const'>Hash</span>
1166
+
1167
+ <span class='id identifier rubyid_collection'>collection</span><span class='period'>.</span><span class='id identifier rubyid_collect'>collect</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_group'>group</span><span class='op'>|</span> <span class='const'>Group</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>id</span><span class='tstring_end'>&quot;</span></span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_group'>group</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>nsid</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span><span class='comma'>,</span>
1168
+ <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>name</span><span class='tstring_end'>&quot;</span></span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_group'>group</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>name</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span><span class='comma'>,</span>
1169
+ <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>eighteenplus</span><span class='tstring_end'>&quot;</span></span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_group'>group</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>eighteenplus</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span><span class='comma'>,</span>
1170
+ <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>client</span><span class='tstring_end'>&quot;</span></span> <span class='op'>=&gt;</span> <span class='kw'>self</span><span class='rparen'>)</span> <span class='rbrace'>}</span>
1171
+ <span class='kw'>end</span></pre>
1172
+ </td>
1173
+ </tr>
1174
+ </table>
1175
+ </div>
1176
+
1177
+ <div class="method_details ">
1178
+ <h3 class="signature " id="http_get-instance_method">
1179
+
1180
+ - (<tt>Object</tt>) <strong>http_get</strong>(url)
1181
+
1182
+
1183
+
1184
+
1185
+
1186
+ </h3><div class="docstring">
1187
+ <div class="discussion">
1188
+
1189
+ <p>Does an HTTP GET on a given URL and returns the response body</p>
1190
+
1191
+
1192
+ </div>
1193
+ </div>
1194
+ <div class="tags">
1195
+
1196
+
1197
+ </div><table class="source_code">
1198
+ <tr>
1199
+ <td>
1200
+ <pre class="lines">
1201
+
1202
+
1203
+ 184
1204
+ 185
1205
+ 186
1206
+ 187
1207
+ 188
1208
+ 189
1209
+ 190
1210
+ 191
1211
+ 192
1212
+ 193</pre>
1213
+ </td>
1214
+ <td>
1215
+ <pre class="code"><span class="info file"># File 'lib/flickr.rb', line 184</span>
1216
+
1217
+ <span class='kw'>def</span> <span class='id identifier rubyid_http_get'>http_get</span><span class='lparen'>(</span><span class='id identifier rubyid_url'>url</span><span class='rparen'>)</span>
1218
+ <span class='id identifier rubyid_url'>url</span> <span class='op'>=</span> <span class='const'>URI</span><span class='period'>.</span><span class='id identifier rubyid_parse'>parse</span><span class='lparen'>(</span><span class='id identifier rubyid_url'>url</span><span class='rparen'>)</span>
1219
+ <span class='id identifier rubyid_http'>http</span> <span class='op'>=</span> <span class='const'>Net</span><span class='op'>::</span><span class='const'>HTTP</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span> <span class='id identifier rubyid_url'>url</span><span class='period'>.</span><span class='id identifier rubyid_host'>host</span><span class='comma'>,</span> <span class='id identifier rubyid_url'>url</span><span class='period'>.</span><span class='id identifier rubyid_port'>port</span>
1220
+ <span class='id identifier rubyid_http'>http</span><span class='period'>.</span><span class='id identifier rubyid_use_ssl'>use_ssl</span> <span class='op'>=</span> <span class='kw'>true</span>
1221
+ <span class='id identifier rubyid_http'>http</span><span class='period'>.</span><span class='id identifier rubyid_verify_mode'>verify_mode</span> <span class='op'>=</span> <span class='lparen'>(</span><span class='ivar'>@verify_ssl</span> <span class='op'>?</span> <span class='const'>OpenSSL</span><span class='op'>::</span><span class='const'>SSL</span><span class='op'>::</span><span class='const'>VERIFY_PEER</span> <span class='op'>:</span> <span class='const'>OpenSSL</span><span class='op'>::</span><span class='const'>SSL</span><span class='op'>::</span><span class='const'>VERIFY_NONE</span><span class='rparen'>)</span>
1222
+ <span class='id identifier rubyid_http'>http</span><span class='period'>.</span><span class='id identifier rubyid_ca_file'>ca_file</span> <span class='op'>=</span> <span class='ivar'>@ca_file</span> <span class='kw'>if</span> <span class='ivar'>@ca_file</span>
1223
+ <span class='id identifier rubyid_http'>http</span><span class='period'>.</span><span class='id identifier rubyid_start'>start</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_res'>res</span><span class='op'>|</span>
1224
+ <span class='id identifier rubyid_res'>res</span><span class='period'>.</span><span class='id identifier rubyid_request_get'>request_get</span><span class='lparen'>(</span><span class='id identifier rubyid_url'>url</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_body'>body</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span>
1225
+ <span class='kw'>end</span>
1226
+ <span class='kw'>end</span></pre>
1227
+ </td>
1228
+ </tr>
1229
+ </table>
1230
+ </div>
1231
+
1232
+ <div class="method_details ">
1233
+ <h3 class="signature " id="licenses-instance_method">
1234
+
1235
+ - (<tt>Object</tt>) <strong>licenses</strong>
1236
+
1237
+
1238
+
1239
+
1240
+
1241
+ </h3><div class="docstring">
1242
+ <div class="discussion">
1243
+
1244
+ <p>Implements flickr.photos.licenses.getInfo</p>
1245
+
1246
+
1247
+ </div>
1248
+ </div>
1249
+ <div class="tags">
1250
+
1251
+
1252
+ </div><table class="source_code">
1253
+ <tr>
1254
+ <td>
1255
+ <pre class="lines">
1256
+
1257
+
1258
+ 166
1259
+ 167
1260
+ 168</pre>
1261
+ </td>
1262
+ <td>
1263
+ <pre class="code"><span class="info file"># File 'lib/flickr.rb', line 166</span>
1264
+
1265
+ <span class='kw'>def</span> <span class='id identifier rubyid_licenses'>licenses</span>
1266
+ <span class='id identifier rubyid_photos_licenses_getInfo'>photos_licenses_getInfo</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>licenses</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>license</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span>
1267
+ <span class='kw'>end</span></pre>
1268
+ </td>
1269
+ </tr>
1270
+ </table>
1271
+ </div>
1272
+
1273
+ <div class="method_details ">
1274
+ <h3 class="signature " id="login_url-instance_method">
1275
+
1276
+ - (<tt>Object</tt>) <strong>login_url</strong>(perms)
1277
+
1278
+
1279
+
1280
+
1281
+
1282
+ </h3><div class="docstring">
1283
+ <div class="discussion">
1284
+
1285
+ <p>Returns url for user to login in to Flickr to authenticate app for a user</p>
1286
+
1287
+
1288
+ </div>
1289
+ </div>
1290
+ <div class="tags">
1291
+
1292
+
1293
+ </div><table class="source_code">
1294
+ <tr>
1295
+ <td>
1296
+ <pre class="lines">
1297
+
1298
+
1299
+ 171
1300
+ 172
1301
+ 173</pre>
1302
+ </td>
1303
+ <td>
1304
+ <pre class="code"><span class="info file"># File 'lib/flickr.rb', line 171</span>
1305
+
1306
+ <span class='kw'>def</span> <span class='id identifier rubyid_login_url'>login_url</span><span class='lparen'>(</span><span class='id identifier rubyid_perms'>perms</span><span class='rparen'>)</span>
1307
+ <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>https://flickr.com/services/auth/?api_key=</span><span class='embexpr_beg'>#{</span><span class='ivar'>@api_key</span><span class='embexpr_end'>}</span><span class='tstring_content'>&amp;perms=</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_perms'>perms</span><span class='embexpr_end'>}</span><span class='tstring_content'>&amp;api_sig=</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_signature_from'>signature_from</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>api_key</span><span class='tstring_end'>&#39;</span></span><span class='op'>=&gt;</span><span class='ivar'>@api_key</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>perms</span><span class='tstring_end'>&#39;</span></span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_perms'>perms</span><span class='rparen'>)</span><span class='embexpr_end'>}</span><span class='tstring_end'>&quot;</span></span>
1308
+ <span class='kw'>end</span></pre>
1309
+ </td>
1310
+ </tr>
1311
+ </table>
1312
+ </div>
1313
+
1314
+ <div class="method_details ">
1315
+ <h3 class="signature " id="photos-instance_method">
1316
+
1317
+ - (<tt>Object</tt>) <strong>photos</strong>(*criteria)
1318
+
1319
+
1320
+
1321
+
1322
+
1323
+ </h3><div class="docstring">
1324
+ <div class="discussion">
1325
+
1326
+ <p>Implements flickr.photos.getRecent and flickr.photos.search</p>
1327
+
1328
+
1329
+ </div>
1330
+ </div>
1331
+ <div class="tags">
1332
+
1333
+
1334
+ </div><table class="source_code">
1335
+ <tr>
1336
+ <td>
1337
+ <pre class="lines">
1338
+
1339
+
1340
+ 119
1341
+ 120
1342
+ 121</pre>
1343
+ </td>
1344
+ <td>
1345
+ <pre class="code"><span class="info file"># File 'lib/flickr.rb', line 119</span>
1346
+
1347
+ <span class='kw'>def</span> <span class='id identifier rubyid_photos'>photos</span><span class='lparen'>(</span><span class='op'>*</span><span class='id identifier rubyid_criteria'>criteria</span><span class='rparen'>)</span>
1348
+ <span class='kw'>not</span> <span class='id identifier rubyid_criteria'>criteria</span><span class='period'>.</span><span class='id identifier rubyid_empty?'>empty?</span> <span class='kw'>and</span> <span class='id identifier rubyid_photos_search'>photos_search</span><span class='lparen'>(</span><span class='op'>*</span><span class='id identifier rubyid_criteria'>criteria</span><span class='rparen'>)</span> <span class='kw'>or</span> <span class='id identifier rubyid_recent'>recent</span>
1349
+ <span class='kw'>end</span></pre>
1350
+ </td>
1351
+ </tr>
1352
+ </table>
1353
+ </div>
1354
+
1355
+ <div class="method_details ">
1356
+ <h3 class="signature " id="photos_request-instance_method">
1357
+
1358
+ - (<tt>Object</tt>) <strong>photos_request</strong>(method, params = {}, list_node = &quot;photos&quot;)
1359
+
1360
+
1361
+
1362
+
1363
+
1364
+ </h3><div class="docstring">
1365
+ <div class="discussion">
1366
+
1367
+ <p>acts like request but returns a PhotoCollection (a list of Photo objects)</p>
1368
+
1369
+
1370
+ </div>
1371
+ </div>
1372
+ <div class="tags">
1373
+
1374
+
1375
+ </div><table class="source_code">
1376
+ <tr>
1377
+ <td>
1378
+ <pre class="lines">
1379
+
1380
+
1381
+ 204
1382
+ 205
1383
+ 206
1384
+ 207</pre>
1385
+ </td>
1386
+ <td>
1387
+ <pre class="code"><span class="info file"># File 'lib/flickr.rb', line 204</span>
1388
+
1389
+ <span class='kw'>def</span> <span class='id identifier rubyid_photos_request'>photos_request</span><span class='lparen'>(</span><span class='id identifier rubyid_method'>method</span><span class='comma'>,</span> <span class='id identifier rubyid_params'>params</span><span class='op'>=</span><span class='lbrace'>{</span><span class='rbrace'>}</span><span class='comma'>,</span> <span class='id identifier rubyid_list_node'>list_node</span><span class='op'>=</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>photos</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
1390
+ <span class='id identifier rubyid_photos'>photos</span> <span class='op'>=</span> <span class='id identifier rubyid_request'>request</span><span class='lparen'>(</span><span class='id identifier rubyid_method'>method</span><span class='comma'>,</span> <span class='id identifier rubyid_params'>params</span><span class='rparen'>)</span>
1391
+ <span class='const'>PhotoCollection</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_photos'>photos</span><span class='comma'>,</span> <span class='ivar'>@api_key</span><span class='comma'>,</span> <span class='id identifier rubyid_list_node'>list_node</span><span class='rparen'>)</span>
1392
+ <span class='kw'>end</span></pre>
1393
+ </td>
1394
+ </tr>
1395
+ </table>
1396
+ </div>
1397
+
1398
+ <div class="method_details ">
1399
+ <h3 class="signature " id="photos_search-instance_method">
1400
+
1401
+ - (<tt>Object</tt>) <strong>photos_search</strong>(params = {})
1402
+
1403
+
1404
+
1405
+ <span class="aliases">Also known as:
1406
+ <span class="names"><span id='search-instance_method'>search</span></span>
1407
+ </span>
1408
+
1409
+
1410
+
1411
+ </h3><table class="source_code">
1412
+ <tr>
1413
+ <td>
1414
+ <pre class="lines">
1415
+
1416
+
1417
+ 129
1418
+ 130
1419
+ 131</pre>
1420
+ </td>
1421
+ <td>
1422
+ <pre class="code"><span class="info file"># File 'lib/flickr.rb', line 129</span>
1423
+
1424
+ <span class='kw'>def</span> <span class='id identifier rubyid_photos_search'>photos_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>
1425
+ <span class='id identifier rubyid_photos_request'>photos_request</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>photos.search</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span> <span class='id identifier rubyid_params'>params</span><span class='rparen'>)</span>
1426
+ <span class='kw'>end</span></pre>
1427
+ </td>
1428
+ </tr>
1429
+ </table>
1430
+ </div>
1431
+
1432
+ <div class="method_details ">
1433
+ <h3 class="signature " id="photoset-instance_method">
1434
+
1435
+ - (<tt>Object</tt>) <strong>photoset</strong>(photoset_id)
1436
+
1437
+
1438
+
1439
+
1440
+
1441
+ </h3><table class="source_code">
1442
+ <tr>
1443
+ <td>
1444
+ <pre class="lines">
1445
+
1446
+
1447
+ 156
1448
+ 157
1449
+ 158</pre>
1450
+ </td>
1451
+ <td>
1452
+ <pre class="code"><span class="info file"># File 'lib/flickr.rb', line 156</span>
1453
+
1454
+ <span class='kw'>def</span> <span class='id identifier rubyid_photoset'>photoset</span><span class='lparen'>(</span><span class='id identifier rubyid_photoset_id'>photoset_id</span><span class='rparen'>)</span>
1455
+ <span class='const'>Photoset</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_photoset_id'>photoset_id</span><span class='comma'>,</span> <span class='ivar'>@api_key</span><span class='rparen'>)</span>
1456
+ <span class='kw'>end</span></pre>
1457
+ </td>
1458
+ </tr>
1459
+ </table>
1460
+ </div>
1461
+
1462
+ <div class="method_details ">
1463
+ <h3 class="signature " id="recent-instance_method">
1464
+
1465
+ - (<tt>Object</tt>) <strong>recent</strong>
1466
+
1467
+
1468
+
1469
+
1470
+
1471
+ </h3><div class="docstring">
1472
+ <div class="discussion">
1473
+
1474
+ <p>flickr.photos.getRecent 100 newest photos from everyone</p>
1475
+
1476
+
1477
+ </div>
1478
+ </div>
1479
+ <div class="tags">
1480
+
1481
+
1482
+ </div><table class="source_code">
1483
+ <tr>
1484
+ <td>
1485
+ <pre class="lines">
1486
+
1487
+
1488
+ 125
1489
+ 126
1490
+ 127</pre>
1491
+ </td>
1492
+ <td>
1493
+ <pre class="code"><span class="info file"># File 'lib/flickr.rb', line 125</span>
1494
+
1495
+ <span class='kw'>def</span> <span class='id identifier rubyid_recent'>recent</span>
1496
+ <span class='id identifier rubyid_photos_request'>photos_request</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>photos.getRecent</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span>
1497
+ <span class='kw'>end</span></pre>
1498
+ </td>
1499
+ </tr>
1500
+ </table>
1501
+ </div>
1502
+
1503
+ <div class="method_details ">
1504
+ <h3 class="signature " id="related_tags-instance_method">
1505
+
1506
+ - (<tt>Object</tt>) <strong>related_tags</strong>(tag)
1507
+
1508
+
1509
+
1510
+
1511
+
1512
+ </h3><div class="docstring">
1513
+ <div class="discussion">
1514
+
1515
+ <p>Implements flickr.tags.getRelated</p>
1516
+
1517
+
1518
+ </div>
1519
+ </div>
1520
+ <div class="tags">
1521
+
1522
+
1523
+ </div><table class="source_code">
1524
+ <tr>
1525
+ <td>
1526
+ <pre class="lines">
1527
+
1528
+
1529
+ 161
1530
+ 162
1531
+ 163</pre>
1532
+ </td>
1533
+ <td>
1534
+ <pre class="code"><span class="info file"># File 'lib/flickr.rb', line 161</span>
1535
+
1536
+ <span class='kw'>def</span> <span class='id identifier rubyid_related_tags'>related_tags</span><span class='lparen'>(</span><span class='id identifier rubyid_tag'>tag</span><span class='rparen'>)</span>
1537
+ <span class='id identifier rubyid_tags_getRelated'>tags_getRelated</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>tag</span><span class='tstring_end'>&#39;</span></span><span class='op'>=&gt;</span><span class='id identifier rubyid_tag'>tag</span><span class='rparen'>)</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>tags</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>tag</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span>
1538
+ <span class='kw'>end</span></pre>
1539
+ </td>
1540
+ </tr>
1541
+ </table>
1542
+ </div>
1543
+
1544
+ <div class="method_details ">
1545
+ <h3 class="signature " id="request-instance_method">
1546
+
1547
+ - (<tt>Object</tt>) <strong>request</strong>(method, params = {})
1548
+
1549
+
1550
+
1551
+
1552
+
1553
+ </h3><div class="docstring">
1554
+ <div class="discussion">
1555
+
1556
+ <p>Takes a Flickr API method name and set of parameters; returns an XmlSimple
1557
+ object with the response</p>
1558
+
1559
+
1560
+ </div>
1561
+ </div>
1562
+ <div class="tags">
1563
+
1564
+
1565
+ </div><table class="source_code">
1566
+ <tr>
1567
+ <td>
1568
+ <pre class="lines">
1569
+
1570
+
1571
+ 196
1572
+ 197
1573
+ 198
1574
+ 199
1575
+ 200
1576
+ 201</pre>
1577
+ </td>
1578
+ <td>
1579
+ <pre class="code"><span class="info file"># File 'lib/flickr.rb', line 196</span>
1580
+
1581
+ <span class='kw'>def</span> <span class='id identifier rubyid_request'>request</span><span class='lparen'>(</span><span class='id identifier rubyid_method'>method</span><span class='comma'>,</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>
1582
+ <span class='id identifier rubyid_url'>url</span> <span class='op'>=</span> <span class='id identifier rubyid_request_url'>request_url</span><span class='lparen'>(</span><span class='id identifier rubyid_method'>method</span><span class='comma'>,</span> <span class='id identifier rubyid_params'>params</span><span class='rparen'>)</span>
1583
+ <span class='id identifier rubyid_response'>response</span> <span class='op'>=</span> <span class='const'>XmlSimple</span><span class='period'>.</span><span class='id identifier rubyid_xml_in'>xml_in</span><span class='lparen'>(</span><span class='id identifier rubyid_http_get'>http_get</span><span class='lparen'>(</span><span class='id identifier rubyid_url'>url</span><span class='rparen'>)</span><span class='comma'>,</span> <span class='lbrace'>{</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>ForceArray</span><span class='tstring_end'>&#39;</span></span> <span class='op'>=&gt;</span> <span class='kw'>false</span> <span class='rbrace'>}</span><span class='rparen'>)</span>
1584
+ <span class='id identifier rubyid_raise'>raise</span> <span class='id identifier rubyid_response'>response</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>err</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>msg</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span> <span class='kw'>if</span> <span class='id identifier rubyid_response'>response</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>stat</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span> <span class='op'>!=</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>ok</span><span class='tstring_end'>&#39;</span></span>
1585
+ <span class='id identifier rubyid_response'>response</span>
1586
+ <span class='kw'>end</span></pre>
1587
+ </td>
1588
+ </tr>
1589
+ </table>
1590
+ </div>
1591
+
1592
+ <div class="method_details ">
1593
+ <h3 class="signature " id="request_url-instance_method">
1594
+
1595
+ - (<tt>Object</tt>) <strong>request_url</strong>(method, params = {})
1596
+
1597
+
1598
+
1599
+
1600
+
1601
+ </h3><div class="docstring">
1602
+ <div class="discussion">
1603
+
1604
+ <p>Builds url for Flickr API REST request from given the flickr method name
1605
+ (exclusing the &#39;flickr.&#39; that begins each method call) and params
1606
+ (where applicable) which should be supplied as a Hash (e.g
1607
+ &#39;user_id&#39; =&gt; “foo123”)</p>
1608
+
1609
+
1610
+ </div>
1611
+ </div>
1612
+ <div class="tags">
1613
+
1614
+
1615
+ </div><table class="source_code">
1616
+ <tr>
1617
+ <td>
1618
+ <pre class="lines">
1619
+
1620
+
1621
+ 212
1622
+ 213
1623
+ 214
1624
+ 215
1625
+ 216
1626
+ 217
1627
+ 218
1628
+ 219</pre>
1629
+ </td>
1630
+ <td>
1631
+ <pre class="code"><span class="info file"># File 'lib/flickr.rb', line 212</span>
1632
+
1633
+ <span class='kw'>def</span> <span class='id identifier rubyid_request_url'>request_url</span><span class='lparen'>(</span><span class='id identifier rubyid_method'>method</span><span class='comma'>,</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>
1634
+ <span class='id identifier rubyid_method'>method</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>flickr.</span><span class='tstring_end'>&#39;</span></span> <span class='op'>+</span> <span class='id identifier rubyid_method'>method</span>
1635
+ <span class='id identifier rubyid_url'>url</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='embexpr_beg'>#{</span><span class='ivar'>@host</span><span class='embexpr_end'>}</span><span class='embexpr_beg'>#{</span><span class='ivar'>@api</span><span class='embexpr_end'>}</span><span class='tstring_content'>/?api_key=</span><span class='embexpr_beg'>#{</span><span class='ivar'>@api_key</span><span class='embexpr_end'>}</span><span class='tstring_content'>&amp;method=</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_method'>method</span><span class='embexpr_end'>}</span><span class='tstring_end'>&quot;</span></span>
1636
+ <span class='id identifier rubyid_params'>params</span><span class='period'>.</span><span class='id identifier rubyid_merge!'>merge!</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>api_key</span><span class='tstring_end'>&#39;</span></span> <span class='op'>=&gt;</span> <span class='ivar'>@api_key</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>method</span><span class='tstring_end'>&#39;</span></span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_method'>method</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>auth_token</span><span class='tstring_end'>&#39;</span></span> <span class='op'>=&gt;</span> <span class='ivar'>@auth_token</span><span class='rparen'>)</span>
1637
+ <span class='id identifier rubyid_signature'>signature</span> <span class='op'>=</span> <span class='id identifier rubyid_signature_from'>signature_from</span><span class='lparen'>(</span><span class='id identifier rubyid_params'>params</span><span class='rparen'>)</span>
1638
+
1639
+ <span class='id identifier rubyid_url'>url</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='embexpr_beg'>#{</span><span class='ivar'>@host</span><span class='embexpr_end'>}</span><span class='embexpr_beg'>#{</span><span class='ivar'>@api</span><span class='embexpr_end'>}</span><span class='tstring_content'>/?</span><span class='tstring_end'>&quot;</span></span> <span class='op'>+</span> <span class='id identifier rubyid_params'>params</span><span class='period'>.</span><span class='id identifier rubyid_merge'>merge</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>api_sig</span><span class='tstring_end'>&#39;</span></span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_signature'>signature</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_collect'>collect</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_k'>k</span><span class='comma'>,</span><span class='id identifier rubyid_v'>v</span><span class='op'>|</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_k'>k</span><span class='embexpr_end'>}</span><span class='tstring_content'>=</span><span class='tstring_end'>&quot;</span></span> <span class='op'>+</span> <span class='const'>CGI</span><span class='op'>::</span><span class='id identifier rubyid_escape'>escape</span><span class='lparen'>(</span><span class='id identifier rubyid_v'>v</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span><span class='rparen'>)</span> <span class='kw'>unless</span> <span class='id identifier rubyid_v'>v</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span> <span class='rbrace'>}</span><span class='period'>.</span><span class='id identifier rubyid_compact'>compact</span><span class='period'>.</span><span class='id identifier rubyid_join'>join</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>&amp;</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
1640
+ <span class='kw'>end</span></pre>
1641
+ </td>
1642
+ </tr>
1643
+ </table>
1644
+ </div>
1645
+
1646
+ <div class="method_details ">
1647
+ <h3 class="signature " id="set_up_configuration-instance_method">
1648
+
1649
+ - (<tt>Object</tt>) <strong>set_up_configuration</strong>(api_key_or_params = {})
1650
+
1651
+
1652
+
1653
+
1654
+
1655
+ </h3><table class="source_code">
1656
+ <tr>
1657
+ <td>
1658
+ <pre class="lines">
1659
+
1660
+
1661
+ 91
1662
+ 92
1663
+ 93
1664
+ 94
1665
+ 95
1666
+ 96
1667
+ 97</pre>
1668
+ </td>
1669
+ <td>
1670
+ <pre class="code"><span class="info file"># File 'lib/flickr.rb', line 91</span>
1671
+
1672
+ <span class='kw'>def</span> <span class='id identifier rubyid_set_up_configuration'>set_up_configuration</span> <span class='id identifier rubyid_api_key_or_params'>api_key_or_params</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span>
1673
+ <span class='ivar'>@api_key</span> <span class='op'>=</span> <span class='id identifier rubyid_api_key_or_params'>api_key_or_params</span><span class='lbracket'>[</span><span class='symbol'>:api_key</span><span class='rbracket'>]</span>
1674
+ <span class='ivar'>@shared_secret</span> <span class='op'>=</span> <span class='id identifier rubyid_api_key_or_params'>api_key_or_params</span><span class='lbracket'>[</span><span class='symbol'>:shared_secret</span><span class='rbracket'>]</span>
1675
+ <span class='ivar'>@auth_token</span> <span class='op'>=</span> <span class='id identifier rubyid_api_key_or_params'>api_key_or_params</span><span class='lbracket'>[</span><span class='symbol'>:auth_token</span><span class='rbracket'>]</span>
1676
+ <span class='ivar'>@ca_file</span> <span class='op'>=</span> <span class='id identifier rubyid_api_key_or_params'>api_key_or_params</span><span class='lbracket'>[</span><span class='symbol'>:ca_file</span><span class='rbracket'>]</span>
1677
+ <span class='ivar'>@verify_ssl</span> <span class='op'>=</span> <span class='op'>!</span><span class='lparen'>(</span><span class='id identifier rubyid_api_key_or_params'>api_key_or_params</span><span class='lbracket'>[</span><span class='symbol'>:verify_ssl</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span> <span class='op'>===</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>false</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span>
1678
+ <span class='kw'>end</span></pre>
1679
+ </td>
1680
+ </tr>
1681
+ </table>
1682
+ </div>
1683
+
1684
+ <div class="method_details ">
1685
+ <h3 class="signature " id="signature_from-instance_method">
1686
+
1687
+ - (<tt>Object</tt>) <strong>signature_from</strong>(params = {})
1688
+
1689
+
1690
+
1691
+
1692
+
1693
+ </h3><table class="source_code">
1694
+ <tr>
1695
+ <td>
1696
+ <pre class="lines">
1697
+
1698
+
1699
+ 221
1700
+ 222
1701
+ 223
1702
+ 224
1703
+ 225</pre>
1704
+ </td>
1705
+ <td>
1706
+ <pre class="code"><span class="info file"># File 'lib/flickr.rb', line 221</span>
1707
+
1708
+ <span class='kw'>def</span> <span class='id identifier rubyid_signature_from'>signature_from</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>
1709
+ <span class='kw'>return</span> <span class='kw'>unless</span> <span class='ivar'>@shared_secret</span> <span class='comment'># don&#39;t both getting signature if no shared_secret
1710
+ </span> <span class='id identifier rubyid_request_str'>request_str</span> <span class='op'>=</span> <span class='id identifier rubyid_params'>params</span><span class='period'>.</span><span class='id identifier rubyid_reject'>reject</span> <span class='lbrace'>{</span><span class='op'>|</span><span class='id identifier rubyid_k'>k</span><span class='comma'>,</span><span class='id identifier rubyid_v'>v</span><span class='op'>|</span> <span class='id identifier rubyid_v'>v</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span><span class='rbrace'>}</span><span class='period'>.</span><span class='id identifier rubyid_collect'>collect</span> <span class='lbrace'>{</span><span class='op'>|</span><span class='id identifier rubyid_p'>p</span><span class='op'>|</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_p'>p</span><span class='lbracket'>[</span><span class='int'>0</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span><span class='embexpr_end'>}</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_p'>p</span><span class='lbracket'>[</span><span class='int'>1</span><span class='rbracket'>]</span><span class='embexpr_end'>}</span><span class='tstring_end'>&quot;</span></span><span class='rbrace'>}</span><span class='period'>.</span><span class='id identifier rubyid_sort'>sort</span><span class='period'>.</span><span class='id identifier rubyid_join'>join</span> <span class='comment'># build key value pairs, sort in alpha order then join them, ignoring those with nil value
1711
+ </span> <span class='kw'>return</span> <span class='const'>Digest</span><span class='op'>::</span><span class='const'>MD5</span><span class='period'>.</span><span class='id identifier rubyid_hexdigest'>hexdigest</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='embexpr_beg'>#{</span><span class='ivar'>@shared_secret</span><span class='embexpr_end'>}</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_request_str'>request_str</span><span class='embexpr_end'>}</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
1712
+ <span class='kw'>end</span></pre>
1713
+ </td>
1714
+ </tr>
1715
+ </table>
1716
+ </div>
1717
+
1718
+ <div class="method_details ">
1719
+ <h3 class="signature " id="tag-instance_method">
1720
+
1721
+ - (<tt>Object</tt>) <strong>tag</strong>(tag)
1722
+
1723
+
1724
+
1725
+
1726
+
1727
+ </h3><div class="docstring">
1728
+ <div class="discussion">
1729
+
1730
+ <p>Gets public photos with a given tag</p>
1731
+
1732
+
1733
+ </div>
1734
+ </div>
1735
+ <div class="tags">
1736
+
1737
+
1738
+ </div><table class="source_code">
1739
+ <tr>
1740
+ <td>
1741
+ <pre class="lines">
1742
+
1743
+
1744
+ 135
1745
+ 136
1746
+ 137</pre>
1747
+ </td>
1748
+ <td>
1749
+ <pre class="code"><span class="info file"># File 'lib/flickr.rb', line 135</span>
1750
+
1751
+ <span class='kw'>def</span> <span class='id identifier rubyid_tag'>tag</span><span class='lparen'>(</span><span class='id identifier rubyid_tag'>tag</span><span class='rparen'>)</span>
1752
+ <span class='id identifier rubyid_photos'>photos</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>tags</span><span class='tstring_end'>&#39;</span></span><span class='op'>=&gt;</span><span class='id identifier rubyid_tag'>tag</span><span class='rparen'>)</span>
1753
+ <span class='kw'>end</span></pre>
1754
+ </td>
1755
+ </tr>
1756
+ </table>
1757
+ </div>
1758
+
1759
+ <div class="method_details ">
1760
+ <h3 class="signature " id="users-instance_method">
1761
+
1762
+ - (<tt>Object</tt>) <strong>users</strong>(lookup = nil)
1763
+
1764
+
1765
+
1766
+
1767
+
1768
+ </h3><div class="docstring">
1769
+ <div class="discussion">
1770
+
1771
+ <p>Implements flickr.people.findByEmail and flickr.people.findByUsername.</p>
1772
+
1773
+
1774
+ </div>
1775
+ </div>
1776
+ <div class="tags">
1777
+
1778
+
1779
+ </div><table class="source_code">
1780
+ <tr>
1781
+ <td>
1782
+ <pre class="lines">
1783
+
1784
+
1785
+ 140
1786
+ 141
1787
+ 142
1788
+ 143</pre>
1789
+ </td>
1790
+ <td>
1791
+ <pre class="code"><span class="info file"># File 'lib/flickr.rb', line 140</span>
1792
+
1793
+ <span class='kw'>def</span> <span class='id identifier rubyid_users'>users</span><span class='lparen'>(</span><span class='id identifier rubyid_lookup'>lookup</span><span class='op'>=</span><span class='kw'>nil</span><span class='rparen'>)</span>
1794
+ <span class='id identifier rubyid_user'>user</span> <span class='op'>=</span> <span class='id identifier rubyid_people_findByEmail'>people_findByEmail</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>find_email</span><span class='tstring_end'>&#39;</span></span><span class='op'>=&gt;</span><span class='id identifier rubyid_lookup'>lookup</span><span class='rparen'>)</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>user</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span> <span class='kw'>rescue</span> <span class='id identifier rubyid_people_findByUsername'>people_findByUsername</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>username</span><span class='tstring_end'>&#39;</span></span><span class='op'>=&gt;</span><span class='id identifier rubyid_lookup'>lookup</span><span class='rparen'>)</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>user</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span>
1795
+ <span class='kw'>return</span> <span class='const'>User</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>id</span><span class='tstring_end'>&quot;</span></span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_user'>user</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>nsid</span><span class='tstring_end'>&quot;</span></span><span class='rbracket'>]</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>username</span><span class='tstring_end'>&quot;</span></span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_user'>user</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>username</span><span class='tstring_end'>&quot;</span></span><span class='rbracket'>]</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>client</span><span class='tstring_end'>&quot;</span></span> <span class='op'>=&gt;</span> <span class='kw'>self</span><span class='rparen'>)</span>
1796
+ <span class='kw'>end</span></pre>
1797
+ </td>
1798
+ </tr>
1799
+ </table>
1800
+ </div>
1801
+
1802
+ </div>
1803
+
1804
+ </div>
1805
+
1806
+ <div id="footer">
1807
+ Generated on Tue May 13 13:49:25 2014 by
1808
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
1809
+ 0.8.7.4 (ruby-2.0.0).
1810
+ </div>
1811
+
1812
+ </body>
1813
+ </html>