flickrie 0.5.2 → 0.6.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +0 -1
- data/CHANGELOG.md +10 -0
- data/Gemfile +3 -2
- data/Rakefile +7 -2
- data/flickrie.gemspec +3 -0
- data/lib/flickrie/api_methods.rb +5 -0
- data/lib/flickrie/client.rb +17 -4
- data/lib/flickrie/location.rb +23 -50
- data/lib/flickrie/media/exif.rb +4 -0
- data/lib/flickrie/media/tag.rb +4 -0
- data/lib/flickrie/media/ticket.rb +4 -0
- data/lib/flickrie/media/visibility.rb +10 -6
- data/lib/flickrie/media.rb +7 -70
- data/lib/flickrie/media_count.rb +4 -0
- data/lib/flickrie/oauth.rb +5 -3
- data/lib/flickrie/set.rb +5 -21
- data/lib/flickrie/upload_client.rb +4 -2
- data/lib/flickrie/user.rb +4 -1
- data/lib/flickrie/version.rb +1 -1
- data/lib/flickrie/video.rb +0 -13
- data/test/error_test.rb +20 -0
- data/test/instance_test.rb +13 -14
- data/test/license_test.rb +7 -13
- data/test/location_test.rb +11 -2
- data/test/media_count_test.rb +20 -12
- data/test/media_test.rb +319 -311
- data/test/oauth_test.rb +17 -18
- data/test/photo_test.rb +78 -60
- data/test/set_test.rb +72 -63
- data/test/{test.rb → test_helper.rb} +7 -0
- data/test/user_test.rb +43 -34
- data/test/vcr_cassettes/error/code.yml +1165 -0
- data/test/vcr_cassettes/instance/calling_api_methods.yml +182 -0
- data/test/vcr_cassettes/license/get_licenses.yml +73 -0
- data/test/vcr_cassettes/location/square_brackets.yml +85 -0
- data/test/vcr_cassettes/media/delete.yml +1380 -0
- data/test/vcr_cassettes/media/from_contacts.yml +155 -0
- data/test/vcr_cassettes/media/from_set.yml +276 -0
- data/test/vcr_cassettes/media/from_user.yml +275 -0
- data/test/vcr_cassettes/media/get_context.yml +73 -0
- data/test/vcr_cassettes/media/get_info.yml +167 -0
- data/test/vcr_cassettes/media/remove_tag.yml +264 -0
- data/test/vcr_cassettes/media/replace.yml +2252 -0
- data/test/vcr_cassettes/media/search.yml +275 -0
- data/test/vcr_cassettes/media/tags.yml +346 -0
- data/test/vcr_cassettes/media_count/get.yml +135 -0
- data/test/vcr_cassettes/media_count/square_brackets.yml +69 -0
- data/test/vcr_cassettes/oauth/tokens.yml +400 -0
- data/test/vcr_cassettes/photo/asynchronous_upload.yml +1693 -0
- data/test/vcr_cassettes/photo/from_set.yml +273 -0
- data/test/vcr_cassettes/photo/from_user.yml +275 -0
- data/test/vcr_cassettes/photo/get_exif.yml +239 -0
- data/test/vcr_cassettes/photo/get_sizes.yml +147 -0
- data/test/vcr_cassettes/photo/other_api_calls.yml +506 -0
- data/test/vcr_cassettes/photo/search.yml +271 -0
- data/test/vcr_cassettes/photo/square_brackets.yml +85 -0
- data/test/vcr_cassettes/photo/upload.yml +1229 -0
- data/test/vcr_cassettes/set/from_user.yml +477 -0
- data/test/vcr_cassettes/set/get_info.yml +951 -0
- data/test/vcr_cassettes/set/square_brackets.yml +73 -0
- data/test/vcr_cassettes/user/find_by_email_or_username.yml +135 -0
- data/test/vcr_cassettes/user/get_info.yml +151 -0
- data/test/vcr_cassettes/user/square_brackets.yml +77 -0
- data/test/vcr_cassettes/video/get_exif.yml +135 -0
- data/test/vcr_cassettes/video/get_info.yml +86 -0
- data/test/vcr_cassettes/video/get_sizes.yml +151 -0
- data/test/vcr_cassettes/video/other_api_calls.yml +643 -0
- data/test/vcr_cassettes/video/square_brackets.yml +86 -0
- data/test/vcr_cassettes/video/upload.yml +308 -0
- data/test/video_test.rb +66 -53
- metadata +123 -12
@@ -0,0 +1,264 @@
|
|
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
|