purdie 0.0.9 → 0.0.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +8 -6
- data/README.md +38 -22
- data/_config/defaults.yaml +10 -0
- data/_data/flickr.yaml +4 -0
- data/_data/soundcloud.yaml +7 -0
- data/features/flickr-album.feature +23 -0
- data/features/flickr-different-size.feature +28 -0
- data/features/soundcloud-set.feature +41 -0
- data/features/soundcloud.feature +0 -1
- data/features/support/fixtures/vcr/A_URL_we_don_t_understand/Handle_a_URL_we_don_t_recognise.yml +16 -16
- data/features/support/fixtures/vcr/First_contact_with_the_Real_World/Generate_YAML_for_the_Raw_Funk_Maharishi.yml +191 -276
- data/features/support/fixtures/vcr/Flickr/Generate_Flickr_YAML.yml +16 -16
- data/features/support/fixtures/vcr/Flickr_album/Generate_Flickr_YAML_for_an_album.yml +1035 -0
- data/features/support/fixtures/vcr/Handle_comments/Handle_comments_in_a_source_file.yml +75 -206
- data/features/support/fixtures/vcr/Purdie/Generate_several_YAML.yml +177 -213
- data/features/support/fixtures/vcr/Select_a_file_to_process/Choose_file_to_process.yml +56 -188
- data/features/support/fixtures/vcr/Set_Flickr_picturesize/Generate_Flickr_YAML.yml +125 -0
- data/features/support/fixtures/vcr/Soundcloud/Generate_SoundCloud_YAML.yml +56 -188
- data/features/support/fixtures/vcr/Soundcloud/Generate_SoundCloud_YAML_for_multiple_tracks.yml +140 -181
- data/features/support/fixtures/vcr/Soundcloud_set/Generate_YAML_for_a_SoundCloud_set.yml +436 -0
- data/features/support/fixtures/vcr/Vimeo/Generate_Vimeo_YAML.yml +23 -11
- data/features/support/fixtures/vcr/YouTube/Generate_YouTube_YAML.yml +970 -0
- data/features/support/vcr.rb +7 -5
- data/features/youtube.feature +20 -0
- data/lib/purdie/bernard.rb +35 -17
- data/lib/purdie/cli.rb +1 -1
- data/lib/purdie/helpers.rb +24 -0
- data/lib/purdie/ingester.rb +25 -10
- data/lib/purdie/services/flickr.rb +48 -5
- data/lib/purdie/services/soundcloud.rb +13 -21
- data/lib/purdie/services/vimeo.rb +4 -3
- data/lib/purdie/services/youtube.rb +64 -0
- data/lib/purdie/source_list.rb +46 -0
- data/lib/purdie/version.rb +1 -1
- data/lib/purdie.rb +4 -21
- data/list +1 -0
- data/purdie.gemspec +3 -1
- data/spec/helpers_spec.rb +31 -0
- data/spec/purdie_spec.rb +0 -24
- data/spec/services/flickr_spec.rb +33 -1
- data/spec/services/soundcloud_spec.rb +10 -8
- data/spec/services/youtube_spec.rb +27 -0
- data/spec/source_list_spec.rb +64 -0
- data/spec/support/fixtures/soundcloud.sounds +4 -0
- data/spec/support/fixtures/with-comments.source +3 -0
- data/spec/support/vcr_setup.rb +3 -1
- data/spec/vcr/Purdie_Services_Flickr/distills_data_for_a_regular_photo.yml +15 -15
- data/spec/vcr/Purdie_Services_Flickr/falls_back_to_the_default_photographer_name.yml +16 -16
- data/spec/vcr/Purdie_Services_Flickr/ingests_data_for_a_photo_without_a_specific_photographer_tag.yml +16 -16
- data/spec/vcr/Purdie_Services_Flickr/resolve_a_set/resolves_a_set_from_a_url.yml +518 -0
- data/spec/vcr/Purdie_Services_SoundCloud/connects_to_SoundCloud.yml +62 -67
- data/spec/vcr/Purdie_Services_SoundCloud/distills_the_data.yml +53 -183
- data/spec/vcr/Purdie_Services_SoundCloud/extracts_a_track.yml +50 -194
- data/spec/vcr/Purdie_Services_SoundCloud/ingests_a_track.yml +48 -186
- data/spec/vcr/Purdie_Services_SoundCloud/resolve_a_set/resolves_a_set_from_a_url.yml +103 -0
- data/spec/vcr/Purdie_Services_Vimeo/gets_a_video.yml +23 -11
- data/spec/vcr/Purdie_Services_Vimeo/ingests_a_video.yml +23 -11
- data/spec/vcr/Purdie_Services_YouTube/gets_a_video.yml +970 -0
- data/spec/vcr/Purdie_Services_YouTube/ingests_a_video.yml +970 -0
- data/spec/vcr/Purdie_SourceList/resolve_sets/constructs_a_list_from_a_set_URL.yml +518 -0
- data/spec/vcr/Purdie_SourceList/resolve_sets/resolves_a_Flickr_set.yml +518 -0
- data/spec/vcr/Purdie_SourceList/resolve_sets/resolves_a_SoundCloud_set.yml +103 -0
- data/spec/vcr/Purdie_SourceList/resolves_a_Flickr_set.yml +518 -0
- data/wtf.log +1 -0
- metadata +81 -14
- data/features/support/fixtures/vcr/Handle_no__sources_directory/Handle_no__sources_directory.yml +0 -346
- data/spec/vcr/Purdie_Services_SoundCloud/deals_with_a_troublesome_bawbag.yml +0 -230
- data/spec/vcr/Purdie_Services_SoundCloud/refines_the_data.yml +0 -230
- data/spec/vcr/Purdie_Services_Vimeo/distills_a_video.yml +0 -41
- data/spec/vcr/Purdie_Services_Vimeo/refines_a_video.yml +0 -41
@@ -7,14 +7,8 @@ module Purdie
|
|
7
7
|
@sc = SoundCloud.new Config.new
|
8
8
|
end
|
9
9
|
|
10
|
-
it '
|
11
|
-
expect(@sc.
|
12
|
-
end
|
13
|
-
|
14
|
-
it 'extracts a track', :vcr do
|
15
|
-
track = @sc.get 'https://soundcloud.com/rawfunkmaharishi/hexaflexagon-1'
|
16
|
-
expect(track).to be_a Hash
|
17
|
-
expect(track['id']). to eq 193008299
|
10
|
+
it 'has a SoundCloud client' do
|
11
|
+
expect(@sc.client.class.name).to eq 'SoundCloud::Client'
|
18
12
|
end
|
19
13
|
|
20
14
|
it 'distills the data', :vcr do
|
@@ -44,6 +38,14 @@ license_url: http://creativecommons.org/licenses/by-nc-sa/4.0/
|
|
44
38
|
"
|
45
39
|
)
|
46
40
|
end
|
41
|
+
|
42
|
+
context 'resolve a set' do
|
43
|
+
it 'resolves a set from a url', :vcr do
|
44
|
+
set = SoundCloud.resolve_set 'https://soundcloud.com/rawfunkmaharishi/sets/islington-academy-sessions'
|
45
|
+
expect(set[0]).to eq 'http://soundcloud.com/rawfunkmaharishi/hexaflexagon-1'
|
46
|
+
expect(set[3]).to eq 'http://soundcloud.com/rawfunkmaharishi/bernard'
|
47
|
+
end
|
48
|
+
end
|
47
49
|
end
|
48
50
|
end
|
49
51
|
end
|
@@ -0,0 +1,27 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
module Purdie
|
4
|
+
module Services
|
5
|
+
describe YouTube do
|
6
|
+
before :each do
|
7
|
+
@yt = YouTube.new Config.new
|
8
|
+
end
|
9
|
+
|
10
|
+
it 'gets a video', :vcr do
|
11
|
+
expect(@yt.get 'https://www.youtube.com/watch?v=JCix1XW329g').to be_a Hash
|
12
|
+
end
|
13
|
+
|
14
|
+
it 'ingests a video', :vcr do
|
15
|
+
@yt.ingest 'https://www.youtube.com/watch?v=JCix1XW329g'
|
16
|
+
expect(@yt[0].to_yaml).to eq(
|
17
|
+
"---
|
18
|
+
title: EMFCamp 2014 Day 3 Lightning talk 6
|
19
|
+
id: JCix1XW329g
|
20
|
+
license: Attribution
|
21
|
+
license_url: https://creativecommons.org/licenses/by/3.0/
|
22
|
+
"
|
23
|
+
)
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
@@ -0,0 +1,64 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
module Purdie
|
4
|
+
describe SourceList do
|
5
|
+
it 'takes a single item' do
|
6
|
+
sl = SourceList.new 'https://soundcloud.com/rawfunkmaharishi/junalbandi-3'
|
7
|
+
expect(sl.count).to eq 1
|
8
|
+
expect(sl[0]).to eq 'https://soundcloud.com/rawfunkmaharishi/junalbandi-3'
|
9
|
+
end
|
10
|
+
|
11
|
+
it 'takes an array' do
|
12
|
+
sources = [
|
13
|
+
'https://soundcloud.com/rawfunkmaharishi/bernard',
|
14
|
+
'https://soundcloud.com/rawfunkmaharishi/junalbandi-3',
|
15
|
+
'https://soundcloud.com/rawfunkmaharishi/beer-of-course-but-why'
|
16
|
+
]
|
17
|
+
sl = SourceList.new sources
|
18
|
+
expect(sl.count).to eq 3
|
19
|
+
expect(sl[0]).to eq 'https://soundcloud.com/rawfunkmaharishi/bernard'
|
20
|
+
end
|
21
|
+
|
22
|
+
context 'resolve sets' do
|
23
|
+
it 'resolves a Flickr set', :vcr do
|
24
|
+
resolved = SourceList.resolve_set 'https://www.flickr.com/photos/pikesley/sets/72157649827363868/'
|
25
|
+
expect(resolved.count).to eq 8
|
26
|
+
expect(resolved[0]).to eq 'https://www.flickr.com/photos/pikesley/16252009191/'
|
27
|
+
expect(resolved[7]).to eq 'https://www.flickr.com/photos/pikesley/16752239531/'
|
28
|
+
end
|
29
|
+
|
30
|
+
it 'resolves a SoundCloud set', :vcr do
|
31
|
+
resolved = SourceList.resolve_set 'https://soundcloud.com/rawfunkmaharishi/sets/islington-academy-sessions'
|
32
|
+
expect(resolved.count).to eq 4
|
33
|
+
end
|
34
|
+
|
35
|
+
it 'constructs a list from a set URL', :vcr do
|
36
|
+
sl = SourceList.new 'https://www.flickr.com/photos/pikesley/sets/72157649827363868/'
|
37
|
+
expect(sl.count).to eq 8
|
38
|
+
expect(sl[0]).to eq 'https://www.flickr.com/photos/pikesley/16252009191/'
|
39
|
+
expect(sl[7]).to eq 'https://www.flickr.com/photos/pikesley/16752239531/'
|
40
|
+
end
|
41
|
+
|
42
|
+
it 'uniques a list when an item appears multiple times' do
|
43
|
+
sources = [
|
44
|
+
'https://soundcloud.com/rawfunkmaharishi/beer-of-course-but-why',
|
45
|
+
'https://soundcloud.com/rawfunkmaharishi/sets/islington-academy-sessions'
|
46
|
+
]
|
47
|
+
sl = SourceList.new sources
|
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'
|
51
|
+
end
|
52
|
+
end
|
53
|
+
|
54
|
+
it 'can be initialiased from a file' do
|
55
|
+
sl = SourceList.from_file 'spec/support/fixtures/soundcloud.sounds'
|
56
|
+
expect(sl[3]).to eq 'https://soundcloud.com/rawfunkmaharishi/funk-taxi-berlin'
|
57
|
+
end
|
58
|
+
|
59
|
+
it 'deals with comments in a source file' do
|
60
|
+
sl = SourceList.from_file 'spec/support/fixtures/with-comments.source'
|
61
|
+
expect(sl.count).to eq 2
|
62
|
+
end
|
63
|
+
end
|
64
|
+
end
|
data/spec/support/vcr_setup.rb
CHANGED
@@ -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="
|
19
|
-
oauth_signature_method="PLAINTEXT", oauth_timestamp="
|
18
|
+
oauth_nonce="a1s4fcdOA5G7mTCo0454DY7ve6eafPzp2v5XbLvkdEM%3D", oauth_signature="<FLICKR_SECRET>%26",
|
19
|
+
oauth_signature_method="PLAINTEXT", oauth_timestamp="1425845861", oauth_token="",
|
20
20
|
oauth_version="1.0"
|
21
21
|
Content-Type:
|
22
22
|
- application/x-www-form-urlencoded
|
@@ -26,7 +26,7 @@ http_interactions:
|
|
26
26
|
message: OK
|
27
27
|
headers:
|
28
28
|
Date:
|
29
|
-
-
|
29
|
+
- Sun, 08 Mar 2015 20:17:41 GMT
|
30
30
|
Content-Type:
|
31
31
|
- application/json
|
32
32
|
Content-Length:
|
@@ -38,14 +38,14 @@ http_interactions:
|
|
38
38
|
Cache-Control:
|
39
39
|
- private
|
40
40
|
X-Served-By:
|
41
|
-
-
|
41
|
+
- www251.flickr.bf1.yahoo.com
|
42
42
|
Vary:
|
43
43
|
- Accept-Encoding
|
44
44
|
Age:
|
45
45
|
- '0'
|
46
46
|
Via:
|
47
|
-
- http/1.1
|
48
|
-
http/1.1
|
47
|
+
- http/1.1 fts102.flickr.bf1.yahoo.com (ApacheTrafficServer/4.0.2 [cMsSf ]),
|
48
|
+
http/1.1 r06.ycpi.ams.yahoo.net (ApacheTrafficServer [cMsSf ])
|
49
49
|
Server:
|
50
50
|
- ATS
|
51
51
|
Connection:
|
@@ -55,10 +55,10 @@ http_interactions:
|
|
55
55
|
string: '{"photo":{"id":"15631479625","secret":"b6168ee903","server":"3933","farm":4,"dateuploaded":"1414326010","isfavorite":0,"license":"1","safety_level":"0","rotation":0,"originalsecret":"3191340cdb","originalformat":"jpg","owner":{"nsid":"128943844@N06","username":"rawfunkmaharishi","realname":"Raw
|
56
56
|
Funk Maharishi","location":"","iconserver":"3933","iconfarm":4,"path_alias":"rawfunkmaharishi"},"title":{"_content":"The
|
57
57
|
Comedy, October 2014"},"description":{"_content":""},"visibility":{"ispublic":1,"isfriend":0,"isfamily":0},"dates":{"posted":"1414326010","taken":"2014-10-22
|
58
|
-
15:54:24","takengranularity":"0","takenunknown":"0","lastupdate":"1416111853"},"views":"
|
58
|
+
15:54:24","takengranularity":"0","takenunknown":"0","lastupdate":"1416111853"},"views":"94","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":[{"id":"128898522-15631479625-1422028","author":"128943844@N06","authorname":"rawfunkmaharishi","raw":"the
|
59
59
|
comedy","_content":"thecomedy","machine_tag":0},{"id":"128898522-15631479625-17975","author":"128943844@N06","authorname":"rawfunkmaharishi","raw":"gigs","_content":"gigs","machine_tag":0},{"id":"128898522-15631479625-228989594","author":"128943844@N06","authorname":"rawfunkmaharishi","raw":"photographer:kim","_content":"photographerkim","machine_tag":0}]},"urls":{"url":[{"type":"photopage","_content":"https:\/\/www.flickr.com\/photos\/rawfunkmaharishi\/15631479625\/"}]},"media":"photo"},"stat":"ok"}'
|
60
60
|
http_version:
|
61
|
-
recorded_at:
|
61
|
+
recorded_at: Sun, 08 Mar 2015 20:17:41 GMT
|
62
62
|
- request:
|
63
63
|
method: post
|
64
64
|
uri: https://api.flickr.com/services/rest/
|
@@ -74,8 +74,8 @@ http_interactions:
|
|
74
74
|
- FlickRaw/0.9.8
|
75
75
|
Authorization:
|
76
76
|
- OAuth realm="https://api.flickr.com/services/rest/", oauth_consumer_key="<FLICKR_API_KEY>",
|
77
|
-
oauth_nonce="
|
78
|
-
oauth_signature_method="PLAINTEXT", oauth_timestamp="
|
77
|
+
oauth_nonce="mlC0dcHRJ0S0u%2F21khM20cA81y4gFgQC6c8qLj3JqnY%3D", oauth_signature="<FLICKR_SECRET>%26",
|
78
|
+
oauth_signature_method="PLAINTEXT", oauth_timestamp="1425845861", oauth_token="",
|
79
79
|
oauth_version="1.0"
|
80
80
|
Content-Type:
|
81
81
|
- application/x-www-form-urlencoded
|
@@ -85,7 +85,7 @@ http_interactions:
|
|
85
85
|
message: OK
|
86
86
|
headers:
|
87
87
|
Date:
|
88
|
-
-
|
88
|
+
- Sun, 08 Mar 2015 20:17:41 GMT
|
89
89
|
Content-Type:
|
90
90
|
- application/json
|
91
91
|
Content-Length:
|
@@ -97,14 +97,14 @@ http_interactions:
|
|
97
97
|
Cache-Control:
|
98
98
|
- private
|
99
99
|
X-Served-By:
|
100
|
-
-
|
100
|
+
- www58.flickr.bf1.yahoo.com
|
101
101
|
Vary:
|
102
102
|
- Accept-Encoding
|
103
103
|
Age:
|
104
104
|
- '0'
|
105
105
|
Via:
|
106
|
-
- http/1.1
|
107
|
-
http/1.1
|
106
|
+
- http/1.1 fts111.flickr.bf1.yahoo.com (ApacheTrafficServer/4.0.2 [cMsSf ]),
|
107
|
+
http/1.1 r06.ycpi.ams.yahoo.net (ApacheTrafficServer [cMsSf ])
|
108
108
|
Server:
|
109
109
|
- ATS
|
110
110
|
Connection:
|
@@ -121,5 +121,5 @@ http_interactions:
|
|
121
121
|
known copyright restrictions","url":"https:\/\/www.flickr.com\/commons\/usage\/"},{"id":"8","name":"United
|
122
122
|
States Government Work","url":"http:\/\/www.usa.gov\/copyright.shtml"}]},"stat":"ok"}'
|
123
123
|
http_version:
|
124
|
-
recorded_at:
|
124
|
+
recorded_at: Sun, 08 Mar 2015 20:17:41 GMT
|
125
125
|
recorded_with: VCR 2.9.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="
|
19
|
-
oauth_signature_method="PLAINTEXT", oauth_timestamp="
|
18
|
+
oauth_nonce="T0%2FZj8bw3BkeQI9Qb9A3fHR745ekZp4Hx2NyoIw1HRo%3D", oauth_signature="<FLICKR_SECRET>%26",
|
19
|
+
oauth_signature_method="PLAINTEXT", oauth_timestamp="1425845861", 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
|
-
-
|
29
|
+
- Sun, 08 Mar 2015 20:17:42 GMT
|
30
30
|
Content-Type:
|
31
31
|
- application/json
|
32
32
|
Content-Length:
|
33
|
-
- '
|
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,14 +38,14 @@ http_interactions:
|
|
38
38
|
Cache-Control:
|
39
39
|
- private
|
40
40
|
X-Served-By:
|
41
|
-
-
|
41
|
+
- www290.flickr.bf1.yahoo.com
|
42
42
|
Vary:
|
43
43
|
- Accept-Encoding
|
44
44
|
Age:
|
45
45
|
- '2'
|
46
46
|
Via:
|
47
|
-
- http/1.1
|
48
|
-
http/1.1
|
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 ])
|
49
49
|
Server:
|
50
50
|
- ATS
|
51
51
|
Connection:
|
@@ -53,9 +53,9 @@ http_interactions:
|
|
53
53
|
body:
|
54
54
|
encoding: ASCII-8BIT
|
55
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":"
|
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"}'
|
57
57
|
http_version:
|
58
|
-
recorded_at:
|
58
|
+
recorded_at: Sun, 08 Mar 2015 20:17:42 GMT
|
59
59
|
- request:
|
60
60
|
method: post
|
61
61
|
uri: https://api.flickr.com/services/rest/
|
@@ -71,8 +71,8 @@ http_interactions:
|
|
71
71
|
- FlickRaw/0.9.8
|
72
72
|
Authorization:
|
73
73
|
- OAuth realm="https://api.flickr.com/services/rest/", oauth_consumer_key="<FLICKR_API_KEY>",
|
74
|
-
oauth_nonce="
|
75
|
-
oauth_signature_method="PLAINTEXT", oauth_timestamp="
|
74
|
+
oauth_nonce="3azzVL2Y5VJi%2FSFsX2QIVsiBxNAHOVJpobxl6Q7ne9o%3D", oauth_signature="<FLICKR_SECRET>%26",
|
75
|
+
oauth_signature_method="PLAINTEXT", oauth_timestamp="1425845862", oauth_token="",
|
76
76
|
oauth_version="1.0"
|
77
77
|
Content-Type:
|
78
78
|
- application/x-www-form-urlencoded
|
@@ -82,7 +82,7 @@ http_interactions:
|
|
82
82
|
message: OK
|
83
83
|
headers:
|
84
84
|
Date:
|
85
|
-
-
|
85
|
+
- Sun, 08 Mar 2015 20:17:42 GMT
|
86
86
|
Content-Type:
|
87
87
|
- application/json
|
88
88
|
Content-Length:
|
@@ -94,14 +94,14 @@ http_interactions:
|
|
94
94
|
Cache-Control:
|
95
95
|
- private
|
96
96
|
X-Served-By:
|
97
|
-
-
|
97
|
+
- www29.flickr.bf1.yahoo.com
|
98
98
|
Vary:
|
99
99
|
- Accept-Encoding
|
100
100
|
Age:
|
101
101
|
- '0'
|
102
102
|
Via:
|
103
|
-
- http/1.1
|
104
|
-
http/1.1
|
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 ])
|
105
105
|
Server:
|
106
106
|
- ATS
|
107
107
|
Connection:
|
@@ -118,5 +118,5 @@ http_interactions:
|
|
118
118
|
known copyright restrictions","url":"https:\/\/www.flickr.com\/commons\/usage\/"},{"id":"8","name":"United
|
119
119
|
States Government Work","url":"http:\/\/www.usa.gov\/copyright.shtml"}]},"stat":"ok"}'
|
120
120
|
http_version:
|
121
|
-
recorded_at:
|
121
|
+
recorded_at: Sun, 08 Mar 2015 20:17:42 GMT
|
122
122
|
recorded_with: VCR 2.9.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="
|
19
|
-
oauth_signature_method="PLAINTEXT", oauth_timestamp="
|
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="",
|
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
|
-
-
|
29
|
+
- Sun, 08 Mar 2015 20:17:40 GMT
|
30
30
|
Content-Type:
|
31
31
|
- application/json
|
32
32
|
Content-Length:
|
33
|
-
- '
|
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,14 +38,14 @@ http_interactions:
|
|
38
38
|
Cache-Control:
|
39
39
|
- private
|
40
40
|
X-Served-By:
|
41
|
-
-
|
41
|
+
- www7.flickr.bf1.yahoo.com
|
42
42
|
Vary:
|
43
43
|
- Accept-Encoding
|
44
44
|
Age:
|
45
45
|
- '0'
|
46
46
|
Via:
|
47
|
-
- http/1.1
|
48
|
-
http/1.1
|
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 ])
|
49
49
|
Server:
|
50
50
|
- ATS
|
51
51
|
Connection:
|
@@ -54,9 +54,9 @@ http_interactions:
|
|
54
54
|
encoding: ASCII-8BIT
|
55
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
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":"
|
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"}'
|
58
58
|
http_version:
|
59
|
-
recorded_at:
|
59
|
+
recorded_at: Sun, 08 Mar 2015 20:17:40 GMT
|
60
60
|
- request:
|
61
61
|
method: post
|
62
62
|
uri: https://api.flickr.com/services/rest/
|
@@ -72,8 +72,8 @@ http_interactions:
|
|
72
72
|
- FlickRaw/0.9.8
|
73
73
|
Authorization:
|
74
74
|
- OAuth realm="https://api.flickr.com/services/rest/", oauth_consumer_key="<FLICKR_API_KEY>",
|
75
|
-
oauth_nonce="
|
76
|
-
oauth_signature_method="PLAINTEXT", oauth_timestamp="
|
75
|
+
oauth_nonce="boov2Wa6DkpsQqDjok%2Fv7VCptew%2FiegvEBwN%2FeTQHIc%3D", oauth_signature="<FLICKR_SECRET>%26",
|
76
|
+
oauth_signature_method="PLAINTEXT", oauth_timestamp="1425845860", oauth_token="",
|
77
77
|
oauth_version="1.0"
|
78
78
|
Content-Type:
|
79
79
|
- application/x-www-form-urlencoded
|
@@ -83,7 +83,7 @@ http_interactions:
|
|
83
83
|
message: OK
|
84
84
|
headers:
|
85
85
|
Date:
|
86
|
-
-
|
86
|
+
- Sun, 08 Mar 2015 20:17:41 GMT
|
87
87
|
Content-Type:
|
88
88
|
- application/json
|
89
89
|
Content-Length:
|
@@ -95,14 +95,14 @@ http_interactions:
|
|
95
95
|
Cache-Control:
|
96
96
|
- private
|
97
97
|
X-Served-By:
|
98
|
-
-
|
98
|
+
- www348.flickr.bf1.yahoo.com
|
99
99
|
Vary:
|
100
100
|
- Accept-Encoding
|
101
101
|
Age:
|
102
102
|
- '2'
|
103
103
|
Via:
|
104
|
-
- http/1.1
|
105
|
-
http/1.1
|
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 ])
|
106
106
|
Server:
|
107
107
|
- ATS
|
108
108
|
Connection:
|
@@ -119,5 +119,5 @@ http_interactions:
|
|
119
119
|
known copyright restrictions","url":"https:\/\/www.flickr.com\/commons\/usage\/"},{"id":"8","name":"United
|
120
120
|
States Government Work","url":"http:\/\/www.usa.gov\/copyright.shtml"}]},"stat":"ok"}'
|
121
121
|
http_version:
|
122
|
-
recorded_at:
|
122
|
+
recorded_at: Sun, 08 Mar 2015 20:17:41 GMT
|
123
123
|
recorded_with: VCR 2.9.3
|