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,86 +0,0 @@
1
- ---
2
- http_interactions:
3
- - request:
4
- method: get
5
- uri: http://api.flickr.com/services/rest?api_key=1e7490875accc5b9c1ca91a2f27b5604&format=json&method=flickr.photos.getInfo&nojsoncallback=1&photo_id=7093038981
6
- body:
7
- encoding: US-ASCII
8
- string: ''
9
- headers:
10
- Authorization:
11
- - OAuth oauth_consumer_key="1e7490875accc5b9c1ca91a2f27b5604", oauth_nonce="5b327e5f1f235a2ec2ded09fdee312fa",
12
- oauth_signature="Q0apy5kyL6iID4ASVeGeq7E2sRQ%3D", oauth_signature_method="HMAC-SHA1",
13
- oauth_timestamp="1336383011", oauth_token="72157629879773565-6da848f99ba7038a",
14
- oauth_version="1.0"
15
- Accept-Encoding:
16
- - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
17
- Accept:
18
- - ! '*/*'
19
- User-Agent:
20
- - Ruby
21
- response:
22
- status:
23
- code: 200
24
- message: !binary |-
25
- T0s=
26
- headers:
27
- !binary "RGF0ZQ==":
28
- - !binary |-
29
- TW9uLCAwNyBNYXkgMjAxMiAwOTozMDoxMiBHTVQ=
30
- !binary "UDNw":
31
- - !binary |-
32
- cG9saWN5cmVmPSJodHRwOi8vaW5mby55YWhvby5jb20vdzNjL3AzcC54bWwi
33
- LCBDUD0iQ0FPIERTUCBDT1IgQ1VSIEFETSBERVYgVEFJIFBTQSBQU0QgSVZB
34
- aSBJVkRpIENPTmkgVEVMbyBPVFBpIE9VUiBERUxpIFNBTWkgT1RSaSBVTlJp
35
- IFBVQmkgSU5EIFBIWSBPTkwgVU5JIFBVUiBGSU4gQ09NIE5BViBJTlQgREVN
36
- IENOVCBTVEEgUE9MIEhFQSBQUkUgTE9DIEdPViI=
37
- !binary "QWNjZXNzLUNvbnRyb2wtQWxsb3ctT3JpZ2lu":
38
- - !binary |-
39
- Kg==
40
- !binary "Q2FjaGUtQ29udHJvbA==":
41
- - !binary |-
42
- cHJpdmF0ZQ==
43
- !binary "WC1TZXJ2ZWQtQnk=":
44
- - !binary |-
45
- d3d3MTgxLmZsaWNrci5tdWQueWFob28uY29t
46
- !binary "VmFyeQ==":
47
- - !binary |-
48
- QWNjZXB0LUVuY29kaW5n
49
- !binary "Q29udGVudC1FbmNvZGluZw==":
50
- - !binary |-
51
- Z3ppcA==
52
- !binary "Q29udGVudC1MZW5ndGg=":
53
- - !binary |-
54
- ODU3
55
- !binary "Q29ubmVjdGlvbg==":
56
- - !binary |-
57
- Y2xvc2U=
58
- !binary "Q29udGVudC1UeXBl":
59
- - !binary |-
60
- YXBwbGljYXRpb24vanNvbg==
61
- body:
62
- encoding: ASCII-8BIT
63
- string: !binary |-
64
- H4sIAAAAAAAAA5VVbW/bNhD+KwY/NzapV0ufiqXYlg4b0CHJgNRDcJZoibVE
65
- CiQVzwjy33ckZVvpsqL9ZN3x+Nxzx+fOz2RolVWkfCaiJiXJaRHTeF2sGXm3
66
- IIZXmlt0F5CxbFvsMh7c+olrdKdJmjvHDnRPygy/arB8HDoFNXdwLI6TdRxF
67
- RerChNnBk9LCclJStDtRcWnQINTDwo7b42PHn3h38mllwQolwwV1kC7vM5HG
68
- s81yFrM4jd7/QRMXPSIzCb1D/Ahyrxa/g1atFJuRMuqZag7dtyM6VU0ZyQM0
69
- mm/fLa61Qhf4EiolZ+Vnyck5teAFTStsxx3LR/RbLl0D00XPLdeLLVT7XScG
70
- 4gJrbiothpDtVfiH2YmLfBJGbEUn7NG/lBnGLTaPlCx0VQsu69Ai1+NedBhH
71
- X6b3MO7OoIx940ks7LkrNaIsuqLJFSsWNC6TpEwvx40GOXagffbwLB0YOw4O
72
- PCBmcRIzlnuuA9e9MAaph8RoVqrvfWHxdA51jf0AUkahOn4wJ2heCwuXWiuQ
73
- 59uuWrTPl5lP51vxA7d8X0YDDZ8ia5SVU+w5dNup5mwMWsxQTAuaTxhTBvPV
74
- 2zHfBammxrsPUn7+O7RGDUEaLZiT4bEsND4afzF4GsYMp7GIWHx1mcqrtFh7
75
- mcJoW6XfmAENB/TeIg4aM1o2eHqoWiH5o09EXzyti+Sf8WVRvmONvJJ0uaZF
76
- Guc+QjaTm6XLIqdxkjgSVTVqqJwsmF8YPt0/9iwTBD49yYxKmCsXMHRQ8Udf
77
- LKVfkptj93Cfm+ovsXenB8X90TplLFqT0PNRfh9eTLP6V91+us9V9qVfPtx9
78
- mkOylEZRlAbFat78dwR/0VAv3kT+aNiHu+Vwe6eHn65vfmvvD3PkiNKcspxe
79
- 6Oqv+c72yQz251H+eX2T3t5tM8iMuj2+ho2TKFkncRixH21bg1rDsTNvbQ/H
80
- Cyp7Xh//v0xG3XkE/PUitcfBzb//BxncPL1WXGvtUG5Wm9XhcFji0qv2eokz
81
- s1n5C2azmkt3s7qIfLMiQZg9jjVOLC6ImiviN4X7QAq4x+tjqGAHouMT4QGp
82
- C9kEo0ZtTpucZb4xoratk0YaObPlomkd0WiNXXL5DP7ZoK325OVfJ6yoDRkH
83
- AAA=
84
- http_version:
85
- recorded_at: Mon, 07 May 2012 09:30:12 GMT
86
- recorded_with: VCR 2.1.1
@@ -1,308 +0,0 @@
1
- ---
2
- http_interactions:
3
- - request:
4
- method: post
5
- uri: http://api.flickr.com/services/upload
6
- body:
7
- encoding: ASCII-8BIT
8
- string: !binary |-
9
- LS0tLS0tLS0tLS0tLVJ1YnlNdWx0aXBhcnRQb3N0DQpDb250ZW50LURpc3Bv
10
- c2l0aW9uOiBmb3Jt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AAAAAAAAAAAAAAAAAAAA
92
- AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACwYA
93
- B4P7BYAAAECAAAAAFQYFEQOH9E7NCkvcoZQ6w9SbFx8DgAAAANMluCAhfw+E
94
- PwnCoAAgM0nvX//+CIe/HH3333z/r5/U/6++f1fffffP+vvvvvn9T9p+98/6
95
- PhANKZ9a/WppX6mNm/TPelpaebvS0tLS09dddddPxD//D1++Xvvvtb77eoQc
96
- 0p/+o2uuuunp+If/4Ir+reuviH/9B6/S8Q//oPX7eviH/+Hr8/eZZUrrrrmW
97
- 0y3pa66YSTU/EP/8EQ1/1ra2sy34h//h6/fN2p75/VPfN2rn/UtLXXXXXS11
98
- 1zctUIOpbY2+++lvrrp65iblE0TXS114AAAA5yUBFuCAgT///4IooAAgt3eO
99
- D777775/U/6++//h/w+Eoh/w+EPwRHCoAAgS0n////giGqqxxr/D//D1///+
100
- Hq///8PX775+aaf/vn5qfl18/S33z9qeuuuuuZ7Vzd6euoQMuaVv00b6bpE3
101
- rr///h6vXXT///w9Xta66eb1T11zPqnrrrpaWlrm9UwkxqcXTG111282XGpf
102
- //4er08/GUv///Yerzd6WuuZZUpa6euub1N2paeb1XTCCGrYjMfelpeIf/0H
103
- r9dLS110tPa109dddPS1110tddPTzfqhCaVjemNrrn9V4AAAAp0lAIq4ICBP
104
- ///giigACC3d40V///wRV5U8P/8EV+Pnn5Vf//wRV/5/Xh//h6/f///BFX94
105
- f/4Ir81fP+n9X3z86Xz+p/zT8iT/8/qf9HwgCtpn1r9a8PhD8ERQqAAIEtJ/
106
- ///4IhqqsY1/h//h6////D1f//+CK/qlvrpbe1jkKIp//h76uSP4qxBYLpiN
107
- iAEfUAG4MLaQRslDF7JwIHG2uHMhy/2yqyUygAH3DRY/l6fNXJ9sGnP5DExD
108
- fbiLZIyTOK3irGIcZIDpRmzGBANFuF1bgfxITFm2DcHeDhgkygI3D65M/1Fd
109
- /XQIajciPUUicC9U0kJcRmnzygpTcBjG08NOObsGkJGcEHiIH1f/3DBOM7Bx
110
- iHF8U5fD7AjrONzIMAZ8DdgGvuKW/dnPQdEgiLaS//0f1F11zfq6Wbnpv+un
111
- rphJjNOHymdTG1110tLMt6Wlrrnk1msTf/2Ehz4pbFnOHKoDb3olSDZv6Jnh
112
- mjqiXQmwgt2UAJC3X8OnhxSCJb7QCM24Z/gGhhSkwBAtxY0A9j7t9J0PGe2q
113
- wPZWUD8B0JPUxZBg2t0NhN6jNwm/sygu6VBF7hCljhLf/MQNoEX8EWPtbD/H
114
- LNsTBRsB52qkVglqcQriIHYF9rtNraFrO3LcNg/8JRFRice8lAoFI/8WxgI/
115
- mrBWHyb//giF3+pCaWlrm9U9PT10tLUIIZpfVG138Q//wRX71109ddddcdN+
116
- v/2BQRlf/YSGB/D3kbJVA7HuXoJ5pR8FVncGgvZi0ZXK72R0RX/4Sp+28NnA
117
- EZWPfjnaU9vEdrpmEmNL7///XPXN6p65lvXT0TXN6pahCpZo3lT8Q//w9f4Y
118
- B/8EVfqv//9h6vLJMy0iMu1PXS0tcy06XXN3pa666XAAAADtJQDPuCAgT///
119
- 4IooAAgt3eNGefjjT9774+EAVtM+tfrXh8IfgiKFQABAloX8d///8PDX7775
120
- /U/68tD56VP+vv///h6vf4f/4ev3333z9Onz9Inz95ltXT18Q//w9fqEKldR
121
- tfEP/8PX666eulqIRqJ///gir6r4h//h6/T111111111zepnsrrvqEKldxtd
122
- dZ8Sn+If/4ev31z9q7e+byrm9TLanrrm7UtLS118Q//w9fvt6hCaUjFXG083
123
- qunrNR82TKpZl9S09E108y5Vzeq6WlpaWnm/Ws63vqEKlqNp6UjCWsvXN3pZ
124
- v1deAAABNyUARS4ICBP///giigACC3d44+flr75+Pp/18/q++++fn0/6fvP2
125
- n7x8IAraZ9a/WvD4Q/CxQqAAIEtJ9fv//4Ihr/p/+8rD77/D//D1+fp0fpF/
126
- /+Hq/h//h6/T109TJJHLq6665v1LS09PT111CE0rH+aN9T318Q//wRX9W9f/
127
- /8EVfVPfXT1113zd6elpa5u9dLT09LS0ghNKvUhs3qnm9X28slS298/qJk9S
128
- L//+gRV7z/qWlqq6uuuub1Mvq666hDCH4YBwSHFAAECrzJw/AAgHDYt+vXbb
129
- 9qTBanyumn519a2tra2tqGPH5qf5TkzU63J1pEdfWsfCQd95ags1DNAbn/43
130
- hx4Bw9nM8IzJPciTr1a2p8PkxIhanxdtvzqTHhOIAS7t+fyf/Nfi2P+HhBcN
131
- dluADQotLS0tLS0tLS0tLS0tUnVieU11bHRpcGFydFBvc3QNCkNvbnRlbnQt
132
- RGlzcG9zaXRpb246IGZvcm0tZGF0YTsgbmFtZT0idGl0bGUiDQoNCnZpZGVv
133
- DQotLS0tLS0tLS0tLS0tUnVieU11bHRpcGFydFBvc3QtLQ0KDQo=
134
- headers:
135
- Authorization:
136
- - OAuth oauth_consumer_key="1e7490875accc5b9c1ca91a2f27b5604", oauth_nonce="2d42085f0a3dfbbe98f05fea3891df5a",
137
- oauth_signature="dPWTzwE7qTWolqGeH2uPWt4Mui8%3D", oauth_signature_method="HMAC-SHA1",
138
- oauth_timestamp="1336343120", oauth_token="72157629879773565-6da848f99ba7038a",
139
- oauth_version="1.0"
140
- Content-Type:
141
- - multipart/form-data;boundary=-----------RubyMultipartPost
142
- Content-Length:
143
- - '5618'
144
- Accept:
145
- - ! '*/*'
146
- User-Agent:
147
- - Ruby
148
- response:
149
- status:
150
- code: 200
151
- message: OK
152
- headers:
153
- Date:
154
- - Sun, 06 May 2012 22:25:20 GMT
155
- P3p:
156
- - policyref="http://info.yahoo.com/w3c/p3p.xml", CP="CAO DSP COR CUR ADM DEV
157
- TAI PSA PSD IVAi IVDi CONi TELo OTPi OUR DELi SAMi OTRi UNRi PUBi IND PHY
158
- ONL UNI PUR FIN COM NAV INT DEM CNT STA POL HEA PRE LOC GOV"
159
- Connection:
160
- - close
161
- Content-Length:
162
- - '93'
163
- Cache-Control:
164
- - private
165
- X-Served-By:
166
- - www185.flickr.mud.yahoo.com
167
- Vary:
168
- - Accept-Encoding
169
- Content-Type:
170
- - text/xml; charset=utf-8
171
- body:
172
- encoding: US-ASCII
173
- string: ! '<?xml version="1.0" encoding="utf-8" ?>
174
-
175
- <rsp stat="ok">
176
-
177
- <photoid>7004104010</photoid>
178
-
179
- </rsp>
180
-
181
- '
182
- http_version:
183
- recorded_at: Sun, 06 May 2012 22:25:21 GMT
184
- - request:
185
- method: get
186
- uri: http://api.flickr.com/services/rest?api_key=1e7490875accc5b9c1ca91a2f27b5604&format=json&method=flickr.photos.getInfo&nojsoncallback=1&photo_id=7004104010
187
- body:
188
- encoding: US-ASCII
189
- string: ''
190
- headers:
191
- Authorization:
192
- - OAuth oauth_consumer_key="1e7490875accc5b9c1ca91a2f27b5604", oauth_nonce="0ddeb927b3af8f47b576420a6ac594c8",
193
- oauth_signature="J8oBm7qDa429NVY9K%2FN1q78uXLo%3D", oauth_signature_method="HMAC-SHA1",
194
- oauth_timestamp="1336343121", oauth_token="72157629879773565-6da848f99ba7038a",
195
- oauth_version="1.0"
196
- Accept-Encoding:
197
- - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
198
- Accept:
199
- - ! '*/*'
200
- User-Agent:
201
- - Ruby
202
- response:
203
- status:
204
- code: 200
205
- message: !binary |-
206
- T0s=
207
- headers:
208
- !binary "RGF0ZQ==":
209
- - !binary |-
210
- U3VuLCAwNiBNYXkgMjAxMiAyMjoyNToyMyBHTVQ=
211
- !binary "UDNw":
212
- - !binary |-
213
- cG9saWN5cmVmPSJodHRwOi8vaW5mby55YWhvby5jb20vdzNjL3AzcC54bWwi
214
- LCBDUD0iQ0FPIERTUCBDT1IgQ1VSIEFETSBERVYgVEFJIFBTQSBQU0QgSVZB
215
- aSBJVkRpIENPTmkgVEVMbyBPVFBpIE9VUiBERUxpIFNBTWkgT1RSaSBVTlJp
216
- IFBVQmkgSU5EIFBIWSBPTkwgVU5JIFBVUiBGSU4gQ09NIE5BViBJTlQgREVN
217
- IENOVCBTVEEgUE9MIEhFQSBQUkUgTE9DIEdPViI=
218
- !binary "QWNjZXNzLUNvbnRyb2wtQWxsb3ctT3JpZ2lu":
219
- - !binary |-
220
- Kg==
221
- !binary "Q2FjaGUtQ29udHJvbA==":
222
- - !binary |-
223
- cHJpdmF0ZQ==
224
- !binary "WC1TZXJ2ZWQtQnk=":
225
- - !binary |-
226
- d3d3MTA0LmZsaWNrci5tdWQueWFob28uY29t
227
- !binary "VmFyeQ==":
228
- - !binary |-
229
- QWNjZXB0LUVuY29kaW5n
230
- !binary "Q29udGVudC1FbmNvZGluZw==":
231
- - !binary |-
232
- Z3ppcA==
233
- !binary "Q29udGVudC1MZW5ndGg=":
234
- - !binary |-
235
- NTY1
236
- !binary "Q29ubmVjdGlvbg==":
237
- - !binary |-
238
- Y2xvc2U=
239
- !binary "Q29udGVudC1UeXBl":
240
- - !binary |-
241
- YXBwbGljYXRpb24vanNvbg==
242
- body:
243
- encoding: ASCII-8BIT
244
- string: !binary |-
245
- H4sIAAAAAAAAA5VT24rbMBD9laDn3Y18SUL8VOhbof2A1mWZWBNbRJaMJMeE
246
- 4H/vSL4kW8pCQ8Ca0cw5M0czd9Y1xhtW3JkUrGAHzvOE5zzh7GXDHFYWPbn5
247
- 8ksmt72iJffxeAz2GWzLioROAjz2nTIgMKAlWbbP8ixJI5p0Z7gaKz2ygpOt
248
- ZIXaYYCPqHBGf3tXeEW1+Kzx4KXRU4IZdKC9M+1isftDkiXZLv3yg+chuqfC
249
- NLQB8Rvoi9l8B2saLcue+jlEPAT1eYQy1czIfkJt8fSy+WoNuSC2UBm9dr/L
250
- 9/ninCTYj2R66RWGKt/J71EH/a5SoGHhVqCrrOwmig8x8foqnTxJJf0tPonr
251
- +hPJFKScFbQStVjkCYq2Ut2iPc76u5DZGef/8QQeLhhaS3mSvvLdK99vkl2R
252
- 0v9xXVvQvQIba5h4FDjfdwH8I2Kg7NC20jnqZyImszJtG3vK5nsQokUPrEin
253
- HnFwCzQK6eHRcQV6zQ4DRfaanES6KMh/ZPExTgbUOEcKGqMwoWvoSZl6NTor
254
- n1BcAxZnjJnB/fVskwrazMKHAyt+/Z6kMd00Cg24xYhYHuoYTd8luLcquuhL
255
- Lrq6dUHtuJ5dqJ5inmgb77ui3JbbYRjeziTJxb5RheU2Jrhy+7wc5fax1+WW
256
- jZGwJRFhnc34LuFAJdCWiNu0cmeQKswRj+1oIfUslejtsifxHQcpfMMKmhxF
257
- VoOybvxkjoHM0R5TqLmw8Q8IPlEwcwQAAA==
258
- http_version:
259
- recorded_at: Sun, 06 May 2012 22:25:23 GMT
260
- - request:
261
- method: post
262
- uri: http://api.flickr.com/services/rest?api_key=1e7490875accc5b9c1ca91a2f27b5604&format=json&method=flickr.photos.delete&nojsoncallback=1&photo_id=7004104010
263
- body:
264
- encoding: US-ASCII
265
- string: ''
266
- headers:
267
- Authorization:
268
- - OAuth oauth_consumer_key="1e7490875accc5b9c1ca91a2f27b5604", oauth_nonce="b461eef0620f6755d9159efadc92ef94",
269
- oauth_signature="0yPXxLK7O7imIzChm5nw8Ti%2Fv14%3D", oauth_signature_method="HMAC-SHA1",
270
- oauth_timestamp="1336343123", oauth_token="72157629879773565-6da848f99ba7038a",
271
- oauth_version="1.0"
272
- Content-Length:
273
- - '0'
274
- Accept:
275
- - ! '*/*'
276
- User-Agent:
277
- - Ruby
278
- response:
279
- status:
280
- code: 200
281
- message: OK
282
- headers:
283
- Date:
284
- - Sun, 06 May 2012 22:25:23 GMT
285
- P3p:
286
- - policyref="http://info.yahoo.com/w3c/p3p.xml", CP="CAO DSP COR CUR ADM DEV
287
- TAI PSA PSD IVAi IVDi CONi TELo OTPi OUR DELi SAMi OTRi UNRi PUBi IND PHY
288
- ONL UNI PUR FIN COM NAV INT DEM CNT STA POL HEA PRE LOC GOV"
289
- Access-Control-Allow-Origin:
290
- - ! '*'
291
- Cache-Control:
292
- - private
293
- X-Served-By:
294
- - www218.flickr.mud.yahoo.com
295
- Vary:
296
- - Accept-Encoding
297
- Content-Length:
298
- - '13'
299
- Connection:
300
- - close
301
- Content-Type:
302
- - application/json
303
- body:
304
- encoding: US-ASCII
305
- string: ! '{"stat":"ok"}'
306
- http_version:
307
- recorded_at: Sun, 06 May 2012 22:25:23 GMT
308
- recorded_with: VCR 2.1.1
data/test/video_test.rb DELETED
@@ -1,118 +0,0 @@
1
- # encoding: utf-8
2
-
3
- Flickrie::Video.instance_eval do
4
- def public_new(*args)
5
- new(*args)
6
- end
7
- end
8
-
9
- class VideoTest < Test::Unit::TestCase
10
- def setup
11
- @video_id = 7093038981
12
- @set_id = 72157629851991663
13
- @user_nsid = '67131352@N04'
14
-
15
- # license,date_upload,date_taken,owner_name,icon_server,original_format,last_update,geo,tags,machine_tags,o_dims,views,media,path_alias,url_sq,url_q,url_t,url_s,url_n,url_m,url_z,url_c,url_l,url_o
16
- @all_extras = %w[license date_upload date_taken owner_name
17
- icon_server original_format last_update geo tags machine_tags
18
- o_dims views media path_alias
19
- url_sq url_q url_t url_s url_n url_m url_z url_c url_l url_o]
20
- end
21
-
22
- def test_square_brackets
23
- VCR.use_cassette 'video/square_brackets' do
24
- video = Flickrie.get_video_info(@video_id)
25
- assert_equal 1, video['usage']['candownload'].to_i
26
- end
27
- end
28
-
29
- def test_get_info
30
- VCR.use_cassette 'video/get_info' do
31
- video = Flickrie.get_video_info(@video_id)
32
-
33
- assert_equal true, video.ready?
34
- assert_equal false, video.failed?
35
- assert_equal false, video.pending?
36
-
37
- assert_equal 16, video.duration
38
- assert_equal 352, video.width
39
- assert_equal 288, video.height
40
-
41
- assert_nil video.source_url
42
- assert_nil video.download_url
43
- assert_nil video.mobile_download_url
44
- end
45
- end
46
-
47
- def test_get_sizes
48
- VCR.use_cassette 'video/get_sizes' do
49
- [Flickrie.get_video_sizes(@video_id),
50
- Flickrie::Video.public_new('id' => @video_id.to_s).get_sizes].
51
- each do |video|
52
- assert_equal true, video.can_download?
53
- assert_equal true, video.can_blog?
54
- assert_equal true, video.can_print?
55
-
56
- refute video.source_url.empty?
57
- refute video.download_url.empty?
58
- refute video.mobile_download_url.empty?
59
- end
60
- end
61
- end
62
-
63
- def test_methods_returning_nil
64
- video = Flickrie::Video.new
65
-
66
- assert_nil video.ready?
67
- assert_nil video.failed?
68
- assert_nil video.pending?
69
- assert_nil video.duration
70
- assert_nil video.width
71
- assert_nil video.height
72
- assert_nil video.source_url
73
- assert_nil video.download_url
74
- assert_nil video.mobile_download_url
75
- end
76
-
77
- def test_upload
78
- VCR.use_cassette 'video/upload' do
79
- video_path = File.join(File.expand_path(File.dirname(__FILE__)), 'video.mov')
80
- video_id = Flickrie.upload(video_path)
81
- assert_nothing_raised(Flickrie::Error) { Flickrie.get_video_info(video_id) }
82
- Flickrie.delete_video(video_id)
83
- end
84
- end
85
-
86
- def test_get_exif
87
- VCR.use_cassette 'video/get_exif' do
88
- [Flickrie.get_video_exif(@video_id),
89
- Flickrie::Video.public_new('id' => @video_id).get_exif].
90
- each do |video|
91
- assert_nil video.camera
92
- assert_nil video.exif
93
- end
94
- end
95
- end
96
-
97
-
98
- def test_other_api_calls
99
- VCR.use_cassette 'video/other_api_calls' do
100
- # add_video_tags, remove_video_tag,
101
- # search_videos, videos_from_contacts,
102
- # public_videos_from_user, videos_from_set
103
-
104
- assert_nothing_raised do
105
- Flickrie.add_video_tags(@video_id, "janko")
106
- video = Flickrie.get_video_info(@video_id)
107
- tag = video.tags.find { |tag| tag.content == "janko" }
108
- Flickrie.remove_video_tag(tag.id)
109
- Flickrie.videos_from_contacts(:include_self => 1)
110
- Flickrie.public_videos_from_user_contacts(@user_nsid, :include_self => 1)
111
- Flickrie.public_videos_from_user(@user_nsid)
112
- Flickrie.videos_from_set(@set_id)
113
- Flickrie.get_video_context(@video_id)
114
- Flickrie.search_videos(:user_id => @user_nsid)
115
- end
116
- end
117
- end
118
- end