flickrie 0.6.1 → 0.7.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (90) hide show
  1. data/.gitignore +1 -0
  2. data/CHANGELOG.md +22 -0
  3. data/Gemfile +0 -6
  4. data/README.md +15 -1
  5. data/Rakefile +8 -13
  6. data/api_methods.md +1 -1
  7. data/flickrie.gemspec +2 -3
  8. data/lib/flickrie/api_methods.rb +17 -0
  9. data/lib/flickrie/client.rb +21 -5
  10. data/lib/flickrie/instance.rb +7 -2
  11. data/lib/flickrie/license.rb +2 -0
  12. data/lib/flickrie/location.rb +10 -8
  13. data/lib/flickrie/media/exif.rb +3 -1
  14. data/lib/flickrie/media/tag.rb +3 -3
  15. data/lib/flickrie/media/visibility.rb +6 -4
  16. data/lib/flickrie/media.rb +69 -84
  17. data/lib/flickrie/media_count.rb +3 -5
  18. data/lib/flickrie/photo.rb +55 -54
  19. data/lib/flickrie/set.rb +31 -25
  20. data/lib/flickrie/ticket.rb +4 -8
  21. data/lib/flickrie/upload_client.rb +7 -2
  22. data/lib/flickrie/user.rb +33 -34
  23. data/lib/flickrie/version.rb +1 -1
  24. data/lib/flickrie/video.rb +13 -12
  25. data/spec/api_methods_spec.rb +43 -0
  26. data/spec/error_spec.rb +32 -0
  27. data/{test → spec/files}/photo.jpg +0 -0
  28. data/{test → spec/files}/video.mov +0 -0
  29. data/spec/instance_spec.rb +22 -0
  30. data/spec/license_spec.rb +15 -0
  31. data/spec/location_spec.rb +11 -0
  32. data/spec/media_count_spec.rb +18 -0
  33. data/spec/media_spec.rb +271 -0
  34. data/spec/oauth_spec.rb +22 -0
  35. data/spec/photo_spec.rb +137 -0
  36. data/spec/set_spec.rb +68 -0
  37. data/spec/spec_helper.rb +68 -0
  38. data/spec/user_spec.rb +56 -0
  39. data/spec/video_spec.rb +54 -0
  40. metadata +47 -132
  41. data/test/error_test.rb +0 -20
  42. data/test/instance_test.rb +0 -20
  43. data/test/license_test.rb +0 -19
  44. data/test/location_test.rb +0 -29
  45. data/test/media_count_test.rb +0 -25
  46. data/test/media_test.rb +0 -432
  47. data/test/oauth_test.rb +0 -25
  48. data/test/photo_test.rb +0 -212
  49. data/test/set_test.rb +0 -92
  50. data/test/test_helper.rb +0 -14
  51. data/test/user_test.rb +0 -70
  52. data/test/vcr_cassettes/error/code.yml +0 -1165
  53. data/test/vcr_cassettes/instance/calling_api_methods.yml +0 -182
  54. data/test/vcr_cassettes/license/get_licenses.yml +0 -73
  55. data/test/vcr_cassettes/location/square_brackets.yml +0 -85
  56. data/test/vcr_cassettes/media/delete.yml +0 -1380
  57. data/test/vcr_cassettes/media/from_contacts.yml +0 -155
  58. data/test/vcr_cassettes/media/from_set.yml +0 -276
  59. data/test/vcr_cassettes/media/from_user.yml +0 -275
  60. data/test/vcr_cassettes/media/get_context.yml +0 -73
  61. data/test/vcr_cassettes/media/get_info.yml +0 -167
  62. data/test/vcr_cassettes/media/remove_tag.yml +0 -264
  63. data/test/vcr_cassettes/media/replace.yml +0 -2252
  64. data/test/vcr_cassettes/media/search.yml +0 -275
  65. data/test/vcr_cassettes/media/tags.yml +0 -346
  66. data/test/vcr_cassettes/media_count/get.yml +0 -135
  67. data/test/vcr_cassettes/media_count/square_brackets.yml +0 -69
  68. data/test/vcr_cassettes/oauth/tokens.yml +0 -400
  69. data/test/vcr_cassettes/photo/asynchronous_upload.yml +0 -1693
  70. data/test/vcr_cassettes/photo/from_set.yml +0 -273
  71. data/test/vcr_cassettes/photo/from_user.yml +0 -275
  72. data/test/vcr_cassettes/photo/get_exif.yml +0 -239
  73. data/test/vcr_cassettes/photo/get_sizes.yml +0 -147
  74. data/test/vcr_cassettes/photo/other_api_calls.yml +0 -506
  75. data/test/vcr_cassettes/photo/search.yml +0 -271
  76. data/test/vcr_cassettes/photo/square_brackets.yml +0 -85
  77. data/test/vcr_cassettes/photo/upload.yml +0 -1229
  78. data/test/vcr_cassettes/set/from_user.yml +0 -477
  79. data/test/vcr_cassettes/set/get_info.yml +0 -951
  80. data/test/vcr_cassettes/set/square_brackets.yml +0 -73
  81. data/test/vcr_cassettes/user/find_by_email_or_username.yml +0 -135
  82. data/test/vcr_cassettes/user/get_info.yml +0 -151
  83. data/test/vcr_cassettes/user/square_brackets.yml +0 -77
  84. data/test/vcr_cassettes/video/get_exif.yml +0 -135
  85. data/test/vcr_cassettes/video/get_info.yml +0 -86
  86. data/test/vcr_cassettes/video/get_sizes.yml +0 -151
  87. data/test/vcr_cassettes/video/other_api_calls.yml +0 -643
  88. data/test/vcr_cassettes/video/square_brackets.yml +0 -86
  89. data/test/vcr_cassettes/video/upload.yml +0 -308
  90. data/test/video_test.rb +0 -118
@@ -1,264 +0,0 @@
1
- ---
2
- http_interactions:
3
- - request:
4
- method: post
5
- uri: http://api.flickr.com/services/rest?api_key=1e7490875accc5b9c1ca91a2f27b5604&format=json&method=flickr.photos.addTags&nojsoncallback=1&photo_id=6946979188&tags=janko
6
- body:
7
- encoding: US-ASCII
8
- string: ''
9
- headers:
10
- Authorization:
11
- - OAuth oauth_consumer_key="1e7490875accc5b9c1ca91a2f27b5604", oauth_nonce="dc6cc4d67f98b3a395ecfb785c84a87f",
12
- oauth_signature="LGd2KxoqCJZfrVHsyEP4K%2F%2BOndU%3D", oauth_signature_method="HMAC-SHA1",
13
- oauth_timestamp="1336343060", oauth_token="72157629879773565-6da848f99ba7038a",
14
- oauth_version="1.0"
15
- Content-Length:
16
- - '0'
17
- Accept:
18
- - ! '*/*'
19
- User-Agent:
20
- - Ruby
21
- response:
22
- status:
23
- code: 200
24
- message: OK
25
- headers:
26
- Date:
27
- - Sun, 06 May 2012 22:24:21 GMT
28
- P3p:
29
- - policyref="http://info.yahoo.com/w3c/p3p.xml", CP="CAO DSP COR CUR ADM DEV
30
- TAI PSA PSD IVAi IVDi CONi TELo OTPi OUR DELi SAMi OTRi UNRi PUBi IND PHY
31
- ONL UNI PUR FIN COM NAV INT DEM CNT STA POL HEA PRE LOC GOV"
32
- Access-Control-Allow-Origin:
33
- - ! '*'
34
- Cache-Control:
35
- - private
36
- X-Served-By:
37
- - www136.flickr.mud.yahoo.com
38
- Vary:
39
- - Accept-Encoding
40
- Content-Length:
41
- - '13'
42
- Connection:
43
- - close
44
- Content-Type:
45
- - application/json
46
- body:
47
- encoding: US-ASCII
48
- string: ! '{"stat":"ok"}'
49
- http_version:
50
- recorded_at: Sun, 06 May 2012 22:24:21 GMT
51
- - request:
52
- method: get
53
- uri: http://api.flickr.com/services/rest?api_key=1e7490875accc5b9c1ca91a2f27b5604&format=json&method=flickr.photos.getInfo&nojsoncallback=1&photo_id=6946979188
54
- body:
55
- encoding: US-ASCII
56
- string: ''
57
- headers:
58
- Authorization:
59
- - OAuth oauth_consumer_key="1e7490875accc5b9c1ca91a2f27b5604", oauth_nonce="b813f5b019c8375069a481761626dc43",
60
- oauth_signature="%2BZYQ51PgoGj5okjkvwwlPzIP%2FtA%3D", oauth_signature_method="HMAC-SHA1",
61
- oauth_timestamp="1336343061", oauth_token="72157629879773565-6da848f99ba7038a",
62
- oauth_version="1.0"
63
- Accept-Encoding:
64
- - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
65
- Accept:
66
- - ! '*/*'
67
- User-Agent:
68
- - Ruby
69
- response:
70
- status:
71
- code: 200
72
- message: !binary |-
73
- T0s=
74
- headers:
75
- !binary "RGF0ZQ==":
76
- - !binary |-
77
- U3VuLCAwNiBNYXkgMjAxMiAyMjoyNDoyMSBHTVQ=
78
- !binary "UDNw":
79
- - !binary |-
80
- cG9saWN5cmVmPSJodHRwOi8vaW5mby55YWhvby5jb20vdzNjL3AzcC54bWwi
81
- LCBDUD0iQ0FPIERTUCBDT1IgQ1VSIEFETSBERVYgVEFJIFBTQSBQU0QgSVZB
82
- aSBJVkRpIENPTmkgVEVMbyBPVFBpIE9VUiBERUxpIFNBTWkgT1RSaSBVTlJp
83
- IFBVQmkgSU5EIFBIWSBPTkwgVU5JIFBVUiBGSU4gQ09NIE5BViBJTlQgREVN
84
- IENOVCBTVEEgUE9MIEhFQSBQUkUgTE9DIEdPViI=
85
- !binary "QWNjZXNzLUNvbnRyb2wtQWxsb3ctT3JpZ2lu":
86
- - !binary |-
87
- Kg==
88
- !binary "Q2FjaGUtQ29udHJvbA==":
89
- - !binary |-
90
- cHJpdmF0ZQ==
91
- !binary "WC1TZXJ2ZWQtQnk=":
92
- - !binary |-
93
- d3d3MTI5LmZsaWNrci5tdWQueWFob28uY29t
94
- !binary "VmFyeQ==":
95
- - !binary |-
96
- QWNjZXB0LUVuY29kaW5n
97
- !binary "Q29udGVudC1FbmNvZGluZw==":
98
- - !binary |-
99
- Z3ppcA==
100
- !binary "Q29udGVudC1MZW5ndGg=":
101
- - !binary |-
102
- ODY2
103
- !binary "Q29ubmVjdGlvbg==":
104
- - !binary |-
105
- Y2xvc2U=
106
- !binary "Q29udGVudC1UeXBl":
107
- - !binary |-
108
- YXBwbGljYXRpb24vanNvbg==
109
- body:
110
- encoding: ASCII-8BIT
111
- string: !binary |-
112
- H4sIAAAAAAAAA5VV227jNhD9FYPPG5ukKOryVGyKbrPFFtgiSYHUC4OWGIux
113
- RAokFa8R5N/Liyw73tToPokzHJ6ZOXPRC+gbZRUoX4CoQQloQWiRFSjPwYcZ
114
- MLzS3Do1TtdrQvIUr6NaP3Pt1BkkhVc8Mt2BMnenmlk+9K1iNfdwKElInuCM
115
- pN5MmEf2rLSwHJTQya2ouDROADDAskdu96uWP/P2oNPKMiuUBGXhX6id9I5f
116
- gDQx3AwlKEnxL39C4s0HF5pknYf8zORWzb4wrRoplgNEMAuAnLWXLVpVjS7B
117
- A9tovv4wu9bKqVjIoVJyyj8llByUkQP66kQrbMt9lCunt1x6Bm++fFrBrKDA
118
- G9TcVFr00csbs1tubDB5FkasRSvsPtTG9MPa0QVKFHnUgss6suhZ7UTr7ODr
119
- WAHj3/TK2HeKYNmW+9wwROgKJlcYzlBWQljC4/VGMzm0TAfvsRAtM3boPXhE
120
- pAlJIEUh1p7rThjjsomOnViprgsZJeM9q+uOWwZKHLPjO+OD8NC8FpYdc62Y
121
- nF77bJ08PUbBXaDiJ14FXgbDNny0rF0f+R6dTNet2kxCr8UJimmY5iPG6MGc
122
- FS2yINVIvD+A8p9xojKM0oziguRZTnBBw2CxwTZKv9PA8eJyg353Vwmi/jiV
123
- Z+e7Mcxi409B90NbfYvFUn3szoaZgxCys2wT4nffY/g0g0WBUXJ13AxXeUEp
124
- vpiGZj6gdtiys0AOqo5VjZB8FXx57xfc4dS17mXaor8nz9eZw0l35jFwcRz1
125
- F9fgbmyH2pFB0nkOM5zmwUJuRjVK5wXN0qLwgVTVoFnl6UcIhM5wDr/baVoc
126
- 8KEzT4KJ+8Qb9C2r+CqkDOETudm3D/eZqf4W21BNxcNVniKEcxBbb5D/D8+N
127
- Zf27br7eZ4o+dfOHu6+nkCiFGDtGA6jmmx9X0CfN6tm7yJ8N+vVu3t/e6f7j
128
- 9c0fzf3uFBlDmEGUwWO4+jzekz16AvvbIP+6vklv79aUUaNu929hE4JJTpK4
129
- aX6Wto1rcLd9zHtL1MfFKjtt0f/eqYNuA4L7hsmw+97PZ/h19n6tvO25xtq+
130
- XC6Wi91uN390Hrd67lbHchEemOXitH2dNLX6cjEOaee2Gzt4CIkY9x90CrUF
131
- r/8CDeBgsbQHAAA=
132
- http_version:
133
- recorded_at: Sun, 06 May 2012 22:24:22 GMT
134
- - request:
135
- method: post
136
- uri: http://api.flickr.com/services/rest?api_key=1e7490875accc5b9c1ca91a2f27b5604&format=json&method=flickr.photos.removeTag&nojsoncallback=1&tag_id=67099213-6946979188-257458
137
- body:
138
- encoding: US-ASCII
139
- string: ''
140
- headers:
141
- Authorization:
142
- - OAuth oauth_consumer_key="1e7490875accc5b9c1ca91a2f27b5604", oauth_nonce="bc7b56c57b6e383c87eed4ba4026b89f",
143
- oauth_signature="Rc4c3u8lHGTR%2BOFdVMs0UUbWt8c%3D", oauth_signature_method="HMAC-SHA1",
144
- oauth_timestamp="1336343062", oauth_token="72157629879773565-6da848f99ba7038a",
145
- oauth_version="1.0"
146
- Content-Length:
147
- - '0'
148
- Accept:
149
- - ! '*/*'
150
- User-Agent:
151
- - Ruby
152
- response:
153
- status:
154
- code: 200
155
- message: OK
156
- headers:
157
- Date:
158
- - Sun, 06 May 2012 22:24:22 GMT
159
- P3p:
160
- - policyref="http://info.yahoo.com/w3c/p3p.xml", CP="CAO DSP COR CUR ADM DEV
161
- TAI PSA PSD IVAi IVDi CONi TELo OTPi OUR DELi SAMi OTRi UNRi PUBi IND PHY
162
- ONL UNI PUR FIN COM NAV INT DEM CNT STA POL HEA PRE LOC GOV"
163
- Access-Control-Allow-Origin:
164
- - ! '*'
165
- Cache-Control:
166
- - private
167
- X-Served-By:
168
- - www88.flickr.mud.yahoo.com
169
- Vary:
170
- - Accept-Encoding
171
- Content-Length:
172
- - '13'
173
- Connection:
174
- - close
175
- Content-Type:
176
- - application/json
177
- body:
178
- encoding: US-ASCII
179
- string: ! '{"stat":"ok"}'
180
- http_version:
181
- recorded_at: Sun, 06 May 2012 22:24:22 GMT
182
- - request:
183
- method: get
184
- uri: http://api.flickr.com/services/rest?api_key=1e7490875accc5b9c1ca91a2f27b5604&format=json&method=flickr.photos.getInfo&nojsoncallback=1&photo_id=6946979188
185
- body:
186
- encoding: US-ASCII
187
- string: ''
188
- headers:
189
- Authorization:
190
- - OAuth oauth_consumer_key="1e7490875accc5b9c1ca91a2f27b5604", oauth_nonce="4e03afde7f6f292bc18eaf028bb6a1ff",
191
- oauth_signature="VARx%2FoG7qkSUKFLBxBNYrOWNLw8%3D", oauth_signature_method="HMAC-SHA1",
192
- oauth_timestamp="1336343062", oauth_token="72157629879773565-6da848f99ba7038a",
193
- oauth_version="1.0"
194
- Accept-Encoding:
195
- - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
196
- Accept:
197
- - ! '*/*'
198
- User-Agent:
199
- - Ruby
200
- response:
201
- status:
202
- code: 200
203
- message: !binary |-
204
- T0s=
205
- headers:
206
- !binary "RGF0ZQ==":
207
- - !binary |-
208
- U3VuLCAwNiBNYXkgMjAxMiAyMjoyNDoyMyBHTVQ=
209
- !binary "UDNw":
210
- - !binary |-
211
- cG9saWN5cmVmPSJodHRwOi8vaW5mby55YWhvby5jb20vdzNjL3AzcC54bWwi
212
- LCBDUD0iQ0FPIERTUCBDT1IgQ1VSIEFETSBERVYgVEFJIFBTQSBQU0QgSVZB
213
- aSBJVkRpIENPTmkgVEVMbyBPVFBpIE9VUiBERUxpIFNBTWkgT1RSaSBVTlJp
214
- IFBVQmkgSU5EIFBIWSBPTkwgVU5JIFBVUiBGSU4gQ09NIE5BViBJTlQgREVN
215
- IENOVCBTVEEgUE9MIEhFQSBQUkUgTE9DIEdPViI=
216
- !binary "QWNjZXNzLUNvbnRyb2wtQWxsb3ctT3JpZ2lu":
217
- - !binary |-
218
- Kg==
219
- !binary "Q2FjaGUtQ29udHJvbA==":
220
- - !binary |-
221
- cHJpdmF0ZQ==
222
- !binary "WC1TZXJ2ZWQtQnk=":
223
- - !binary |-
224
- d3d3MTMxLmZsaWNrci5tdWQueWFob28uY29t
225
- !binary "VmFyeQ==":
226
- - !binary |-
227
- QWNjZXB0LUVuY29kaW5n
228
- !binary "Q29udGVudC1FbmNvZGluZw==":
229
- - !binary |-
230
- Z3ppcA==
231
- !binary "Q29udGVudC1MZW5ndGg=":
232
- - !binary |-
233
- ODQz
234
- !binary "Q29ubmVjdGlvbg==":
235
- - !binary |-
236
- Y2xvc2U=
237
- !binary "Q29udGVudC1UeXBl":
238
- - !binary |-
239
- YXBwbGljYXRpb24vanNvbg==
240
- body:
241
- encoding: ASCII-8BIT
242
- string: !binary |-
243
- H4sIAAAAAAAAA5VVXW/TPBT+K5WvWWs7TpzkCjEEDAQSaNsrjaLKTbzGNLEj
244
- 21mppv331x9p2o0xwVV8jo+f8/Wck3vQN8oqUN4DUYMSZAXJClqgPAevZsDw
245
- SnPr1DhdrwnJU7yOan3HtVNTSAqvuGW6A2XuTjWzfOhbxWru4VCSkDzBlKTe
246
- TJhbdqe0sByU0MmtqLg0TgAwwLJbbverlt/x9qDTyjIrlARl4V+onfSO74E0
247
- MVyKEpSk+PUXSLz54EKTrPOQH5ncqtlnplUjxXKACNIAyFn7skWrqtEluGEb
248
- zdevZudaORULOVRKTvmnJCMHZaxB9uBEK2zLfZQrp7dc+gpefH6/grTIgDeo
249
- uam06KOXR2aX3NhgcieMWItW2H3ojemHtSsXKFGsoxZc1rGKvqqdaJ0dfBg7
250
- YPybXhn7TBMs23KfG4YIncHkDMMZoiWEJTxebzSTQ8t08B4b0TJjh96DR8Qs
251
- IQnMcIi157oTxrhsomMnVqrrQkbJeM/quuOWgRLH7PjO+CA8NK+FZcdcKyan
252
- 1z5bJ0+PUXAXSvEPr0JdBsM2fLSsHY88RyfTdas2k9BrcYJiGqb5iDF6ME+a
253
- hkIVpBoL7w+g/D5OFMUopRkuSE5zgossDBYbbKP0MwSOFy8T9Je7SlDmj1N7
254
- dp6NYRYbfwq632j1IzZL9ZGdDTMHIWRn2SbE777H8DMKiwKj5Oy4Gc7yIsvw
255
- i2lo5gNqhy17EshB1bGqEZKvgi8YIzsO3r2jmxuioXahkXSeQ4rTPFjIzahG
256
- 6bzIaFoUPoyqGjSrfDEQAqFPzt8vO3HXAR94chJLnG5v0Les4quQL4Q/ycW+
257
- vbmmpvpPbENtFQ9XeYoQzkEkwiD/Ds8NSf1BN1+vqcp+dvObq6+nkCiFGOOU
258
- BlDNN78vhPea1bNnkT8a9PZq3l9e6f7N+cWn5np3iowhpBBReAxXP433ZKud
259
- wL4b5Lfzi/Tyap2xzKjL/WPYhGCSkyTO/b+WbePo5naBeW6l+bhYZaed9ucN
260
- N+g2ILhv4Knd935awo+s90P+mHKNtX25XCwXu91ufus8bvXcDfJyER6Y5eKU
261
- vE6aeL5cjCPTuV3DDh5CIsb9lZxCbcHD/5/PSa5CBwAA
262
- http_version:
263
- recorded_at: Sun, 06 May 2012 22:24:23 GMT
264
- recorded_with: VCR 2.1.1