flickrie 0.5.2 → 0.6.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (71) hide show
  1. data/.gitignore +0 -1
  2. data/CHANGELOG.md +10 -0
  3. data/Gemfile +3 -2
  4. data/Rakefile +7 -2
  5. data/flickrie.gemspec +3 -0
  6. data/lib/flickrie/api_methods.rb +5 -0
  7. data/lib/flickrie/client.rb +17 -4
  8. data/lib/flickrie/location.rb +23 -50
  9. data/lib/flickrie/media/exif.rb +4 -0
  10. data/lib/flickrie/media/tag.rb +4 -0
  11. data/lib/flickrie/media/ticket.rb +4 -0
  12. data/lib/flickrie/media/visibility.rb +10 -6
  13. data/lib/flickrie/media.rb +7 -70
  14. data/lib/flickrie/media_count.rb +4 -0
  15. data/lib/flickrie/oauth.rb +5 -3
  16. data/lib/flickrie/set.rb +5 -21
  17. data/lib/flickrie/upload_client.rb +4 -2
  18. data/lib/flickrie/user.rb +4 -1
  19. data/lib/flickrie/version.rb +1 -1
  20. data/lib/flickrie/video.rb +0 -13
  21. data/test/error_test.rb +20 -0
  22. data/test/instance_test.rb +13 -14
  23. data/test/license_test.rb +7 -13
  24. data/test/location_test.rb +11 -2
  25. data/test/media_count_test.rb +20 -12
  26. data/test/media_test.rb +319 -311
  27. data/test/oauth_test.rb +17 -18
  28. data/test/photo_test.rb +78 -60
  29. data/test/set_test.rb +72 -63
  30. data/test/{test.rb → test_helper.rb} +7 -0
  31. data/test/user_test.rb +43 -34
  32. data/test/vcr_cassettes/error/code.yml +1165 -0
  33. data/test/vcr_cassettes/instance/calling_api_methods.yml +182 -0
  34. data/test/vcr_cassettes/license/get_licenses.yml +73 -0
  35. data/test/vcr_cassettes/location/square_brackets.yml +85 -0
  36. data/test/vcr_cassettes/media/delete.yml +1380 -0
  37. data/test/vcr_cassettes/media/from_contacts.yml +155 -0
  38. data/test/vcr_cassettes/media/from_set.yml +276 -0
  39. data/test/vcr_cassettes/media/from_user.yml +275 -0
  40. data/test/vcr_cassettes/media/get_context.yml +73 -0
  41. data/test/vcr_cassettes/media/get_info.yml +167 -0
  42. data/test/vcr_cassettes/media/remove_tag.yml +264 -0
  43. data/test/vcr_cassettes/media/replace.yml +2252 -0
  44. data/test/vcr_cassettes/media/search.yml +275 -0
  45. data/test/vcr_cassettes/media/tags.yml +346 -0
  46. data/test/vcr_cassettes/media_count/get.yml +135 -0
  47. data/test/vcr_cassettes/media_count/square_brackets.yml +69 -0
  48. data/test/vcr_cassettes/oauth/tokens.yml +400 -0
  49. data/test/vcr_cassettes/photo/asynchronous_upload.yml +1693 -0
  50. data/test/vcr_cassettes/photo/from_set.yml +273 -0
  51. data/test/vcr_cassettes/photo/from_user.yml +275 -0
  52. data/test/vcr_cassettes/photo/get_exif.yml +239 -0
  53. data/test/vcr_cassettes/photo/get_sizes.yml +147 -0
  54. data/test/vcr_cassettes/photo/other_api_calls.yml +506 -0
  55. data/test/vcr_cassettes/photo/search.yml +271 -0
  56. data/test/vcr_cassettes/photo/square_brackets.yml +85 -0
  57. data/test/vcr_cassettes/photo/upload.yml +1229 -0
  58. data/test/vcr_cassettes/set/from_user.yml +477 -0
  59. data/test/vcr_cassettes/set/get_info.yml +951 -0
  60. data/test/vcr_cassettes/set/square_brackets.yml +73 -0
  61. data/test/vcr_cassettes/user/find_by_email_or_username.yml +135 -0
  62. data/test/vcr_cassettes/user/get_info.yml +151 -0
  63. data/test/vcr_cassettes/user/square_brackets.yml +77 -0
  64. data/test/vcr_cassettes/video/get_exif.yml +135 -0
  65. data/test/vcr_cassettes/video/get_info.yml +86 -0
  66. data/test/vcr_cassettes/video/get_sizes.yml +151 -0
  67. data/test/vcr_cassettes/video/other_api_calls.yml +643 -0
  68. data/test/vcr_cassettes/video/square_brackets.yml +86 -0
  69. data/test/vcr_cassettes/video/upload.yml +308 -0
  70. data/test/video_test.rb +66 -53
  71. metadata +123 -12
@@ -0,0 +1,151 @@
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.getSizes&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="d3863b387a3fa0c23880e149f9dbc0ed",
12
+ oauth_signature="1UlJ0LRCte%2BoaLvxFusTn%2FvU%2BXU%3D", oauth_signature_method="HMAC-SHA1",
13
+ oauth_timestamp="1336343115", 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
+ U3VuLCAwNiBNYXkgMjAxMiAyMjoyNToxNSBHTVQ=
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
+ d3d3MTYuZmxpY2tyLm11ZC55YWhvby5jb20=
46
+ !binary "VmFyeQ==":
47
+ - !binary |-
48
+ QWNjZXB0LUVuY29kaW5n
49
+ !binary "Q29udGVudC1FbmNvZGluZw==":
50
+ - !binary |-
51
+ Z3ppcA==
52
+ !binary "Q29udGVudC1MZW5ndGg=":
53
+ - !binary |-
54
+ NDU1
55
+ !binary "Q29ubmVjdGlvbg==":
56
+ - !binary |-
57
+ Y2xvc2U=
58
+ !binary "Q29udGVudC1UeXBl":
59
+ - !binary |-
60
+ YXBwbGljYXRpb24vanNvbg==
61
+ body:
62
+ encoding: ASCII-8BIT
63
+ string: !binary |-
64
+ H4sIAAAAAAAAA73Vy26jMBQA0F9BXnQV8cY8pGj6AZNRpY66KVVkwAlubEyM
65
+ KZpG+fcamkwg1YiqcmcF15av77nmcQANecUNSA4gR1VG+RYkzsLog1qQSv6N
66
+ Ct5VlKPifaBfBJLHA6AowxQk4H7fIoGBmupIIUuQhIG6LzHZlvIUNLwVuVoF
67
+ SinrJLVSa4MEg2YjkST5hpJ8J8ycs9QK/CBMrdCOPduL4shZxwg6MIs3EK8b
68
+ 87ne9vu0go5zdV1njnPUJZe8SS0YOp7jBe7tL9sf50ytAa4u+9Tq8zFcEKQy
69
+ DgvBcWFccD+R2GLjAxE4gQ1GynOsB7rXDZ13/i5bllWI0AnSniIjV59R6jbK
70
+ WeM9Q3Tic/2rQ4yhPiDT/rR+Dmh4rj1GnsIz0oWuNmKlm1jNEldqqmUTX+BO
71
+ DtGNIm2HqNvHZn0PpMDcuKPoDxZfUl7XhupabfzSp1VlSNwhIc2m2/x4WTp2
72
+ HEbwZqhiTYrlpeDTWINzgeXy0g8tvRh3YKjr6iEmEhurO1+Lfr6aWrW6Px+J
73
+ U+sCfa/yu6krnhH6AetH06+SB//xa/kqlg3b/h/u07EvXb1zaojvwPENVu/O
74
+ iXUIAAA=
75
+ http_version:
76
+ recorded_at: Sun, 06 May 2012 22:25:15 GMT
77
+ - request:
78
+ method: get
79
+ uri: http://api.flickr.com/services/rest?api_key=1e7490875accc5b9c1ca91a2f27b5604&format=json&method=flickr.photos.getSizes&nojsoncallback=1&photo_id=7093038981
80
+ body:
81
+ encoding: US-ASCII
82
+ string: ''
83
+ headers:
84
+ Authorization:
85
+ - OAuth oauth_consumer_key="1e7490875accc5b9c1ca91a2f27b5604", oauth_nonce="56c6635a2cd0b811b6e4b8f1f86f92dd",
86
+ oauth_signature="aNMPcdV%2BNiS1MRgkXLQyJx6j8V4%3D", oauth_signature_method="HMAC-SHA1",
87
+ oauth_timestamp="1336343115", oauth_token="72157629879773565-6da848f99ba7038a",
88
+ oauth_version="1.0"
89
+ Accept-Encoding:
90
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
91
+ Accept:
92
+ - ! '*/*'
93
+ User-Agent:
94
+ - Ruby
95
+ response:
96
+ status:
97
+ code: 200
98
+ message: !binary |-
99
+ T0s=
100
+ headers:
101
+ !binary "RGF0ZQ==":
102
+ - !binary |-
103
+ U3VuLCAwNiBNYXkgMjAxMiAyMjoyNToxNSBHTVQ=
104
+ !binary "UDNw":
105
+ - !binary |-
106
+ cG9saWN5cmVmPSJodHRwOi8vaW5mby55YWhvby5jb20vdzNjL3AzcC54bWwi
107
+ LCBDUD0iQ0FPIERTUCBDT1IgQ1VSIEFETSBERVYgVEFJIFBTQSBQU0QgSVZB
108
+ aSBJVkRpIENPTmkgVEVMbyBPVFBpIE9VUiBERUxpIFNBTWkgT1RSaSBVTlJp
109
+ IFBVQmkgSU5EIFBIWSBPTkwgVU5JIFBVUiBGSU4gQ09NIE5BViBJTlQgREVN
110
+ IENOVCBTVEEgUE9MIEhFQSBQUkUgTE9DIEdPViI=
111
+ !binary "QWNjZXNzLUNvbnRyb2wtQWxsb3ctT3JpZ2lu":
112
+ - !binary |-
113
+ Kg==
114
+ !binary "Q2FjaGUtQ29udHJvbA==":
115
+ - !binary |-
116
+ cHJpdmF0ZQ==
117
+ !binary "WC1TZXJ2ZWQtQnk=":
118
+ - !binary |-
119
+ d3d3MjAuZmxpY2tyLm11ZC55YWhvby5jb20=
120
+ !binary "VmFyeQ==":
121
+ - !binary |-
122
+ QWNjZXB0LUVuY29kaW5n
123
+ !binary "Q29udGVudC1FbmNvZGluZw==":
124
+ - !binary |-
125
+ Z3ppcA==
126
+ !binary "Q29udGVudC1MZW5ndGg=":
127
+ - !binary |-
128
+ NDU1
129
+ !binary "Q29ubmVjdGlvbg==":
130
+ - !binary |-
131
+ Y2xvc2U=
132
+ !binary "Q29udGVudC1UeXBl":
133
+ - !binary |-
134
+ YXBwbGljYXRpb24vanNvbg==
135
+ body:
136
+ encoding: ASCII-8BIT
137
+ string: !binary |-
138
+ H4sIAAAAAAAAA73Vy26jMBQA0F9BXnQV8cY8pGj6AZNRpY66KVVkwAlubEyM
139
+ KZpG+fcamkwg1YiqcmcF15av77nmcQANecUNSA4gR1VG+RYkzsLog1qQSv6N
140
+ Ct5VlKPifaBfBJLHA6AowxQk4H7fIoGBmupIIUuQhIG6LzHZlvIUNLwVuVoF
141
+ SinrJLVSa4MEg2YjkST5hpJ8J8ycs9QK/CBMrdCOPduL4shZxwg6MIs3EK8b
142
+ 87ne9vu0go5zdV1njnPUJZe8SS0YOp7jBe7tL9sf50ytAa4u+9Tq8zFcEKQy
143
+ DgvBcWFccD+R2GLjAxE4gQ1GynOsB7rXDZ13/i5bllWI0AnSniIjV59R6jbK
144
+ WeM9Q3Tic/2rQ4yhPiDT/rR+Dmh4rj1GnsIz0oWuNmKlm1jNEldqqmUTX+BO
145
+ DtGNIm2HqNvHZn0PpMDcuKPoDxZfUl7XhupabfzSp1VlSNwhIc2m2/x4WTp2
146
+ HEbwZqhiTYrlpeDTWINzgeXy0g8tvRh3YKjr6iEmEhurO1+Lfr6aWrW6Px+J
147
+ U+sCfa/yu6krnhH6AetH06+SB//xa/kqlg3b/h/u07EvXb1zaojvwPENVu/O
148
+ iXUIAAA=
149
+ http_version:
150
+ recorded_at: Sun, 06 May 2012 22:25:15 GMT
151
+ recorded_with: VCR 2.1.1