purdie 0.0.11 → 0.0.12

Sign up to get free protection for your applications and to get access to all the features.
Files changed (65) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +2 -1
  3. data/.travis.yml +1 -0
  4. data/README.md +25 -11
  5. data/_config/defaults.yaml +0 -21
  6. data/_config/licenses.yaml +33 -0
  7. data/features/duff-credentials.feature +33 -0
  8. data/features/flickr-album.feature +1 -1
  9. data/features/flickr-with-lookups.feature +29 -0
  10. data/features/rfm.feature +2 -2
  11. data/features/step_definitions/purdie_steps.rb +26 -0
  12. data/features/support/fixtures/_config/purdie.yaml +1 -1
  13. data/features/support/fixtures/vcr/A_URL_we_don_t_understand/Handle_a_URL_we_don_t_recognise.yml +15 -15
  14. data/features/support/fixtures/vcr/First_contact_with_the_Real_World/Generate_YAML_for_the_Raw_Funk_Maharishi.yml +59 -53
  15. data/features/support/fixtures/vcr/Flickr/Generate_Flickr_YAML.yml +15 -15
  16. data/features/support/fixtures/vcr/Flickr/Generate_Flickr_YAML_with_lookups.yml +123 -0
  17. data/features/support/fixtures/vcr/Flickr_album/Generate_Flickr_YAML_for_an_album.yml +137 -137
  18. data/features/support/fixtures/vcr/Handle_comments/Handle_comments_in_a_source_file.yml +21 -28
  19. data/features/support/fixtures/vcr/Missing_or_bad_credentials/Bad_credentials_for_multiple_services.yml +156 -0
  20. data/features/support/fixtures/vcr/Purdie/Generate_several_YAML.yml +37 -36
  21. data/features/support/fixtures/vcr/Select_a_file_to_process/Choose_file_to_process.yml +7 -7
  22. data/features/support/fixtures/vcr/Set_Flickr_picturesize/Generate_Flickr_YAML.yml +16 -16
  23. data/features/support/fixtures/vcr/Soundcloud/Generate_SoundCloud_YAML.yml +7 -7
  24. data/features/support/fixtures/vcr/Soundcloud/Generate_SoundCloud_YAML_for_multiple_tracks.yml +14 -14
  25. data/features/support/fixtures/vcr/Soundcloud_set/Generate_YAML_for_a_SoundCloud_set.yml +58 -33
  26. data/features/support/fixtures/vcr/Vimeo/Generate_Vimeo_YAML.yml +8 -8
  27. data/features/support/fixtures/vcr/Vimeo_albums/Generate_YAML_for_a_Vimeo_album.yml +210 -0
  28. data/features/support/fixtures/vcr/YouTube/Generate_YouTube_YAML.yml +9 -9
  29. data/features/support/fixtures/vcr/YouTube_playlists/Generate_YAML_for_a_YouTube_playlist.yml +2503 -0
  30. data/features/vimeo-albums.feature +27 -0
  31. data/features/youtube-playlist.feature +54 -0
  32. data/lib/purdie/bernard.rb +24 -1
  33. data/lib/purdie/cli.rb +4 -0
  34. data/lib/purdie/exceptions.rb +20 -0
  35. data/lib/purdie/helpers.rb +17 -2
  36. data/lib/purdie/ingester.rb +15 -10
  37. data/lib/purdie/license_manager.rb +41 -0
  38. data/lib/purdie/services/flickr.rb +14 -2
  39. data/lib/purdie/services/soundcloud.rb +13 -4
  40. data/lib/purdie/services/vimeo.rb +13 -6
  41. data/lib/purdie/services/youtube.rb +46 -4
  42. data/lib/purdie/source_list.rb +10 -16
  43. data/lib/purdie/version.rb +1 -1
  44. data/lib/purdie.rb +10 -0
  45. data/spec/duff_keys_spec.rb +115 -0
  46. data/spec/helpers_spec.rb +12 -5
  47. data/spec/license_manager_spec.rb +20 -0
  48. data/spec/services/flickr_spec.rb +24 -15
  49. data/spec/services/soundcloud_spec.rb +2 -2
  50. data/spec/services/vimeo_spec.rb +6 -6
  51. data/spec/services/youtube_spec.rb +14 -1
  52. data/spec/source_list_spec.rb +14 -4
  53. data/spec/spec_helper.rb +32 -0
  54. data/spec/support/fixtures/vimeo.vids +1 -0
  55. data/spec/vcr/Purdie_Services_Flickr/do_the_local_config_lookups/looks_up_the_default_title.yml +123 -0
  56. data/spec/vcr/Purdie_Services_Flickr/falls_back_to_the_default_photographer_name.yml +20 -19
  57. data/spec/vcr/Purdie_Services_Flickr/ingests_data_for_a_photo_without_a_specific_photographer_tag.yml +20 -21
  58. data/spec/vcr/Purdie_Services_Flickr/licenses_items_correctly.yml +180 -0
  59. data/spec/vcr/Purdie_Services_Vimeo/ingests_a_video.yml +8 -8
  60. data/spec/vcr/Purdie_Services_Vimeo/resolve_an_album/resolves_an_album_from_a_URL.yml +59 -0
  61. data/spec/vcr/Purdie_Services_YouTube/gets_the_correct_license.yml +976 -0
  62. data/spec/vcr/Purdie_Services_YouTube/resolve_a_playlist/resolves_a_playlist_from_a_shitty_YouTube_URL.yml +970 -0
  63. metadata +37 -4
  64. data/_data/flickr.yaml +0 -4
  65. data/_data/soundcloud.yaml +0 -7
data/spec/helpers_spec.rb CHANGED
@@ -3,8 +3,8 @@ require 'spec_helper'
3
3
  module Purdie
4
4
  describe Bernard do
5
5
  it 'strips a scheme' do
6
- expect(Purdie.strip_scheme 'http://foo.bar/stuff').to eq 'foo.bar/stuff'
7
- expect(Purdie.strip_scheme 'https://bar.foo/stuff').to eq 'bar.foo/stuff'
6
+ expect(Purdie.strip_scheme 'http://foo.bar/stuff').to eq '//foo.bar/stuff'
7
+ expect(Purdie.strip_scheme 'https://bar.foo/stuff').to eq '//bar.foo/stuff'
8
8
  end
9
9
 
10
10
  it 'sanitises a URL' do
@@ -14,9 +14,10 @@ module Purdie
14
14
  it 'gets an id' do
15
15
  expect(Purdie.get_id 'http://foo.bar/654321').to eq 654321
16
16
  expect(Purdie.get_id 'https://www.youtube.com/watch?v=JCix1XW329g').to eq 'JCix1XW329g'
17
+ expect(Purdie.get_id 'https://www.flickr.com/photos/rawfunkmaharishi/15631338195/in/photostream/').to eq 15631338195
17
18
  end
18
19
 
19
- it 'gets a basename for a class' do
20
+ context 'get a basename' do
20
21
  module Medeski
21
22
  module Martin
22
23
  class Wood
@@ -24,8 +25,14 @@ module Purdie
24
25
  end
25
26
  end
26
27
 
27
- @mmw = Medeski::Martin::Wood.new
28
- expect(Purdie.basename @mmw).to eq 'Wood'
28
+ it 'for a class' do
29
+ expect(Purdie.basename Medeski::Martin::Wood).to eq 'Wood'
30
+ end
31
+
32
+ it 'for an object' do
33
+ @mmw = Medeski::Martin::Wood.new
34
+ expect(Purdie.basename @mmw).to eq 'Wood'
35
+ end
29
36
  end
30
37
  end
31
38
  end
@@ -0,0 +1,20 @@
1
+ require 'spec_helper'
2
+
3
+ module Purdie
4
+ describe LicenseManager do
5
+ it 'returns a license' do
6
+ l = LicenseManager.get Purdie::Services::SoundCloud, 'cc-by-nc-sa'
7
+ expect(l['short_name']).to eq 'BY-NC-SA'
8
+ expect(l['full_name']).to eq 'Attribution-NonCommercial-ShareAlike'
9
+ expect(l.url).to eq 'http://creativecommons.org/licenses/by-nc-sa/4.0/'
10
+ end
11
+
12
+ it 'barfs on an unknown license' do
13
+ expect { l = LicenseManager.get Purdie::Services::Vimeo, 'fake-license' }.to raise_exception { |e|
14
+ expect(e).to be_a LicenseException
15
+ expect(e.service).to eq Purdie::Services::Vimeo
16
+ expect(e.name).to eq 'fake-license'
17
+ }
18
+ end
19
+ end
20
+ end
@@ -4,7 +4,7 @@ module Purdie
4
4
  module Services
5
5
  describe Flickr do
6
6
  before :each do
7
- @f = Flickr.new Config.new
7
+ @f = Flickr.new
8
8
  end
9
9
 
10
10
  it 'distills data for a regular photo', :vcr do
@@ -22,23 +22,25 @@ photographer: kim
22
22
  )
23
23
  end
24
24
 
25
+ it 'licenses items correctly', :vcr do
26
+ sources = [
27
+ 'https://www.flickr.com/photos/cluttercup/15950875724/',
28
+ 'https://www.flickr.com/photos/cluttercup/16579675721/'
29
+ ]
30
+
31
+ sources.each do |source|
32
+ dist = @f.distill source
33
+ expect(dist['license']).to eq 'Attribution-NonCommercial'
34
+ end
35
+ end
36
+
25
37
  it 'ingests data for a photo without a specific photographer tag', :vcr do
26
- @f.ingest 'https://www.flickr.com/photos/cluttercup/15950875724/'
27
- expect(@f[0].to_yaml).to eq (
28
- "---
29
- title: Raw Funk Maharishi
30
- date: '2015-02-18'
31
- photo_page: https://www.flickr.com/photos/cluttercup/15950875724/
32
- photo_url: https://farm8.staticflickr.com/7398/15950875724_23d58be214_m.jpg
33
- license: Attribution-NonCommercial
34
- license_url: https://creativecommons.org/licenses/by-nc/2.0/
35
- photographer: jane
36
- "
37
- )
38
+ @f.ingest 'https://www.flickr.com/photos/pikesley/16649739916/'
39
+ expect(@f[0].to_yaml).to match /photographer: sam/
38
40
  end
39
41
 
40
42
  it 'falls back to the default photographer name', :vcr do
41
- expect(@f.distill('https://www.flickr.com/photos/pikesley/16649739916/')['photographer']).to eq 'pikesley'
43
+ expect(@f.distill('https://www.flickr.com/photos/cluttercup/15950875724/')['photographer']).to eq 'cluttercup'
42
44
  end
43
45
 
44
46
  context 'FlickRaw url_ methods' do
@@ -65,12 +67,19 @@ photographer: jane
65
67
 
66
68
  context 'resolve a set' do
67
69
  it 'resolves a set from a url', :vcr do
68
- set = Flickr.resolve_set 'https://www.flickr.com/photos/pikesley/sets/72157649827363868/'
70
+ set = Flickr.resolve 'https://www.flickr.com/photos/pikesley/sets/72157649827363868/'
69
71
  expect(set.count).to eq 8
70
72
  expect(set[0]).to eq 'https://www.flickr.com/photos/pikesley/16252009191/'
71
73
  expect(set[7]).to eq 'https://www.flickr.com/photos/pikesley/16752239531/'
72
74
  end
73
75
  end
76
+
77
+ context 'do the local config lookups' do
78
+ it 'looks up the default title', :vcr do
79
+ @f.ingest 'https://www.flickr.com/photos/cluttercup/16393865760/'
80
+ expect(@f[0]['title']).to eq 'Raw Funk Maharishi'
81
+ end
82
+ end
74
83
  end
75
84
  end
76
85
  end
@@ -4,7 +4,7 @@ module Purdie
4
4
  module Services
5
5
  describe SoundCloud do
6
6
  before :each do
7
- @sc = SoundCloud.new Config.new
7
+ @sc = SoundCloud.new
8
8
  end
9
9
 
10
10
  it 'has a SoundCloud client' do
@@ -41,7 +41,7 @@ license_url: http://creativecommons.org/licenses/by-nc-sa/4.0/
41
41
 
42
42
  context 'resolve a set' do
43
43
  it 'resolves a set from a url', :vcr do
44
- set = SoundCloud.resolve_set 'https://soundcloud.com/rawfunkmaharishi/sets/islington-academy-sessions'
44
+ set = SoundCloud.resolve 'https://soundcloud.com/rawfunkmaharishi/sets/islington-academy-sessions'
45
45
  expect(set[0]).to eq 'http://soundcloud.com/rawfunkmaharishi/hexaflexagon-1'
46
46
  expect(set[3]).to eq 'http://soundcloud.com/rawfunkmaharishi/bernard'
47
47
  end
@@ -4,7 +4,7 @@ module Purdie
4
4
  module Services
5
5
  describe Vimeo do
6
6
  before :each do
7
- @v = Vimeo.new Config.new
7
+ @v = Vimeo.new
8
8
  end
9
9
 
10
10
  it 'gets a video', :vcr do
@@ -24,14 +24,14 @@ license_url: http://creativecommons.org/licenses/by-nc-sa/3.0/
24
24
  end
25
25
 
26
26
  context 'resolve an album' do
27
- it 'resolves an album from a URL' do
27
+ it 'resolves an album from a URL', :vcr do
28
28
  # We're going to call this a set for consistency
29
- set = Vimeo.resolve_set 'https://vimeo.com/album/3296736'
29
+ set = Vimeo.resolve 'https://vimeo.com/album/3296736'
30
30
  expect(set.count).to eq 3
31
31
  expect(set).to eq [
32
- 'https://vimeo.com/rawfunkmaharishi/safetyonboard',
33
- 'https://vimeo.com/rawfunkmaharishi/trappedinhawaii',
34
- 'https://vimeo.com/rawfunkmaharishi/discotheque-metamorphosis'
32
+ 'https://vimeo.com/111356018',
33
+ 'https://vimeo.com/110133117',
34
+ 'https://vimeo.com/110132671'
35
35
  ]
36
36
  end
37
37
  end
@@ -4,7 +4,7 @@ module Purdie
4
4
  module Services
5
5
  describe YouTube do
6
6
  before :each do
7
- @yt = YouTube.new Config.new
7
+ @yt = YouTube.new
8
8
  end
9
9
 
10
10
  it 'gets a video', :vcr do
@@ -22,6 +22,19 @@ license_url: https://creativecommons.org/licenses/by/3.0/
22
22
  "
23
23
  )
24
24
  end
25
+
26
+ it 'gets the correct license', :vcr do
27
+ vid = @yt.distill 'https://www.youtube.com/watch?v=baQe6MoSAHw'
28
+ expect(vid['license']).to eq 'YouTube'
29
+ end
30
+
31
+ context 'resolve a playlist' do
32
+ it 'resolves a playlist from a shitty YouTube URL', :vcr do
33
+ list = YouTube.resolve 'https://www.youtube.com/playlist?list=PLuPLM2FI60-OIgFTc9YCrGgH5XWGT6znV'
34
+ expect(list.count).to eq 9
35
+ expect(list[8]).to eq 'https://youtube.com/watch?v=P842kq0bnOc'
36
+ end
37
+ end
25
38
  end
26
39
  end
27
40
  end
@@ -21,14 +21,14 @@ module Purdie
21
21
 
22
22
  context 'resolve sets' do
23
23
  it 'resolves a Flickr set', :vcr do
24
- resolved = SourceList.resolve_set 'https://www.flickr.com/photos/pikesley/sets/72157649827363868/'
24
+ resolved = SourceList.resolve 'https://www.flickr.com/photos/pikesley/sets/72157649827363868/'
25
25
  expect(resolved.count).to eq 8
26
26
  expect(resolved[0]).to eq 'https://www.flickr.com/photos/pikesley/16252009191/'
27
27
  expect(resolved[7]).to eq 'https://www.flickr.com/photos/pikesley/16752239531/'
28
28
  end
29
29
 
30
30
  it 'resolves a SoundCloud set', :vcr do
31
- resolved = SourceList.resolve_set 'https://soundcloud.com/rawfunkmaharishi/sets/islington-academy-sessions'
31
+ resolved = SourceList.resolve 'https://soundcloud.com/rawfunkmaharishi/sets/islington-academy-sessions'
32
32
  expect(resolved.count).to eq 4
33
33
  end
34
34
 
@@ -46,8 +46,8 @@ module Purdie
46
46
  ]
47
47
  sl = SourceList.new sources
48
48
  expect(sl.count).to eq 4
49
- expect(Purdie.strip_scheme sl[0]).to eq 'soundcloud.com/rawfunkmaharishi/beer-of-course-but-why'
50
- expect(Purdie.strip_scheme sl[2]).to eq 'soundcloud.com/rawfunkmaharishi/junalbandi-3'
49
+ expect(Purdie.strip_scheme sl[0]).to eq '//soundcloud.com/rawfunkmaharishi/beer-of-course-but-why'
50
+ expect(Purdie.strip_scheme sl[2]).to eq '//soundcloud.com/rawfunkmaharishi/junalbandi-3'
51
51
  end
52
52
  end
53
53
 
@@ -56,9 +56,19 @@ module Purdie
56
56
  expect(sl[3]).to eq 'https://soundcloud.com/rawfunkmaharishi/funk-taxi-berlin'
57
57
  end
58
58
 
59
+ it 'can be initialiased from a Vimeo file' do
60
+ sl = SourceList.from_file 'spec/support/fixtures/vimeo.vids'
61
+ expect(sl[2]).to eq 'https://vimeo.com/110132671'
62
+ end
63
+
59
64
  it 'deals with comments in a source file' do
60
65
  sl = SourceList.from_file 'spec/support/fixtures/with-comments.source'
61
66
  expect(sl.count).to eq 2
62
67
  end
68
+
69
+ it 'does something sensible with an unrecognised URL' do
70
+ sl = SourceList.new 'http://foo.com/bar'
71
+ expect(sl.count).to eq 0
72
+ end
63
73
  end
64
74
  end
data/spec/spec_helper.rb CHANGED
@@ -26,3 +26,35 @@ RSpec.configure do |config|
26
26
  FileUtils.rmdir File.join(File.dirname(__FILE__), '..', '_sources')
27
27
  end
28
28
  end
29
+
30
+ $keys = [
31
+ 'FLICKR_API_KEY',
32
+ 'FLICKR_SECRET',
33
+ 'SOUNDCLOUD_CLIENT_ID',
34
+ 'VIMEO_BEARER_TOKEN',
35
+ 'YOUTUBE_API_KEY',
36
+ ]
37
+
38
+ $envs = {} unless $envs
39
+
40
+ def unset_env
41
+ $envs = {}
42
+ $keys.each do |k|
43
+ $envs[k] = ENV[k]
44
+ ENV[k] = nil
45
+ end
46
+ end
47
+
48
+ def randomise_env
49
+ $envs = {}
50
+ $keys.each do |k|
51
+ $envs[k] = ENV[k]
52
+ ENV[k] = Random.rand(10000000).to_s(16)
53
+ end
54
+ end
55
+
56
+ def reset_env
57
+ $keys.each do |k|
58
+ ENV[k] = $envs[k]
59
+ end
60
+ end
@@ -0,0 +1 @@
1
+ https://vimeo.com/album/3296736
@@ -0,0 +1,123 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://api.flickr.com/services/rest/
6
+ body:
7
+ encoding: US-ASCII
8
+ string: photo_id=16393865760&method=flickr.photos.getInfo&format=json&nojsoncallback=1
9
+ headers:
10
+ Accept-Encoding:
11
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
12
+ Accept:
13
+ - "*/*"
14
+ User-Agent:
15
+ - FlickRaw/0.9.8
16
+ Authorization:
17
+ - OAuth realm="https://api.flickr.com/services/rest/", oauth_consumer_key="<FLICKR_API_KEY>",
18
+ oauth_nonce="DN8QeJNxW0mn02wxYi3XqjcAahtatxTK4YaiY6XOhGU%3D", oauth_signature="<FLICKR_SECRET>%26",
19
+ oauth_signature_method="PLAINTEXT", oauth_timestamp="1426624699", oauth_token="",
20
+ oauth_version="1.0"
21
+ Content-Type:
22
+ - application/x-www-form-urlencoded
23
+ response:
24
+ status:
25
+ code: 200
26
+ message: OK
27
+ headers:
28
+ Date:
29
+ - Tue, 17 Mar 2015 20:38:20 GMT
30
+ Content-Type:
31
+ - application/json
32
+ Content-Length:
33
+ - '546'
34
+ P3p:
35
+ - policyref="http://info.yahoo.com/w3c/p3p.xml", CP="CAO DSP COR CUR ADM DEV
36
+ TAI PSA PSD IVAi IVDi CONi TELo OTPi OUR DELi SAMi OTRi UNRi PUBi IND PHY
37
+ ONL UNI PUR FIN COM NAV INT DEM CNT STA POL HEA PRE LOC GOV"
38
+ Cache-Control:
39
+ - private
40
+ X-Served-By:
41
+ - www63.flickr.bf1.yahoo.com
42
+ Vary:
43
+ - Accept-Encoding
44
+ Age:
45
+ - '0'
46
+ Via:
47
+ - http/1.1 fts105.flickr.bf1.yahoo.com (ApacheTrafficServer/4.0.2 [cMsSf ]),
48
+ http/1.1 r07.ycpi.ir2.yahoo.net (ApacheTrafficServer [cMsSf ])
49
+ Server:
50
+ - ATS
51
+ Connection:
52
+ - keep-alive
53
+ body:
54
+ encoding: ASCII-8BIT
55
+ string: '{"photo":{"id":"16393865760","secret":"bfbfc1c267","server":"7395","farm":8,"dateuploaded":"1424360186","isfavorite":0,"license":"2","safety_level":"0","rotation":0,"originalsecret":"72a64c9506","originalformat":"jpg","owner":{"nsid":"54115632@N00","username":"cluttercup","realname":"Jane
56
+ Dickson","location":"London, UK","iconserver":"7338","iconfarm":8,"path_alias":"cluttercup"},"title":{"_content":""},"description":{"_content":""},"visibility":{"ispublic":1,"isfriend":0,"isfamily":0},"dates":{"posted":"1424360186","taken":"2015-02-18
57
+ 16:57:45","takengranularity":"0","takenunknown":"0","lastupdate":"1424360361"},"views":"21","editability":{"cancomment":0,"canaddmeta":0},"publiceditability":{"cancomment":1,"canaddmeta":0},"usage":{"candownload":1,"canblog":0,"canprint":0,"canshare":1},"comments":{"_content":"0"},"notes":{"note":[]},"people":{"haspeople":0},"tags":{"tag":[]},"urls":{"url":[{"type":"photopage","_content":"https:\/\/www.flickr.com\/photos\/cluttercup\/16393865760\/"}]},"media":"photo"},"stat":"ok"}'
58
+ http_version:
59
+ recorded_at: Tue, 17 Mar 2015 20:38:20 GMT
60
+ - request:
61
+ method: post
62
+ uri: https://api.flickr.com/services/rest/
63
+ body:
64
+ encoding: US-ASCII
65
+ string: method=flickr.photos.licenses.getInfo&format=json&nojsoncallback=1
66
+ headers:
67
+ Accept-Encoding:
68
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
69
+ Accept:
70
+ - "*/*"
71
+ User-Agent:
72
+ - FlickRaw/0.9.8
73
+ Authorization:
74
+ - OAuth realm="https://api.flickr.com/services/rest/", oauth_consumer_key="<FLICKR_API_KEY>",
75
+ oauth_nonce="A1u5RiEY00jNjSag3Dzcu%2FcIjX7pi3%2BkQ6OBmqIEq5o%3D", oauth_signature="<FLICKR_SECRET>%26",
76
+ oauth_signature_method="PLAINTEXT", oauth_timestamp="1426624700", oauth_token="",
77
+ oauth_version="1.0"
78
+ Content-Type:
79
+ - application/x-www-form-urlencoded
80
+ response:
81
+ status:
82
+ code: 200
83
+ message: OK
84
+ headers:
85
+ Date:
86
+ - Tue, 17 Mar 2015 20:38:20 GMT
87
+ Content-Type:
88
+ - application/json
89
+ Content-Length:
90
+ - '314'
91
+ P3p:
92
+ - policyref="http://info.yahoo.com/w3c/p3p.xml", CP="CAO DSP COR CUR ADM DEV
93
+ TAI PSA PSD IVAi IVDi CONi TELo OTPi OUR DELi SAMi OTRi UNRi PUBi IND PHY
94
+ ONL UNI PUR FIN COM NAV INT DEM CNT STA POL HEA PRE LOC GOV"
95
+ Cache-Control:
96
+ - private
97
+ X-Served-By:
98
+ - www38.flickr.bf1.yahoo.com
99
+ Vary:
100
+ - Accept-Encoding
101
+ Age:
102
+ - '0'
103
+ Via:
104
+ - http/1.1 fts104.flickr.bf1.yahoo.com (ApacheTrafficServer/4.0.2 [cMsSf ]),
105
+ http/1.1 r12.ycpi.ams.yahoo.net (ApacheTrafficServer [cMsSf ])
106
+ Server:
107
+ - ATS
108
+ Connection:
109
+ - keep-alive
110
+ body:
111
+ encoding: ASCII-8BIT
112
+ string: '{"licenses":{"license":[{"id":"0","name":"All Rights Reserved","url":""},{"id":"4","name":"Attribution
113
+ License","url":"https:\/\/creativecommons.org\/licenses\/by\/2.0\/"},{"id":"6","name":"Attribution-NoDerivs
114
+ License","url":"https:\/\/creativecommons.org\/licenses\/by-nd\/2.0\/"},{"id":"3","name":"Attribution-NonCommercial-NoDerivs
115
+ License","url":"https:\/\/creativecommons.org\/licenses\/by-nc-nd\/2.0\/"},{"id":"2","name":"Attribution-NonCommercial
116
+ License","url":"https:\/\/creativecommons.org\/licenses\/by-nc\/2.0\/"},{"id":"1","name":"Attribution-NonCommercial-ShareAlike
117
+ License","url":"https:\/\/creativecommons.org\/licenses\/by-nc-sa\/2.0\/"},{"id":"5","name":"Attribution-ShareAlike
118
+ License","url":"https:\/\/creativecommons.org\/licenses\/by-sa\/2.0\/"},{"id":"7","name":"No
119
+ known copyright restrictions","url":"https:\/\/www.flickr.com\/commons\/usage\/"},{"id":"8","name":"United
120
+ States Government Work","url":"http:\/\/www.usa.gov\/copyright.shtml"}]},"stat":"ok"}'
121
+ http_version:
122
+ recorded_at: Tue, 17 Mar 2015 20:38:20 GMT
123
+ recorded_with: VCR 2.9.3
@@ -5,7 +5,7 @@ http_interactions:
5
5
  uri: https://api.flickr.com/services/rest/
6
6
  body:
7
7
  encoding: US-ASCII
8
- string: photo_id=16649739916&method=flickr.photos.getInfo&format=json&nojsoncallback=1
8
+ string: photo_id=15950875724&method=flickr.photos.getInfo&format=json&nojsoncallback=1
9
9
  headers:
10
10
  Accept-Encoding:
11
11
  - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
@@ -15,8 +15,8 @@ http_interactions:
15
15
  - FlickRaw/0.9.8
16
16
  Authorization:
17
17
  - OAuth realm="https://api.flickr.com/services/rest/", oauth_consumer_key="<FLICKR_API_KEY>",
18
- oauth_nonce="T0%2FZj8bw3BkeQI9Qb9A3fHR745ekZp4Hx2NyoIw1HRo%3D", oauth_signature="<FLICKR_SECRET>%26",
19
- oauth_signature_method="PLAINTEXT", oauth_timestamp="1425845861", oauth_token="",
18
+ oauth_nonce="9ApUVUWEN7CX6OOoAVHygvril%2BNIQpWyL%2Fugm7FWgNc%3D", oauth_signature="<FLICKR_SECRET>%26",
19
+ oauth_signature_method="PLAINTEXT", oauth_timestamp="1426026155", oauth_token="",
20
20
  oauth_version="1.0"
21
21
  Content-Type:
22
22
  - application/x-www-form-urlencoded
@@ -26,11 +26,11 @@ http_interactions:
26
26
  message: OK
27
27
  headers:
28
28
  Date:
29
- - Sun, 08 Mar 2015 20:17:42 GMT
29
+ - Tue, 10 Mar 2015 22:22:35 GMT
30
30
  Content-Type:
31
31
  - application/json
32
32
  Content-Length:
33
- - '541'
33
+ - '542'
34
34
  P3p:
35
35
  - policyref="http://info.yahoo.com/w3c/p3p.xml", CP="CAO DSP COR CUR ADM DEV
36
36
  TAI PSA PSD IVAi IVDi CONi TELo OTPi OUR DELi SAMi OTRi UNRi PUBi IND PHY
@@ -38,24 +38,25 @@ http_interactions:
38
38
  Cache-Control:
39
39
  - private
40
40
  X-Served-By:
41
- - www290.flickr.bf1.yahoo.com
41
+ - www39.flickr.bf1.yahoo.com
42
42
  Vary:
43
43
  - Accept-Encoding
44
44
  Age:
45
- - '2'
45
+ - '0'
46
46
  Via:
47
- - http/1.1 fts125.flickr.bf1.yahoo.com (ApacheTrafficServer/4.0.2 [cMsSf ]),
48
- http/1.1 r06.ycpi.ams.yahoo.net (ApacheTrafficServer [cMsSf ])
47
+ - http/1.1 fts110.flickr.bf1.yahoo.com (ApacheTrafficServer/4.0.2 [cMsSf ]),
48
+ http/1.1 r16.ycpi.ams.yahoo.net (ApacheTrafficServer [cMsSf ])
49
49
  Server:
50
50
  - ATS
51
51
  Connection:
52
52
  - keep-alive
53
53
  body:
54
54
  encoding: ASCII-8BIT
55
- string: '{"photo":{"id":"16649739916","secret":"a575f69e94","server":"8661","farm":9,"dateuploaded":"1425159508","isfavorite":0,"license":"1","safety_level":"0","rotation":0,"originalsecret":"e33e9d3d4a","originalformat":"jpg","owner":{"nsid":"73135567@N00","username":"pikesley","realname":"Sam","location":"London","iconserver":"5072","iconfarm":6,"path_alias":"pikesley"},"title":{"_content":"Catface"},"description":{"_content":""},"visibility":{"ispublic":1,"isfriend":0,"isfamily":0},"dates":{"posted":"1425159508","taken":"2015-02-28
56
- 22:36:25","takengranularity":"0","takenunknown":"0","lastupdate":"1425159602"},"views":"25","editability":{"cancomment":0,"canaddmeta":0},"publiceditability":{"cancomment":1,"canaddmeta":0},"usage":{"candownload":1,"canblog":0,"canprint":0,"canshare":1},"comments":{"_content":"0"},"notes":{"note":[]},"people":{"haspeople":0},"tags":{"tag":[]},"urls":{"url":[{"type":"photopage","_content":"https:\/\/www.flickr.com\/photos\/pikesley\/16649739916\/"}]},"media":"photo"},"stat":"ok"}'
55
+ string: '{"photo":{"id":"15950875724","secret":"23d58be214","server":"7398","farm":8,"dateuploaded":"1424289792","isfavorite":0,"license":"2","safety_level":"0","rotation":0,"originalsecret":"24a89b0cfe","originalformat":"jpg","owner":{"nsid":"54115632@N00","username":"cluttercup","realname":"Jane
56
+ Dickson","location":"London, UK","iconserver":"7338","iconfarm":8,"path_alias":"cluttercup"},"title":{"_content":""},"description":{"_content":""},"visibility":{"ispublic":1,"isfriend":0,"isfamily":0},"dates":{"posted":"1424289792","taken":"2015-02-18
57
+ 16:56:20","takengranularity":"0","takenunknown":"0","lastupdate":"1424289832"},"views":"38","editability":{"cancomment":0,"canaddmeta":0},"publiceditability":{"cancomment":1,"canaddmeta":0},"usage":{"candownload":1,"canblog":0,"canprint":0,"canshare":1},"comments":{"_content":"0"},"notes":{"note":[]},"people":{"haspeople":0},"tags":{"tag":[]},"urls":{"url":[{"type":"photopage","_content":"https:\/\/www.flickr.com\/photos\/cluttercup\/15950875724\/"}]},"media":"photo"},"stat":"ok"}'
57
58
  http_version:
58
- recorded_at: Sun, 08 Mar 2015 20:17:42 GMT
59
+ recorded_at: Tue, 10 Mar 2015 22:22:36 GMT
59
60
  - request:
60
61
  method: post
61
62
  uri: https://api.flickr.com/services/rest/
@@ -71,8 +72,8 @@ http_interactions:
71
72
  - FlickRaw/0.9.8
72
73
  Authorization:
73
74
  - OAuth realm="https://api.flickr.com/services/rest/", oauth_consumer_key="<FLICKR_API_KEY>",
74
- oauth_nonce="3azzVL2Y5VJi%2FSFsX2QIVsiBxNAHOVJpobxl6Q7ne9o%3D", oauth_signature="<FLICKR_SECRET>%26",
75
- oauth_signature_method="PLAINTEXT", oauth_timestamp="1425845862", oauth_token="",
75
+ oauth_nonce="w80y%2Fgyi1%2BQN13OPGe5gAFKR3oDy9IZl2xXg8BdSJco%3D", oauth_signature="<FLICKR_SECRET>%26",
76
+ oauth_signature_method="PLAINTEXT", oauth_timestamp="1426026156", oauth_token="",
76
77
  oauth_version="1.0"
77
78
  Content-Type:
78
79
  - application/x-www-form-urlencoded
@@ -82,7 +83,7 @@ http_interactions:
82
83
  message: OK
83
84
  headers:
84
85
  Date:
85
- - Sun, 08 Mar 2015 20:17:42 GMT
86
+ - Tue, 10 Mar 2015 22:22:36 GMT
86
87
  Content-Type:
87
88
  - application/json
88
89
  Content-Length:
@@ -94,14 +95,14 @@ http_interactions:
94
95
  Cache-Control:
95
96
  - private
96
97
  X-Served-By:
97
- - www29.flickr.bf1.yahoo.com
98
+ - www65.flickr.bf1.yahoo.com
98
99
  Vary:
99
100
  - Accept-Encoding
100
101
  Age:
101
102
  - '0'
102
103
  Via:
103
- - http/1.1 fts113.flickr.bf1.yahoo.com (ApacheTrafficServer/4.0.2 [cMsSf ]),
104
- http/1.1 r06.ycpi.ams.yahoo.net (ApacheTrafficServer [cMsSf ])
104
+ - http/1.1 fts122.flickr.bf1.yahoo.com (ApacheTrafficServer/4.0.2 [cMsSf ]),
105
+ http/1.1 r15.ycpi.ams.yahoo.net (ApacheTrafficServer [cMsSf ])
105
106
  Server:
106
107
  - ATS
107
108
  Connection:
@@ -118,5 +119,5 @@ http_interactions:
118
119
  known copyright restrictions","url":"https:\/\/www.flickr.com\/commons\/usage\/"},{"id":"8","name":"United
119
120
  States Government Work","url":"http:\/\/www.usa.gov\/copyright.shtml"}]},"stat":"ok"}'
120
121
  http_version:
121
- recorded_at: Sun, 08 Mar 2015 20:17:42 GMT
122
+ recorded_at: Tue, 10 Mar 2015 22:22:36 GMT
122
123
  recorded_with: VCR 2.9.3
@@ -5,7 +5,7 @@ http_interactions:
5
5
  uri: https://api.flickr.com/services/rest/
6
6
  body:
7
7
  encoding: US-ASCII
8
- string: photo_id=15950875724&method=flickr.photos.getInfo&format=json&nojsoncallback=1
8
+ string: photo_id=16649739916&method=flickr.photos.getInfo&format=json&nojsoncallback=1
9
9
  headers:
10
10
  Accept-Encoding:
11
11
  - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
@@ -15,8 +15,8 @@ http_interactions:
15
15
  - FlickRaw/0.9.8
16
16
  Authorization:
17
17
  - OAuth realm="https://api.flickr.com/services/rest/", oauth_consumer_key="<FLICKR_API_KEY>",
18
- oauth_nonce="sS%2FWvDGTDFmFWZjG2mc52eH%2F%2F%2F8QqIZCcYapDuT%2FKpE%3D", oauth_signature="<FLICKR_SECRET>%26",
19
- oauth_signature_method="PLAINTEXT", oauth_timestamp="1425845860", oauth_token="",
18
+ oauth_nonce="QXvZvg5zlaaj%2FTeTiJWkAWmKsoHZ5x24w4xM%2BsOq5bQ%3D", oauth_signature="<FLICKR_SECRET>%26",
19
+ oauth_signature_method="PLAINTEXT", oauth_timestamp="1426026284", oauth_token="",
20
20
  oauth_version="1.0"
21
21
  Content-Type:
22
22
  - application/x-www-form-urlencoded
@@ -26,11 +26,11 @@ http_interactions:
26
26
  message: OK
27
27
  headers:
28
28
  Date:
29
- - Sun, 08 Mar 2015 20:17:40 GMT
29
+ - Tue, 10 Mar 2015 22:24:45 GMT
30
30
  Content-Type:
31
31
  - application/json
32
32
  Content-Length:
33
- - '542'
33
+ - '541'
34
34
  P3p:
35
35
  - policyref="http://info.yahoo.com/w3c/p3p.xml", CP="CAO DSP COR CUR ADM DEV
36
36
  TAI PSA PSD IVAi IVDi CONi TELo OTPi OUR DELi SAMi OTRi UNRi PUBi IND PHY
@@ -38,25 +38,24 @@ http_interactions:
38
38
  Cache-Control:
39
39
  - private
40
40
  X-Served-By:
41
- - www7.flickr.bf1.yahoo.com
41
+ - www70.flickr.bf1.yahoo.com
42
42
  Vary:
43
43
  - Accept-Encoding
44
44
  Age:
45
- - '0'
45
+ - '2'
46
46
  Via:
47
- - http/1.1 fts125.flickr.bf1.yahoo.com (ApacheTrafficServer/4.0.2 [cMsSf ]),
48
- http/1.1 r24.ycpi.ir2.yahoo.net (ApacheTrafficServer [cMsSf ])
47
+ - http/1.1 fts119.flickr.bf1.yahoo.com (ApacheTrafficServer/4.0.2 [cMsSf ]),
48
+ http/1.1 r15.ycpi.ams.yahoo.net (ApacheTrafficServer [cMsSf ])
49
49
  Server:
50
50
  - ATS
51
51
  Connection:
52
52
  - keep-alive
53
53
  body:
54
54
  encoding: ASCII-8BIT
55
- string: '{"photo":{"id":"15950875724","secret":"23d58be214","server":"7398","farm":8,"dateuploaded":"1424289792","isfavorite":0,"license":"2","safety_level":"0","rotation":0,"originalsecret":"24a89b0cfe","originalformat":"jpg","owner":{"nsid":"54115632@N00","username":"cluttercup","realname":"Jane
56
- Dickson","location":"London, UK","iconserver":"7338","iconfarm":8,"path_alias":"cluttercup"},"title":{"_content":""},"description":{"_content":""},"visibility":{"ispublic":1,"isfriend":0,"isfamily":0},"dates":{"posted":"1424289792","taken":"2015-02-18
57
- 16:56:20","takengranularity":"0","takenunknown":"0","lastupdate":"1424289832"},"views":"38","editability":{"cancomment":0,"canaddmeta":0},"publiceditability":{"cancomment":1,"canaddmeta":0},"usage":{"candownload":1,"canblog":0,"canprint":0,"canshare":1},"comments":{"_content":"0"},"notes":{"note":[]},"people":{"haspeople":0},"tags":{"tag":[]},"urls":{"url":[{"type":"photopage","_content":"https:\/\/www.flickr.com\/photos\/cluttercup\/15950875724\/"}]},"media":"photo"},"stat":"ok"}'
55
+ string: '{"photo":{"id":"16649739916","secret":"a575f69e94","server":"8661","farm":9,"dateuploaded":"1425159508","isfavorite":0,"license":"1","safety_level":"0","rotation":0,"originalsecret":"e33e9d3d4a","originalformat":"jpg","owner":{"nsid":"73135567@N00","username":"pikesley","realname":"Sam","location":"London","iconserver":"5072","iconfarm":6,"path_alias":"pikesley"},"title":{"_content":"Catface"},"description":{"_content":""},"visibility":{"ispublic":1,"isfriend":0,"isfamily":0},"dates":{"posted":"1425159508","taken":"2015-02-28
56
+ 22:36:25","takengranularity":"0","takenunknown":"0","lastupdate":"1425159602"},"views":"25","editability":{"cancomment":0,"canaddmeta":0},"publiceditability":{"cancomment":1,"canaddmeta":0},"usage":{"candownload":1,"canblog":0,"canprint":0,"canshare":1},"comments":{"_content":"0"},"notes":{"note":[]},"people":{"haspeople":0},"tags":{"tag":[]},"urls":{"url":[{"type":"photopage","_content":"https:\/\/www.flickr.com\/photos\/pikesley\/16649739916\/"}]},"media":"photo"},"stat":"ok"}'
58
57
  http_version:
59
- recorded_at: Sun, 08 Mar 2015 20:17:40 GMT
58
+ recorded_at: Tue, 10 Mar 2015 22:24:45 GMT
60
59
  - request:
61
60
  method: post
62
61
  uri: https://api.flickr.com/services/rest/
@@ -72,8 +71,8 @@ http_interactions:
72
71
  - FlickRaw/0.9.8
73
72
  Authorization:
74
73
  - OAuth realm="https://api.flickr.com/services/rest/", oauth_consumer_key="<FLICKR_API_KEY>",
75
- oauth_nonce="boov2Wa6DkpsQqDjok%2Fv7VCptew%2FiegvEBwN%2FeTQHIc%3D", oauth_signature="<FLICKR_SECRET>%26",
76
- oauth_signature_method="PLAINTEXT", oauth_timestamp="1425845860", oauth_token="",
74
+ oauth_nonce="P87mENs3jhXehfeaOtD7W2XUg%2FL4Di1eHRq3J59LftY%3D", oauth_signature="<FLICKR_SECRET>%26",
75
+ oauth_signature_method="PLAINTEXT", oauth_timestamp="1426026285", oauth_token="",
77
76
  oauth_version="1.0"
78
77
  Content-Type:
79
78
  - application/x-www-form-urlencoded
@@ -83,7 +82,7 @@ http_interactions:
83
82
  message: OK
84
83
  headers:
85
84
  Date:
86
- - Sun, 08 Mar 2015 20:17:41 GMT
85
+ - Tue, 10 Mar 2015 22:24:45 GMT
87
86
  Content-Type:
88
87
  - application/json
89
88
  Content-Length:
@@ -95,14 +94,14 @@ http_interactions:
95
94
  Cache-Control:
96
95
  - private
97
96
  X-Served-By:
98
- - www348.flickr.bf1.yahoo.com
97
+ - www296.flickr.bf1.yahoo.com
99
98
  Vary:
100
99
  - Accept-Encoding
101
100
  Age:
102
- - '2'
101
+ - '0'
103
102
  Via:
104
- - http/1.1 fts108.flickr.bf1.yahoo.com (ApacheTrafficServer/4.0.2 [cMsSf ]),
105
- http/1.1 r06.ycpi.ams.yahoo.net (ApacheTrafficServer [cMsSf ])
103
+ - http/1.1 fts110.flickr.bf1.yahoo.com (ApacheTrafficServer/4.0.2 [cMsSf ]),
104
+ http/1.1 r16.ycpi.ams.yahoo.net (ApacheTrafficServer [cMsSf ])
106
105
  Server:
107
106
  - ATS
108
107
  Connection:
@@ -119,5 +118,5 @@ http_interactions:
119
118
  known copyright restrictions","url":"https:\/\/www.flickr.com\/commons\/usage\/"},{"id":"8","name":"United
120
119
  States Government Work","url":"http:\/\/www.usa.gov\/copyright.shtml"}]},"stat":"ok"}'
121
120
  http_version:
122
- recorded_at: Sun, 08 Mar 2015 20:17:41 GMT
121
+ recorded_at: Tue, 10 Mar 2015 22:24:45 GMT
123
122
  recorded_with: VCR 2.9.3