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,194 +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::PhotoCollection</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::PhotoCollection</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
- Array
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
- A collection of photos is returned as a <a
84
- href="PhotoCollection.html">PhotoCollection</a>, a subclass of Array. This
85
- allows us to retain the pagination info returned by <a
86
- href="../Flickr.html">Flickr</a> and make it accessible in a friendly way
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="#M000051">new</a>&nbsp;&nbsp;
99
- </div>
100
- </div>
101
-
102
- </div>
103
-
104
-
105
- <!-- if includes -->
106
-
107
- <div id="section">
108
-
109
-
110
-
111
-
112
-
113
- <div id="attribute-list">
114
- <h3 class="section-bar">Attributes</h3>
115
-
116
- <div class="name-list">
117
- <table>
118
- <tr class="top-aligned-row context-row">
119
- <td class="context-item-name">page</td>
120
- <td class="context-item-value">&nbsp;[R]&nbsp;</td>
121
- <td class="context-item-desc"></td>
122
- </tr>
123
- <tr class="top-aligned-row context-row">
124
- <td class="context-item-name">pages</td>
125
- <td class="context-item-value">&nbsp;[R]&nbsp;</td>
126
- <td class="context-item-desc"></td>
127
- </tr>
128
- <tr class="top-aligned-row context-row">
129
- <td class="context-item-name">perpage</td>
130
- <td class="context-item-value">&nbsp;[R]&nbsp;</td>
131
- <td class="context-item-desc"></td>
132
- </tr>
133
- <tr class="top-aligned-row context-row">
134
- <td class="context-item-name">total</td>
135
- <td class="context-item-value">&nbsp;[R]&nbsp;</td>
136
- <td class="context-item-desc"></td>
137
- </tr>
138
- </table>
139
- </div>
140
- </div>
141
-
142
-
143
-
144
- <!-- if method_list -->
145
- <div id="methods">
146
- <h3 class="section-bar">Public Class methods</h3>
147
-
148
- <div id="method-M000051" class="method-detail">
149
- <a name="M000051"></a>
150
-
151
- <div class="method-heading">
152
- <a href="#M000051" class="method-signature">
153
- <span class="method-name">new</span><span class="method-args">(photos_api_response={}, api_key={})</span>
154
- </a>
155
- </div>
156
-
157
- <div class="method-description">
158
- <p>
159
- builds a <a href="PhotoCollection.html">PhotoCollection</a> from given
160
- params, such as those returned from photos.search API call. Note all the
161
- info is contained in the value of the first (and only) key-value pair of
162
- the response. The key will vary depending on the original object the photos
163
- are related to (e.g &#8216;photos&#8217;, &#8216;photoset&#8217;, etc)
164
- </p>
165
- <p><a class="source-toggle" href="#"
166
- onclick="toggleCode('M000051-source');return false;">[Source]</a></p>
167
- <div class="method-source-code" id="M000051-source">
168
- <pre>
169
- <span class="ruby-comment cmt"># File lib/flickr.rb, line 225</span>
170
- 225: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">photos_api_response</span>={}, <span class="ruby-identifier">api_key</span>={})
171
- 226: <span class="ruby-identifier">photos</span> = <span class="ruby-identifier">photos_api_response</span>.<span class="ruby-identifier">values</span>.<span class="ruby-identifier">first</span>
172
- 227: [ <span class="ruby-value str">&quot;page&quot;</span>, <span class="ruby-value str">&quot;pages&quot;</span>, <span class="ruby-value str">&quot;perpage&quot;</span>, <span class="ruby-value str">&quot;total&quot;</span> ].<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">i</span><span class="ruby-operator">|</span> <span class="ruby-identifier">instance_variable_set</span>(<span class="ruby-node">&quot;@#{i}&quot;</span>, <span class="ruby-identifier">photos</span>[<span class="ruby-identifier">i</span>])}
173
- 228: <span class="ruby-identifier">collection</span> = <span class="ruby-identifier">photos</span>[<span class="ruby-value str">'photo'</span>] <span class="ruby-operator">||</span> []
174
- 229: <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>
175
- 230: <span class="ruby-identifier">collection</span>.<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">photo</span><span class="ruby-operator">|</span> <span class="ruby-keyword kw">self</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-constant">Photo</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">photo</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-value str">'id'</span>), <span class="ruby-identifier">api_key</span>, <span class="ruby-identifier">photo</span>) }
176
- 231: <span class="ruby-keyword kw">end</span>
177
- </pre>
178
- </div>
179
- </div>
180
- </div>
181
-
182
-
183
- </div>
184
-
185
-
186
- </div>
187
-
188
-
189
- <div id="validator-badges">
190
- <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
191
- </div>
192
-
193
- </body>
194
- </html>
@@ -1,266 +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::Photoset</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::Photoset</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: flickr.photosets.delete flickr.photosets.editMeta
84
- flickr.photosets.editPhotos flickr.photosets.getContext flickr.photosets.<a
85
- href="Photoset.html#M000049">getInfo</a> flickr.photosets.<a
86
- href="Photoset.html#M000050">getPhotos</a>
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="#M000049">getInfo</a>&nbsp;&nbsp;
99
- <a href="#M000050">getPhotos</a>&nbsp;&nbsp;
100
- <a href="#M000048">new</a>&nbsp;&nbsp;
101
- </div>
102
- </div>
103
-
104
- </div>
105
-
106
-
107
- <!-- if includes -->
108
-
109
- <div id="section">
110
-
111
-
112
-
113
-
114
-
115
- <div id="attribute-list">
116
- <h3 class="section-bar">Attributes</h3>
117
-
118
- <div class="name-list">
119
- <table>
120
- <tr class="top-aligned-row context-row">
121
- <td class="context-item-name">client</td>
122
- <td class="context-item-value">&nbsp;[R]&nbsp;</td>
123
- <td class="context-item-desc"></td>
124
- </tr>
125
- <tr class="top-aligned-row context-row">
126
- <td class="context-item-name">description</td>
127
- <td class="context-item-value">&nbsp;[R]&nbsp;</td>
128
- <td class="context-item-desc"></td>
129
- </tr>
130
- <tr class="top-aligned-row context-row">
131
- <td class="context-item-name">id</td>
132
- <td class="context-item-value">&nbsp;[R]&nbsp;</td>
133
- <td class="context-item-desc"></td>
134
- </tr>
135
- <tr class="top-aligned-row context-row">
136
- <td class="context-item-name">owner</td>
137
- <td class="context-item-value">&nbsp;[R]&nbsp;</td>
138
- <td class="context-item-desc"></td>
139
- </tr>
140
- <tr class="top-aligned-row context-row">
141
- <td class="context-item-name">photos</td>
142
- <td class="context-item-value">&nbsp;[R]&nbsp;</td>
143
- <td class="context-item-desc"></td>
144
- </tr>
145
- <tr class="top-aligned-row context-row">
146
- <td class="context-item-name">primary</td>
147
- <td class="context-item-value">&nbsp;[R]&nbsp;</td>
148
- <td class="context-item-desc"></td>
149
- </tr>
150
- <tr class="top-aligned-row context-row">
151
- <td class="context-item-name">title</td>
152
- <td class="context-item-value">&nbsp;[R]&nbsp;</td>
153
- <td class="context-item-desc"></td>
154
- </tr>
155
- <tr class="top-aligned-row context-row">
156
- <td class="context-item-name">url</td>
157
- <td class="context-item-value">&nbsp;[R]&nbsp;</td>
158
- <td class="context-item-desc"></td>
159
- </tr>
160
- </table>
161
- </div>
162
- </div>
163
-
164
-
165
-
166
- <!-- if method_list -->
167
- <div id="methods">
168
- <h3 class="section-bar">Public Class methods</h3>
169
-
170
- <div id="method-M000048" class="method-detail">
171
- <a name="M000048"></a>
172
-
173
- <div class="method-heading">
174
- <a href="#M000048" class="method-signature">
175
- <span class="method-name">new</span><span class="method-args">(id=nil, api_key={})</span>
176
- </a>
177
- </div>
178
-
179
- <div class="method-description">
180
- <p><a class="source-toggle" href="#"
181
- onclick="toggleCode('M000048-source');return false;">[Source]</a></p>
182
- <div class="method-source-code" id="M000048-source">
183
- <pre>
184
- <span class="ruby-comment cmt"># File lib/flickr.rb, line 709</span>
185
- 709: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">id</span>=<span class="ruby-keyword kw">nil</span>, <span class="ruby-identifier">api_key</span>={})
186
- 710: <span class="ruby-ivar">@id</span> = <span class="ruby-identifier">id</span>
187
- 711: <span class="ruby-ivar">@api_key</span> = <span class="ruby-identifier">api_key</span>
188
- 712: <span class="ruby-ivar">@client</span> = <span class="ruby-constant">Flickr</span>.<span class="ruby-identifier">new</span> <span class="ruby-ivar">@api_key</span>
189
- 713: <span class="ruby-keyword kw">end</span>
190
- </pre>
191
- </div>
192
- </div>
193
- </div>
194
-
195
- <h3 class="section-bar">Public Instance methods</h3>
196
-
197
- <div id="method-M000049" class="method-detail">
198
- <a name="M000049"></a>
199
-
200
- <div class="method-heading">
201
- <a href="#M000049" class="method-signature">
202
- <span class="method-name">getInfo</span><span class="method-args">()</span>
203
- </a>
204
- </div>
205
-
206
- <div class="method-description">
207
- <p>
208
- Implements flickr.photosets.<a href="Photoset.html#M000049">getInfo</a>
209
- private, once we can call it as needed
210
- </p>
211
- <p><a class="source-toggle" href="#"
212
- onclick="toggleCode('M000049-source');return false;">[Source]</a></p>
213
- <div class="method-source-code" id="M000049-source">
214
- <pre>
215
- <span class="ruby-comment cmt"># File lib/flickr.rb, line 717</span>
216
- 717: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">getInfo</span>
217
- 718: <span class="ruby-identifier">info</span> = <span class="ruby-ivar">@client</span>.<span class="ruby-identifier">photosets_getInfo</span>(<span class="ruby-value str">'photoset_id'</span>=<span class="ruby-operator">&gt;</span><span class="ruby-ivar">@id</span>)[<span class="ruby-value str">'photoset'</span>]
218
- 719: <span class="ruby-ivar">@owner</span> = <span class="ruby-constant">User</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">info</span>[<span class="ruby-value str">'owner'</span>], <span class="ruby-keyword kw">nil</span>, <span class="ruby-keyword kw">nil</span>, <span class="ruby-keyword kw">nil</span>, <span class="ruby-ivar">@api_key</span>)
219
- 720: <span class="ruby-ivar">@primary</span> = <span class="ruby-identifier">info</span>[<span class="ruby-value str">'primary'</span>]
220
- 721: <span class="ruby-ivar">@photos</span> = <span class="ruby-identifier">info</span>[<span class="ruby-value str">'photos'</span>]
221
- 722: <span class="ruby-ivar">@title</span> = <span class="ruby-identifier">info</span>[<span class="ruby-value str">'title'</span>]
222
- 723: <span class="ruby-ivar">@description</span> = <span class="ruby-identifier">info</span>[<span class="ruby-value str">'description'</span>]
223
- 724: <span class="ruby-ivar">@url</span> = <span class="ruby-node">&quot;http://www.flickr.com/photos/#{@owner.getInfo.username}/sets/#{@id}/&quot;</span>
224
- 725: <span class="ruby-keyword kw">self</span>
225
- 726: <span class="ruby-keyword kw">end</span>
226
- </pre>
227
- </div>
228
- </div>
229
- </div>
230
-
231
- <div id="method-M000050" class="method-detail">
232
- <a name="M000050"></a>
233
-
234
- <div class="method-heading">
235
- <a href="#M000050" class="method-signature">
236
- <span class="method-name">getPhotos</span><span class="method-args">()</span>
237
- </a>
238
- </div>
239
-
240
- <div class="method-description">
241
- <p><a class="source-toggle" href="#"
242
- onclick="toggleCode('M000050-source');return false;">[Source]</a></p>
243
- <div class="method-source-code" id="M000050-source">
244
- <pre>
245
- <span class="ruby-comment cmt"># File lib/flickr.rb, line 728</span>
246
- 728: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">getPhotos</span>
247
- 729: <span class="ruby-identifier">photosetPhotos</span> = <span class="ruby-ivar">@client</span>.<span class="ruby-identifier">photos_request</span>(<span class="ruby-value str">'photosets.getPhotos'</span>, {<span class="ruby-value str">'photoset_id'</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-ivar">@id</span>})
248
- 730: <span class="ruby-keyword kw">end</span>
249
- </pre>
250
- </div>
251
- </div>
252
- </div>
253
-
254
-
255
- </div>
256
-
257
-
258
- </div>
259
-
260
-
261
- <div id="validator-badges">
262
- <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
263
- </div>
264
-
265
- </body>
266
- </html>