purdie 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +35 -0
- data/config/defaults.yaml +5 -4
- data/features/flickr.feature +1 -1
- data/features/support/fixtures/config/purdie.yaml +4 -0
- data/features/support/fixtures/vcr/Flickr/Generate_Flickr_YAML.yml +16 -71
- data/lib/purdie/bernard.rb +2 -2
- data/lib/purdie/cli.rb +1 -4
- data/lib/purdie/config.rb +4 -3
- data/lib/purdie/services/flickr.rb +4 -4
- data/lib/purdie/version.rb +1 -1
- data/purdie.gemspec +1 -1
- data/spec/config_spec.rb +8 -4
- data/spec/purdie_spec.rb +1 -6
- data/spec/{flickr_spec.rb → services/flickr_spec.rb} +10 -10
- data/spec/{soundcloud_spec.rb → services/soundcloud_spec.rb} +1 -1
- data/spec/support/vcr_setup.rb +0 -3
- data/spec/vcr/Purdie_Services_Flickr/refines_data_for_a_photo_without_a_specific_photographer_tag.yml +123 -0
- data/spec/vcr/Purdie_Services_Flickr/refines_data_for_a_regular_photo.yml +125 -0
- metadata +17 -17
- data/features/support/fixtures/config/purdie +0 -2
- data/spec/vcr/Purdie_Services_Flickr/gets_data_for_a_photo.yml +0 -62
- data/spec/vcr/Purdie_Services_Flickr/refines_data_for_a_photo.yml +0 -180
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9f506aeac630910470e8c9ff3194eb4c8fe15509
|
4
|
+
data.tar.gz: 937d3599999a309580c4c30921f1691e2a2a1910
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c0c09d2b7e5a3baef5863ecce709b1faa1c48067bcb558471d1be312ebb3bdd7c4e335cf3067e123c0709f369661b2ce132030f695201f2eb262127c5c307149
|
7
|
+
data.tar.gz: dd8e7bc5468f2af6800ef6e72b20a002cf444498fdc2d0819222fcb22a959a8186dcb4f4cebba3baa58a83cde1dd1378544571bcb6712ef899aac40627e368c1
|
data/README.md
CHANGED
@@ -5,3 +5,38 @@
|
|
5
5
|
[![Gem Version](http://img.shields.io/gem/v/purdie.svg?style=flat-square)](https://rubygems.org/gems/purdie)
|
6
6
|
[![License](http://img.shields.io/:license-mit-blue.svg?style=flat-square)](http://rawfunkmaharishi.mit-license.org)
|
7
7
|
[![Badges](http://img.shields.io/:badges-7/7-ff6799.svg?style=flat-square)](https://github.com/badges/badgerbadgerbadger)
|
8
|
+
|
9
|
+
#Purdie
|
10
|
+
|
11
|
+
We have music on SoundCloud, photos on Flickr, and videos on Vimeo, and we want to feature them on [http://rawfunkmaharishi.uk/](http://rawfunkmaharishi.uk/). Up until now, this has been managed by curating, by hand (or [very shonky scripts](https://github.com/rawfunkmaharishi/rawfunkmaharishi.github.io/blob/master/flickriser.rb)), [bits](https://github.com/rawfunkmaharishi/rawfunkmaharishi.github.io/blob/master/_data/sounds.yml) [of](https://github.com/rawfunkmaharishi/rawfunkmaharishi.github.io/blob/master/_data/pictures.yml) [YAML](https://github.com/rawfunkmaharishi/rawfunkmaharishi.github.io/blob/master/_data/videos.yml) to feed into Jekyll, but this gets old quickly, especially when you run into things like SoundCloud's decision to only expose the track ID deep inside the embeddable iframe code.
|
12
|
+
|
13
|
+
But you know what, It's 2015 and everything has an API, so let's build a robot to do this stuff properly!
|
14
|
+
|
15
|
+
##The great metadata shift
|
16
|
+
|
17
|
+
Up until now, the Hand-Crafted YAML (which sounds like a thing you may be able to buy at Boxpark) approach has allowed me to be a bit lax with the metadata for our media - some of it's been stored on the various services, some purely in my YAML. In order to make this robot universal, I've had to fill in all the metadata at the places where the files live, which feels like the Right Thing anyway.
|
18
|
+
|
19
|
+
###Moving the hacks upstream
|
20
|
+
|
21
|
+
Moving the metadata is not 100% foolproof, however: for example, we have photos on [our Flickr account](https://www.flickr.com/photos/rawfunkmaharishi/) which were not taken by us, but by our friend [Kim](http://www.kimberlycabbott.com/). But the Flickr API has no way of knowing this, so I've added a tag to those pictures which looks like `photographer:kim` and then I'm looking for and extracting that in this gem. Similarly, for the SoundCloud music, I'd like to tag them with a recording location but this is not supported, so I'm nailing that straight into the _Description_ field.
|
22
|
+
|
23
|
+
Am I going to regret these decisions? Almost certainly.
|
24
|
+
|
25
|
+
##Using it
|
26
|
+
|
27
|
+
You need to set up a *_sources* directory in your Jekyll project, containing files with one-URL-per-line, like this:
|
28
|
+
|
29
|
+
https://soundcloud.com/rawfunkmaharishi/hexaflexagon-1
|
30
|
+
https://soundcloud.com/rawfunkmaharishi/junalbandi-3
|
31
|
+
|
32
|
+
and a *.env* with API keys in it, and then you can run
|
33
|
+
|
34
|
+
purdie fetch
|
35
|
+
|
36
|
+
and it will dump out YAML files into *_data* ready for Jekyll to consume.
|
37
|
+
|
38
|
+
For now, though, please don't. None of my metadata hacks are documented, it's got some very Raw Funk Maharishi-specific lookups nailed into it, the output filenames are hardcoded (so it may well overwrite stuff you care about), there are flickering tests, you'll have a bad time. But soon...
|
39
|
+
|
40
|
+
##Why Purdie?
|
41
|
+
|
42
|
+
Because Bernard Purdie is [amazing](https://www.youtube.com/watch?v=E9E0WxLbqVA&list=PLuPLM2FI60-OIgFTc9YCrGgH5XWGT6znV&index=6)
|
data/config/defaults.yaml
CHANGED
@@ -1,9 +1,10 @@
|
|
1
|
-
source-dir:
|
2
|
-
output-dir:
|
3
|
-
default-title:
|
1
|
+
source-dir: _sources
|
2
|
+
output-dir: _data
|
3
|
+
default-title: Bernard Purdie, the World's most-recorded drummer
|
4
4
|
|
5
5
|
soundcloud:
|
6
|
-
host:
|
6
|
+
host: https://api.soundcloud.com
|
7
|
+
output-file: soundcloud.yml
|
7
8
|
|
8
9
|
license-lookups:
|
9
10
|
cc-by-nc-sa:
|
data/features/flickr.feature
CHANGED
@@ -4,7 +4,7 @@ Feature: Flickr
|
|
4
4
|
Scenario: Generate Flickr YAML
|
5
5
|
Given a file named "_sources/flickr.csv" with:
|
6
6
|
"""
|
7
|
-
https://www.flickr.com/photos/rawfunkmaharishi/15631479625
|
7
|
+
https://www.flickr.com/photos/rawfunkmaharishi/15631479625/
|
8
8
|
"""
|
9
9
|
When I successfully run `purdie fetch`
|
10
10
|
Then a file named "_data/flickr.yaml" should exist
|
@@ -1,60 +1,5 @@
|
|
1
1
|
---
|
2
2
|
http_interactions:
|
3
|
-
- request:
|
4
|
-
method: post
|
5
|
-
uri: https://api.flickr.com/services/rest/
|
6
|
-
body:
|
7
|
-
encoding: US-ASCII
|
8
|
-
string: method=flickr.reflection.getMethods&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="HCu21xn8%2BsCAskIFRx8H6A13e1UpuB8WJ00miJLz6xo%3D", oauth_signature="<FLICKR_SECRET>%26",
|
19
|
-
oauth_signature_method="PLAINTEXT", oauth_timestamp="1425234244", 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
|
-
- Sun, 01 Mar 2015 18:24:05 GMT
|
30
|
-
Content-Type:
|
31
|
-
- application/json
|
32
|
-
Content-Length:
|
33
|
-
- '1428'
|
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
|
-
- www249.flickr.bf1.yahoo.com
|
42
|
-
Vary:
|
43
|
-
- Accept-Encoding
|
44
|
-
Age:
|
45
|
-
- '0'
|
46
|
-
Via:
|
47
|
-
- http/1.1 fts124.flickr.bf1.yahoo.com (ApacheTrafficServer/4.0.2 [cMsSf ]),
|
48
|
-
http/1.1 r06.ycpi.ir2.yahoo.net (ApacheTrafficServer [cMsSf ])
|
49
|
-
Server:
|
50
|
-
- ATS
|
51
|
-
Connection:
|
52
|
-
- keep-alive
|
53
|
-
body:
|
54
|
-
encoding: ASCII-8BIT
|
55
|
-
string: '{"methods":{"method":[{"_content":"flickr.activity.userComments"},{"_content":"flickr.activity.userPhotos"},{"_content":"flickr.auth.checkToken"},{"_content":"flickr.auth.getFrob"},{"_content":"flickr.auth.getFullToken"},{"_content":"flickr.auth.getToken"},{"_content":"flickr.auth.oauth.checkToken"},{"_content":"flickr.auth.oauth.getAccessToken"},{"_content":"flickr.blogs.getList"},{"_content":"flickr.blogs.getServices"},{"_content":"flickr.blogs.postPhoto"},{"_content":"flickr.cameras.getBrandModels"},{"_content":"flickr.cameras.getBrands"},{"_content":"flickr.collections.getInfo"},{"_content":"flickr.collections.getTree"},{"_content":"flickr.commons.getInstitutions"},{"_content":"flickr.contacts.getList"},{"_content":"flickr.contacts.getListRecentlyUploaded"},{"_content":"flickr.contacts.getPublicList"},{"_content":"flickr.contacts.getTaggingSuggestions"},{"_content":"flickr.favorites.add"},{"_content":"flickr.favorites.getContext"},{"_content":"flickr.favorites.getList"},{"_content":"flickr.favorites.getPublicList"},{"_content":"flickr.favorites.remove"},{"_content":"flickr.galleries.addPhoto"},{"_content":"flickr.galleries.create"},{"_content":"flickr.galleries.editMeta"},{"_content":"flickr.galleries.editPhoto"},{"_content":"flickr.galleries.editPhotos"},{"_content":"flickr.galleries.getInfo"},{"_content":"flickr.galleries.getList"},{"_content":"flickr.galleries.getListForPhoto"},{"_content":"flickr.galleries.getPhotos"},{"_content":"flickr.groups.browse"},{"_content":"flickr.groups.discuss.replies.add"},{"_content":"flickr.groups.discuss.replies.delete"},{"_content":"flickr.groups.discuss.replies.edit"},{"_content":"flickr.groups.discuss.replies.getInfo"},{"_content":"flickr.groups.discuss.replies.getList"},{"_content":"flickr.groups.discuss.topics.add"},{"_content":"flickr.groups.discuss.topics.getInfo"},{"_content":"flickr.groups.discuss.topics.getList"},{"_content":"flickr.groups.getInfo"},{"_content":"flickr.groups.join"},{"_content":"flickr.groups.joinRequest"},{"_content":"flickr.groups.leave"},{"_content":"flickr.groups.members.getList"},{"_content":"flickr.groups.pools.add"},{"_content":"flickr.groups.pools.getContext"},{"_content":"flickr.groups.pools.getGroups"},{"_content":"flickr.groups.pools.getPhotos"},{"_content":"flickr.groups.pools.remove"},{"_content":"flickr.groups.search"},{"_content":"flickr.interestingness.getList"},{"_content":"flickr.machinetags.getNamespaces"},{"_content":"flickr.machinetags.getPairs"},{"_content":"flickr.machinetags.getPredicates"},{"_content":"flickr.machinetags.getRecentValues"},{"_content":"flickr.machinetags.getValues"},{"_content":"flickr.panda.getList"},{"_content":"flickr.panda.getPhotos"},{"_content":"flickr.people.findByEmail"},{"_content":"flickr.people.findByUsername"},{"_content":"flickr.people.getGroups"},{"_content":"flickr.people.getInfo"},{"_content":"flickr.people.getLimits"},{"_content":"flickr.people.getPhotos"},{"_content":"flickr.people.getPhotosOf"},{"_content":"flickr.people.getPublicGroups"},{"_content":"flickr.people.getPublicPhotos"},{"_content":"flickr.people.getUploadStatus"},{"_content":"flickr.photos.addTags"},{"_content":"flickr.photos.comments.addComment"},{"_content":"flickr.photos.comments.deleteComment"},{"_content":"flickr.photos.comments.editComment"},{"_content":"flickr.photos.comments.getList"},{"_content":"flickr.photos.comments.getRecentForContacts"},{"_content":"flickr.photos.delete"},{"_content":"flickr.photos.geo.batchCorrectLocation"},{"_content":"flickr.photos.geo.correctLocation"},{"_content":"flickr.photos.geo.getLocation"},{"_content":"flickr.photos.geo.getPerms"},{"_content":"flickr.photos.geo.photosForLocation"},{"_content":"flickr.photos.geo.removeLocation"},{"_content":"flickr.photos.geo.setContext"},{"_content":"flickr.photos.geo.setLocation"},{"_content":"flickr.photos.geo.setPerms"},{"_content":"flickr.photos.getAllContexts"},{"_content":"flickr.photos.getContactsPhotos"},{"_content":"flickr.photos.getContactsPublicPhotos"},{"_content":"flickr.photos.getContext"},{"_content":"flickr.photos.getCounts"},{"_content":"flickr.photos.getExif"},{"_content":"flickr.photos.getFavorites"},{"_content":"flickr.photos.getInfo"},{"_content":"flickr.photos.getNotInSet"},{"_content":"flickr.photos.getPerms"},{"_content":"flickr.photos.getRecent"},{"_content":"flickr.photos.getSizes"},{"_content":"flickr.photos.getUntagged"},{"_content":"flickr.photos.getWithGeoData"},{"_content":"flickr.photos.getWithoutGeoData"},{"_content":"flickr.photos.licenses.getInfo"},{"_content":"flickr.photos.licenses.setLicense"},{"_content":"flickr.photos.notes.add"},{"_content":"flickr.photos.notes.delete"},{"_content":"flickr.photos.notes.edit"},{"_content":"flickr.photos.people.add"},{"_content":"flickr.photos.people.delete"},{"_content":"flickr.photos.people.deleteCoords"},{"_content":"flickr.photos.people.editCoords"},{"_content":"flickr.photos.people.getList"},{"_content":"flickr.photos.recentlyUpdated"},{"_content":"flickr.photos.removeTag"},{"_content":"flickr.photos.search"},{"_content":"flickr.photos.setContentType"},{"_content":"flickr.photos.setDates"},{"_content":"flickr.photos.setMeta"},{"_content":"flickr.photos.setPerms"},{"_content":"flickr.photos.setSafetyLevel"},{"_content":"flickr.photos.setTags"},{"_content":"flickr.photos.suggestions.approveSuggestion"},{"_content":"flickr.photos.suggestions.getList"},{"_content":"flickr.photos.suggestions.rejectSuggestion"},{"_content":"flickr.photos.suggestions.removeSuggestion"},{"_content":"flickr.photos.suggestions.suggestLocation"},{"_content":"flickr.photos.transform.rotate"},{"_content":"flickr.photos.upload.checkTickets"},{"_content":"flickr.photosets.addPhoto"},{"_content":"flickr.photosets.comments.addComment"},{"_content":"flickr.photosets.comments.deleteComment"},{"_content":"flickr.photosets.comments.editComment"},{"_content":"flickr.photosets.comments.getList"},{"_content":"flickr.photosets.create"},{"_content":"flickr.photosets.delete"},{"_content":"flickr.photosets.editMeta"},{"_content":"flickr.photosets.editPhotos"},{"_content":"flickr.photosets.getContext"},{"_content":"flickr.photosets.getInfo"},{"_content":"flickr.photosets.getList"},{"_content":"flickr.photosets.getPhotos"},{"_content":"flickr.photosets.orderSets"},{"_content":"flickr.photosets.removePhoto"},{"_content":"flickr.photosets.removePhotos"},{"_content":"flickr.photosets.reorderPhotos"},{"_content":"flickr.photosets.setPrimaryPhoto"},{"_content":"flickr.places.find"},{"_content":"flickr.places.findByLatLon"},{"_content":"flickr.places.getChildrenWithPhotosPublic"},{"_content":"flickr.places.getInfo"},{"_content":"flickr.places.getInfoByUrl"},{"_content":"flickr.places.getPlaceTypes"},{"_content":"flickr.places.getShapeHistory"},{"_content":"flickr.places.getTopPlacesList"},{"_content":"flickr.places.placesForBoundingBox"},{"_content":"flickr.places.placesForContacts"},{"_content":"flickr.places.placesForTags"},{"_content":"flickr.places.placesForUser"},{"_content":"flickr.places.resolvePlaceId"},{"_content":"flickr.places.resolvePlaceURL"},{"_content":"flickr.places.tagsForPlace"},{"_content":"flickr.prefs.getContentType"},{"_content":"flickr.prefs.getGeoPerms"},{"_content":"flickr.prefs.getHidden"},{"_content":"flickr.prefs.getPrivacy"},{"_content":"flickr.prefs.getSafetyLevel"},{"_content":"flickr.push.getSubscriptions"},{"_content":"flickr.push.getTopics"},{"_content":"flickr.push.subscribe"},{"_content":"flickr.push.unsubscribe"},{"_content":"flickr.reflection.getMethodInfo"},{"_content":"flickr.reflection.getMethods"},{"_content":"flickr.stats.getCollectionDomains"},{"_content":"flickr.stats.getCollectionReferrers"},{"_content":"flickr.stats.getCollectionStats"},{"_content":"flickr.stats.getCSVFiles"},{"_content":"flickr.stats.getPhotoDomains"},{"_content":"flickr.stats.getPhotoReferrers"},{"_content":"flickr.stats.getPhotosetDomains"},{"_content":"flickr.stats.getPhotosetReferrers"},{"_content":"flickr.stats.getPhotosetStats"},{"_content":"flickr.stats.getPhotoStats"},{"_content":"flickr.stats.getPhotostreamDomains"},{"_content":"flickr.stats.getPhotostreamReferrers"},{"_content":"flickr.stats.getPhotostreamStats"},{"_content":"flickr.stats.getPopularPhotos"},{"_content":"flickr.stats.getTotalViews"},{"_content":"flickr.tags.getClusterPhotos"},{"_content":"flickr.tags.getClusters"},{"_content":"flickr.tags.getHotList"},{"_content":"flickr.tags.getListPhoto"},{"_content":"flickr.tags.getListUser"},{"_content":"flickr.tags.getListUserPopular"},{"_content":"flickr.tags.getListUserRaw"},{"_content":"flickr.tags.getMostFrequentlyUsed"},{"_content":"flickr.tags.getRelated"},{"_content":"flickr.test.echo"},{"_content":"flickr.test.login"},{"_content":"flickr.test.null"},{"_content":"flickr.urls.getGroup"},{"_content":"flickr.urls.getUserPhotos"},{"_content":"flickr.urls.getUserProfile"},{"_content":"flickr.urls.lookupGallery"},{"_content":"flickr.urls.lookupGroup"},{"_content":"flickr.urls.lookupUser"}]},"stat":"ok"}'
|
56
|
-
http_version:
|
57
|
-
recorded_at: Sun, 01 Mar 2015 18:24:05 GMT
|
58
3
|
- request:
|
59
4
|
method: post
|
60
5
|
uri: https://api.flickr.com/services/rest/
|
@@ -70,8 +15,8 @@ http_interactions:
|
|
70
15
|
- FlickRaw/0.9.8
|
71
16
|
Authorization:
|
72
17
|
- OAuth realm="https://api.flickr.com/services/rest/", oauth_consumer_key="<FLICKR_API_KEY>",
|
73
|
-
oauth_nonce="
|
74
|
-
oauth_signature_method="PLAINTEXT", oauth_timestamp="
|
18
|
+
oauth_nonce="v7zr90fYXXzMro5%2FWLOHPQAxDfRkRUu7nWZELKIRfrs%3D", oauth_signature="<FLICKR_SECRET>%26",
|
19
|
+
oauth_signature_method="PLAINTEXT", oauth_timestamp="1425290381", oauth_token="",
|
75
20
|
oauth_version="1.0"
|
76
21
|
Content-Type:
|
77
22
|
- application/x-www-form-urlencoded
|
@@ -81,7 +26,7 @@ http_interactions:
|
|
81
26
|
message: OK
|
82
27
|
headers:
|
83
28
|
Date:
|
84
|
-
-
|
29
|
+
- Mon, 02 Mar 2015 09:59:42 GMT
|
85
30
|
Content-Type:
|
86
31
|
- application/json
|
87
32
|
Content-Length:
|
@@ -93,14 +38,14 @@ http_interactions:
|
|
93
38
|
Cache-Control:
|
94
39
|
- private
|
95
40
|
X-Served-By:
|
96
|
-
-
|
41
|
+
- www330.flickr.bf1.yahoo.com
|
97
42
|
Vary:
|
98
43
|
- Accept-Encoding
|
99
44
|
Age:
|
100
|
-
- '
|
45
|
+
- '1'
|
101
46
|
Via:
|
102
|
-
- http/1.1
|
103
|
-
http/1.1
|
47
|
+
- http/1.1 fts115.flickr.bf1.yahoo.com (ApacheTrafficServer/4.0.2 [cMsSf ]),
|
48
|
+
http/1.1 r17.ycpi.dea.yahoo.net (ApacheTrafficServer [cMsSf ])
|
104
49
|
Server:
|
105
50
|
- ATS
|
106
51
|
Connection:
|
@@ -110,10 +55,10 @@ http_interactions:
|
|
110
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
|
111
56
|
Funk Maharishi","location":"","iconserver":"3933","iconfarm":4,"path_alias":"rawfunkmaharishi"},"title":{"_content":"The
|
112
57
|
Comedy, October 2014"},"description":{"_content":""},"visibility":{"ispublic":1,"isfriend":0,"isfamily":0},"dates":{"posted":"1414326010","taken":"2014-10-22
|
113
|
-
15:54:24","takengranularity":"0","takenunknown":"0","lastupdate":"1416111853"},"views":"
|
58
|
+
15:54:24","takengranularity":"0","takenunknown":"0","lastupdate":"1416111853"},"views":"92","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
|
114
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"}'
|
115
60
|
http_version:
|
116
|
-
recorded_at:
|
61
|
+
recorded_at: Mon, 02 Mar 2015 09:59:42 GMT
|
117
62
|
- request:
|
118
63
|
method: post
|
119
64
|
uri: https://api.flickr.com/services/rest/
|
@@ -129,8 +74,8 @@ http_interactions:
|
|
129
74
|
- FlickRaw/0.9.8
|
130
75
|
Authorization:
|
131
76
|
- OAuth realm="https://api.flickr.com/services/rest/", oauth_consumer_key="<FLICKR_API_KEY>",
|
132
|
-
oauth_nonce="
|
133
|
-
oauth_signature_method="PLAINTEXT", oauth_timestamp="
|
77
|
+
oauth_nonce="PKyYl0JL6%2BViCo7u4SpYJRBix10MiOKoT3NeVOyhZyU%3D", oauth_signature="<FLICKR_SECRET>%26",
|
78
|
+
oauth_signature_method="PLAINTEXT", oauth_timestamp="1425290382", oauth_token="",
|
134
79
|
oauth_version="1.0"
|
135
80
|
Content-Type:
|
136
81
|
- application/x-www-form-urlencoded
|
@@ -140,7 +85,7 @@ http_interactions:
|
|
140
85
|
message: OK
|
141
86
|
headers:
|
142
87
|
Date:
|
143
|
-
-
|
88
|
+
- Mon, 02 Mar 2015 09:59:42 GMT
|
144
89
|
Content-Type:
|
145
90
|
- application/json
|
146
91
|
Content-Length:
|
@@ -152,14 +97,14 @@ http_interactions:
|
|
152
97
|
Cache-Control:
|
153
98
|
- private
|
154
99
|
X-Served-By:
|
155
|
-
-
|
100
|
+
- www302.flickr.bf1.yahoo.com
|
156
101
|
Vary:
|
157
102
|
- Accept-Encoding
|
158
103
|
Age:
|
159
104
|
- '0'
|
160
105
|
Via:
|
161
|
-
- http/1.1
|
162
|
-
http/1.1
|
106
|
+
- http/1.1 fts122.flickr.bf1.yahoo.com (ApacheTrafficServer/4.0.2 [cMsSf ]),
|
107
|
+
http/1.1 r12.ycpi.dea.yahoo.net (ApacheTrafficServer [cMsSf ])
|
163
108
|
Server:
|
164
109
|
- ATS
|
165
110
|
Connection:
|
@@ -176,5 +121,5 @@ http_interactions:
|
|
176
121
|
known copyright restrictions","url":"https:\/\/www.flickr.com\/commons\/usage\/"},{"id":"8","name":"United
|
177
122
|
States Government Work","url":"http:\/\/www.usa.gov\/copyright.shtml"}]},"stat":"ok"}'
|
178
123
|
http_version:
|
179
|
-
recorded_at:
|
124
|
+
recorded_at: Mon, 02 Mar 2015 09:59:42 GMT
|
180
125
|
recorded_with: VCR 2.9.3
|
data/lib/purdie/bernard.rb
CHANGED
data/lib/purdie/cli.rb
CHANGED
@@ -9,11 +9,8 @@ module Purdie
|
|
9
9
|
map %w(-v --version) => :version
|
10
10
|
|
11
11
|
desc 'fetch', 'Fetch the data'
|
12
|
-
method_option :config,
|
13
|
-
:aliases => '-c',
|
14
|
-
:desc => 'Specify config file'
|
15
12
|
def fetch
|
16
|
-
b = Bernard.new
|
13
|
+
b = Bernard.new
|
17
14
|
b.fetch
|
18
15
|
end
|
19
16
|
end
|
data/lib/purdie/config.rb
CHANGED
@@ -2,11 +2,12 @@ require 'purdie'
|
|
2
2
|
|
3
3
|
module Purdie
|
4
4
|
class Config
|
5
|
-
def initialize
|
5
|
+
def initialize
|
6
6
|
@conf = YAML.load File.read File.join(File.dirname(__FILE__), '..', '..', 'config/defaults.yaml')
|
7
7
|
|
8
|
-
if
|
9
|
-
|
8
|
+
if File.exists? File.join(File.dirname(__FILE__), '..', '..', 'config/purdie.yaml')
|
9
|
+
y = YAML.load File.read File.join(File.dirname(__FILE__), '..', '..', 'config/purdie.yaml')
|
10
|
+
@conf.deep_merge! y
|
10
11
|
end
|
11
12
|
end
|
12
13
|
|
@@ -1,5 +1,5 @@
|
|
1
1
|
require 'purdie'
|
2
|
-
require 'flickraw'
|
2
|
+
require 'flickraw-cached'
|
3
3
|
|
4
4
|
Dotenv.load
|
5
5
|
|
@@ -14,13 +14,13 @@ module Purdie
|
|
14
14
|
end
|
15
15
|
|
16
16
|
def get_photo url
|
17
|
-
u = url.split(',')
|
18
|
-
@photographer = u[1]
|
19
|
-
url = u[0]
|
20
17
|
url.strip!
|
21
18
|
url = url[0..-2] if url[-1] == '/'
|
22
19
|
id = url.split('/')[-1].to_i
|
23
20
|
|
21
|
+
# require 'pry'
|
22
|
+
# binding.pry
|
23
|
+
# flickr = FlickRaw::Flickr.new
|
24
24
|
flickr.photos.getInfo(photo_id: id)
|
25
25
|
end
|
26
26
|
|
data/lib/purdie/version.rb
CHANGED
data/purdie.gemspec
CHANGED
@@ -22,7 +22,7 @@ Gem::Specification.new do |spec|
|
|
22
22
|
spec.add_dependency 'httparty', '~> 0.13'
|
23
23
|
spec.add_dependency 'deep_merge', '~> 1.0'
|
24
24
|
spec.add_dependency 'dotenv', '~> 1.0'
|
25
|
-
spec.add_dependency 'flickraw', '
|
25
|
+
spec.add_dependency 'flickraw-cached', '= 20120701'
|
26
26
|
|
27
27
|
spec.add_development_dependency 'bundler', '~> 1.7'
|
28
28
|
spec.add_development_dependency 'rake', '~> 10.0'
|
data/spec/config_spec.rb
CHANGED
@@ -7,10 +7,14 @@ module Purdie
|
|
7
7
|
expect(c['output-dir']).to eq '_data'
|
8
8
|
end
|
9
9
|
|
10
|
-
it '
|
11
|
-
|
12
|
-
|
13
|
-
|
10
|
+
it 'reads a local config file' do
|
11
|
+
FileUtils.cp File.join(File.dirname(__FILE__), '..', 'features/support/fixtures/config/purdie.yaml'),
|
12
|
+
File.join(File.dirname(__FILE__), '..', 'config/purdie.yaml')
|
13
|
+
|
14
|
+
c = Config.new
|
15
|
+
expect(c['default-title']).to eq 'Raw Funk Maharishi'
|
16
|
+
|
17
|
+
FileUtils.rm File.join(File.dirname(__FILE__), '..', 'config/purdie.yaml')
|
14
18
|
end
|
15
19
|
end
|
16
20
|
end
|
data/spec/purdie_spec.rb
CHANGED
@@ -3,15 +3,10 @@ require 'spec_helper'
|
|
3
3
|
module Purdie
|
4
4
|
describe Bernard do
|
5
5
|
it 'has config' do
|
6
|
-
b = Bernard.new
|
7
|
-
expect(b.config['soundcloud']['client_id']).to eq 123456
|
6
|
+
b = Bernard.new
|
8
7
|
expect(b.config['output-dir']).to eq '_data'
|
9
8
|
end
|
10
9
|
|
11
|
-
# it 'connects to soundcloud', :vcr do
|
12
|
-
# b = Bernard.new File.join(File.dirname(__FILE__), '..', '.purdie')
|
13
|
-
# end
|
14
|
-
|
15
10
|
it 'strips a scheme' do
|
16
11
|
expect(Purdie.strip_scheme 'http://foo.bar/stuff').to eq 'foo.bar/stuff'
|
17
12
|
expect(Purdie.strip_scheme 'https://bar.foo/stuff').to eq 'bar.foo/stuff'
|
@@ -3,20 +3,20 @@ require 'spec_helper'
|
|
3
3
|
module Purdie
|
4
4
|
module Services
|
5
5
|
describe Flickr do
|
6
|
-
before :
|
7
|
-
|
8
|
-
|
6
|
+
before :all do
|
7
|
+
FileUtils.cp File.join(File.dirname(__FILE__), '..', '..', 'features/support/fixtures/config/purdie.yaml'),
|
8
|
+
File.join(File.dirname(__FILE__), '..', '..', 'config/purdie.yaml')
|
9
9
|
end
|
10
10
|
|
11
|
-
|
12
|
-
|
11
|
+
before :each do
|
12
|
+
@f = Flickr.new Config.new
|
13
13
|
end
|
14
14
|
|
15
|
-
|
16
|
-
|
17
|
-
|
15
|
+
after :all do
|
16
|
+
FileUtils.rm File.join(File.dirname(__FILE__), '..', '..', 'config/purdie.yaml')
|
17
|
+
end
|
18
18
|
|
19
|
-
it 'refines data for a photo', :vcr do
|
19
|
+
it 'refines data for a regular photo', :vcr do
|
20
20
|
expect(@f.refine 'https://www.flickr.com/photos/rawfunkmaharishi/15631479625/').to eq({
|
21
21
|
"title"=>"The Comedy, October 2014",
|
22
22
|
"date"=>"2014-10-22",
|
@@ -28,7 +28,7 @@ module Purdie
|
|
28
28
|
})
|
29
29
|
end
|
30
30
|
|
31
|
-
it 'refines data for a photo without a specific
|
31
|
+
it 'refines data for a photo without a specific photographer tag', :vcr do
|
32
32
|
expect(@f.refine 'https://www.flickr.com/photos/cluttercup/15950875724/').to eq ({
|
33
33
|
"title"=>"Raw Funk Maharishi",
|
34
34
|
"date"=>"2015-02-18",
|
data/spec/support/vcr_setup.rb
CHANGED
@@ -1,12 +1,9 @@
|
|
1
1
|
require 'vcr'
|
2
2
|
|
3
3
|
VCR.configure do |c|
|
4
|
-
#the directory where your cassettes will be saved
|
5
4
|
c.cassette_library_dir = 'spec/vcr'
|
6
|
-
# your HTTP request service. You can also use fakeweb, webmock, and more
|
7
5
|
c.hook_into :webmock
|
8
6
|
c.default_cassette_options = { :record => :once }
|
9
|
-
c.debug_logger = File.open('/tmp/wtfvcr', 'w')
|
10
7
|
c.allow_http_connections_when_no_cassette = true
|
11
8
|
|
12
9
|
[
|
@@ -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=15950875724&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="XboHFofj%2FWNn%2FR0ZvWBUKPb0nRq7Kt%2BentdGloK3XBY%3D", oauth_signature="<FLICKR_SECRET>%26",
|
19
|
+
oauth_signature_method="PLAINTEXT", oauth_timestamp="1425290288", 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
|
+
- Mon, 02 Mar 2015 09:58:08 GMT
|
30
|
+
Content-Type:
|
31
|
+
- application/json
|
32
|
+
Content-Length:
|
33
|
+
- '543'
|
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
|
+
- www43.flickr.bf1.yahoo.com
|
42
|
+
Vary:
|
43
|
+
- Accept-Encoding
|
44
|
+
Age:
|
45
|
+
- '0'
|
46
|
+
Via:
|
47
|
+
- http/1.1 fts109.flickr.bf1.yahoo.com (ApacheTrafficServer/4.0.2 [cMsSf ]),
|
48
|
+
http/1.1 r18.ycpi.dea.yahoo.net (ApacheTrafficServer [cMsSf ])
|
49
|
+
Server:
|
50
|
+
- ATS
|
51
|
+
Connection:
|
52
|
+
- keep-alive
|
53
|
+
body:
|
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":"37","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
|
+
http_version:
|
59
|
+
recorded_at: Mon, 02 Mar 2015 09:58:08 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="66UyhqjjjhtG%2FbEKieinacvaJHwlT2wHR3m%2BHolGyno%3D", oauth_signature="<FLICKR_SECRET>%26",
|
76
|
+
oauth_signature_method="PLAINTEXT", oauth_timestamp="1425290288", 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
|
+
- Mon, 02 Mar 2015 09:58:09 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
|
+
- www290.flickr.bf1.yahoo.com
|
99
|
+
Vary:
|
100
|
+
- Accept-Encoding
|
101
|
+
Age:
|
102
|
+
- '2'
|
103
|
+
Via:
|
104
|
+
- http/1.1 fts121.flickr.bf1.yahoo.com (ApacheTrafficServer/4.0.2 [cMsSf ]),
|
105
|
+
http/1.1 r10.ycpi.dea.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: Mon, 02 Mar 2015 09:58:09 GMT
|
123
|
+
recorded_with: VCR 2.9.3
|
@@ -0,0 +1,125 @@
|
|
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=15631479625&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="mpd%2Fmo8bVVoGeGsq9ZzlC5VBarCGfDw%2FpxzmC5W92SA%3D", oauth_signature="<FLICKR_SECRET>%26",
|
19
|
+
oauth_signature_method="PLAINTEXT", oauth_timestamp="1425290287", 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
|
+
- Mon, 02 Mar 2015 09:58:08 GMT
|
30
|
+
Content-Type:
|
31
|
+
- application/json
|
32
|
+
Content-Length:
|
33
|
+
- '665'
|
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
|
+
- www13.flickr.bf1.yahoo.com
|
42
|
+
Vary:
|
43
|
+
- Accept-Encoding
|
44
|
+
Age:
|
45
|
+
- '1'
|
46
|
+
Via:
|
47
|
+
- http/1.1 fts113.flickr.bf1.yahoo.com (ApacheTrafficServer/4.0.2 [cMsSf ]),
|
48
|
+
http/1.1 r03.ycpi.dea.yahoo.net (ApacheTrafficServer [cMsSf ])
|
49
|
+
Server:
|
50
|
+
- ATS
|
51
|
+
Connection:
|
52
|
+
- keep-alive
|
53
|
+
body:
|
54
|
+
encoding: ASCII-8BIT
|
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
|
+
Funk Maharishi","location":"","iconserver":"3933","iconfarm":4,"path_alias":"rawfunkmaharishi"},"title":{"_content":"The
|
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":"92","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
|
+
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
|
+
http_version:
|
61
|
+
recorded_at: Mon, 02 Mar 2015 09:58:08 GMT
|
62
|
+
- request:
|
63
|
+
method: post
|
64
|
+
uri: https://api.flickr.com/services/rest/
|
65
|
+
body:
|
66
|
+
encoding: US-ASCII
|
67
|
+
string: method=flickr.photos.licenses.getInfo&format=json&nojsoncallback=1
|
68
|
+
headers:
|
69
|
+
Accept-Encoding:
|
70
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
71
|
+
Accept:
|
72
|
+
- "*/*"
|
73
|
+
User-Agent:
|
74
|
+
- FlickRaw/0.9.8
|
75
|
+
Authorization:
|
76
|
+
- OAuth realm="https://api.flickr.com/services/rest/", oauth_consumer_key="<FLICKR_API_KEY>",
|
77
|
+
oauth_nonce="YsGosyDRjrMwLD4aK3bZ6CkhzAkvkJGICXOsA5zB2z0%3D", oauth_signature="<FLICKR_SECRET>%26",
|
78
|
+
oauth_signature_method="PLAINTEXT", oauth_timestamp="1425290288", oauth_token="",
|
79
|
+
oauth_version="1.0"
|
80
|
+
Content-Type:
|
81
|
+
- application/x-www-form-urlencoded
|
82
|
+
response:
|
83
|
+
status:
|
84
|
+
code: 200
|
85
|
+
message: OK
|
86
|
+
headers:
|
87
|
+
Date:
|
88
|
+
- Mon, 02 Mar 2015 09:58:08 GMT
|
89
|
+
Content-Type:
|
90
|
+
- application/json
|
91
|
+
Content-Length:
|
92
|
+
- '314'
|
93
|
+
P3p:
|
94
|
+
- policyref="http://info.yahoo.com/w3c/p3p.xml", CP="CAO DSP COR CUR ADM DEV
|
95
|
+
TAI PSA PSD IVAi IVDi CONi TELo OTPi OUR DELi SAMi OTRi UNRi PUBi IND PHY
|
96
|
+
ONL UNI PUR FIN COM NAV INT DEM CNT STA POL HEA PRE LOC GOV"
|
97
|
+
Cache-Control:
|
98
|
+
- private
|
99
|
+
X-Served-By:
|
100
|
+
- www250.flickr.bf1.yahoo.com
|
101
|
+
Vary:
|
102
|
+
- Accept-Encoding
|
103
|
+
Age:
|
104
|
+
- '0'
|
105
|
+
Via:
|
106
|
+
- http/1.1 fts123.flickr.bf1.yahoo.com (ApacheTrafficServer/4.0.2 [cMsSf ]),
|
107
|
+
http/1.1 r12.ycpi.dea.yahoo.net (ApacheTrafficServer [cMsSf ])
|
108
|
+
Server:
|
109
|
+
- ATS
|
110
|
+
Connection:
|
111
|
+
- keep-alive
|
112
|
+
body:
|
113
|
+
encoding: ASCII-8BIT
|
114
|
+
string: '{"licenses":{"license":[{"id":"0","name":"All Rights Reserved","url":""},{"id":"4","name":"Attribution
|
115
|
+
License","url":"https:\/\/creativecommons.org\/licenses\/by\/2.0\/"},{"id":"6","name":"Attribution-NoDerivs
|
116
|
+
License","url":"https:\/\/creativecommons.org\/licenses\/by-nd\/2.0\/"},{"id":"3","name":"Attribution-NonCommercial-NoDerivs
|
117
|
+
License","url":"https:\/\/creativecommons.org\/licenses\/by-nc-nd\/2.0\/"},{"id":"2","name":"Attribution-NonCommercial
|
118
|
+
License","url":"https:\/\/creativecommons.org\/licenses\/by-nc\/2.0\/"},{"id":"1","name":"Attribution-NonCommercial-ShareAlike
|
119
|
+
License","url":"https:\/\/creativecommons.org\/licenses\/by-nc-sa\/2.0\/"},{"id":"5","name":"Attribution-ShareAlike
|
120
|
+
License","url":"https:\/\/creativecommons.org\/licenses\/by-sa\/2.0\/"},{"id":"7","name":"No
|
121
|
+
known copyright restrictions","url":"https:\/\/www.flickr.com\/commons\/usage\/"},{"id":"8","name":"United
|
122
|
+
States Government Work","url":"http:\/\/www.usa.gov\/copyright.shtml"}]},"stat":"ok"}'
|
123
|
+
http_version:
|
124
|
+
recorded_at: Mon, 02 Mar 2015 09:58:08 GMT
|
125
|
+
recorded_with: VCR 2.9.3
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: purdie
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- pikesley
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-03-
|
11
|
+
date: 2015-03-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|
@@ -67,19 +67,19 @@ dependencies:
|
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '1.0'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
|
-
name: flickraw
|
70
|
+
name: flickraw-cached
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
|
-
- -
|
73
|
+
- - '='
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: '
|
75
|
+
version: '20120701'
|
76
76
|
type: :runtime
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
|
-
- -
|
80
|
+
- - '='
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version: '
|
82
|
+
version: '20120701'
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: bundler
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
@@ -272,7 +272,7 @@ files:
|
|
272
272
|
- features/soundcloud.feature
|
273
273
|
- features/step_definitions/purdie_steps.rb
|
274
274
|
- features/support/env.rb
|
275
|
-
- features/support/fixtures/config/purdie
|
275
|
+
- features/support/fixtures/config/purdie.yaml
|
276
276
|
- features/support/fixtures/vcr/Flickr/Generate_Flickr_YAML.yml
|
277
277
|
- features/support/fixtures/vcr/Purdie/Generate_several_YAML.yml
|
278
278
|
- features/support/fixtures/vcr/Soundcloud/Generate_SoundCloud_YAML.yml
|
@@ -288,13 +288,13 @@ files:
|
|
288
288
|
- lib/purdie/version.rb
|
289
289
|
- purdie.gemspec
|
290
290
|
- spec/config_spec.rb
|
291
|
-
- spec/flickr_spec.rb
|
292
291
|
- spec/purdie_spec.rb
|
293
|
-
- spec/
|
292
|
+
- spec/services/flickr_spec.rb
|
293
|
+
- spec/services/soundcloud_spec.rb
|
294
294
|
- spec/spec_helper.rb
|
295
295
|
- spec/support/vcr_setup.rb
|
296
|
-
- spec/vcr/Purdie_Services_Flickr/
|
297
|
-
- spec/vcr/Purdie_Services_Flickr/
|
296
|
+
- spec/vcr/Purdie_Services_Flickr/refines_data_for_a_photo_without_a_specific_photographer_tag.yml
|
297
|
+
- spec/vcr/Purdie_Services_Flickr/refines_data_for_a_regular_photo.yml
|
298
298
|
- spec/vcr/Purdie_Services_SoundCloud/connects_to_SoundCloud.yml
|
299
299
|
homepage: ''
|
300
300
|
licenses:
|
@@ -327,7 +327,7 @@ test_files:
|
|
327
327
|
- features/soundcloud.feature
|
328
328
|
- features/step_definitions/purdie_steps.rb
|
329
329
|
- features/support/env.rb
|
330
|
-
- features/support/fixtures/config/purdie
|
330
|
+
- features/support/fixtures/config/purdie.yaml
|
331
331
|
- features/support/fixtures/vcr/Flickr/Generate_Flickr_YAML.yml
|
332
332
|
- features/support/fixtures/vcr/Purdie/Generate_several_YAML.yml
|
333
333
|
- features/support/fixtures/vcr/Soundcloud/Generate_SoundCloud_YAML.yml
|
@@ -335,11 +335,11 @@ test_files:
|
|
335
335
|
- features/support/hooks.rb
|
336
336
|
- features/support/vcr.rb
|
337
337
|
- spec/config_spec.rb
|
338
|
-
- spec/flickr_spec.rb
|
339
338
|
- spec/purdie_spec.rb
|
340
|
-
- spec/
|
339
|
+
- spec/services/flickr_spec.rb
|
340
|
+
- spec/services/soundcloud_spec.rb
|
341
341
|
- spec/spec_helper.rb
|
342
342
|
- spec/support/vcr_setup.rb
|
343
|
-
- spec/vcr/Purdie_Services_Flickr/
|
344
|
-
- spec/vcr/Purdie_Services_Flickr/
|
343
|
+
- spec/vcr/Purdie_Services_Flickr/refines_data_for_a_photo_without_a_specific_photographer_tag.yml
|
344
|
+
- spec/vcr/Purdie_Services_Flickr/refines_data_for_a_regular_photo.yml
|
345
345
|
- spec/vcr/Purdie_Services_SoundCloud/connects_to_SoundCloud.yml
|
@@ -1,62 +0,0 @@
|
|
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=15631479625&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="wRyC3pdWuwDJeUaUX0VHbAlh2so7WMk0HucuyvhrptQ%3D", oauth_signature="<FLICKR_SECRET>%26",
|
19
|
-
oauth_signature_method="PLAINTEXT", oauth_timestamp="1425168000", 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
|
-
- Sun, 01 Mar 2015 17:57:41 GMT
|
30
|
-
Content-Type:
|
31
|
-
- application/json
|
32
|
-
Content-Length:
|
33
|
-
- '665'
|
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
|
-
- www18.flickr.bf1.yahoo.com
|
42
|
-
Vary:
|
43
|
-
- Accept-Encoding
|
44
|
-
Age:
|
45
|
-
- '0'
|
46
|
-
Via:
|
47
|
-
- http/1.1 fts123.flickr.bf1.yahoo.com (ApacheTrafficServer/4.0.2 [cMsSf ]),
|
48
|
-
http/1.1 r11.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":"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
|
-
Funk Maharishi","location":"","iconserver":"3933","iconfarm":4,"path_alias":"rawfunkmaharishi"},"title":{"_content":"The
|
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":"91","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
|
-
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
|
-
http_version:
|
61
|
-
recorded_at: Sun, 01 Mar 2015 00:00:00 GMT
|
62
|
-
recorded_with: VCR 2.9.3
|
@@ -1,180 +0,0 @@
|
|
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: method=flickr.reflection.getMethods&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="YtoM2yiIL%2BHapnhczCF06LVjFU1S81BYOcZ04LnLyRk%3D", oauth_signature="<FLICKR_SECRET>%26",
|
19
|
-
oauth_signature_method="PLAINTEXT", oauth_timestamp="1425168000", 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
|
-
- Sun, 01 Mar 2015 17:57:40 GMT
|
30
|
-
Content-Type:
|
31
|
-
- application/json
|
32
|
-
Content-Length:
|
33
|
-
- '1428'
|
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
|
-
- www248.flickr.bf1.yahoo.com
|
42
|
-
Vary:
|
43
|
-
- Accept-Encoding
|
44
|
-
Age:
|
45
|
-
- '0'
|
46
|
-
Via:
|
47
|
-
- http/1.1 fts115.flickr.bf1.yahoo.com (ApacheTrafficServer/4.0.2 [cMsSf ]),
|
48
|
-
http/1.1 r18.ycpi.ams.yahoo.net (ApacheTrafficServer [cMsSf ])
|
49
|
-
Server:
|
50
|
-
- ATS
|
51
|
-
Connection:
|
52
|
-
- keep-alive
|
53
|
-
body:
|
54
|
-
encoding: ASCII-8BIT
|
55
|
-
string: '{"methods":{"method":[{"_content":"flickr.activity.userComments"},{"_content":"flickr.activity.userPhotos"},{"_content":"flickr.auth.checkToken"},{"_content":"flickr.auth.getFrob"},{"_content":"flickr.auth.getFullToken"},{"_content":"flickr.auth.getToken"},{"_content":"flickr.auth.oauth.checkToken"},{"_content":"flickr.auth.oauth.getAccessToken"},{"_content":"flickr.blogs.getList"},{"_content":"flickr.blogs.getServices"},{"_content":"flickr.blogs.postPhoto"},{"_content":"flickr.cameras.getBrandModels"},{"_content":"flickr.cameras.getBrands"},{"_content":"flickr.collections.getInfo"},{"_content":"flickr.collections.getTree"},{"_content":"flickr.commons.getInstitutions"},{"_content":"flickr.contacts.getList"},{"_content":"flickr.contacts.getListRecentlyUploaded"},{"_content":"flickr.contacts.getPublicList"},{"_content":"flickr.contacts.getTaggingSuggestions"},{"_content":"flickr.favorites.add"},{"_content":"flickr.favorites.getContext"},{"_content":"flickr.favorites.getList"},{"_content":"flickr.favorites.getPublicList"},{"_content":"flickr.favorites.remove"},{"_content":"flickr.galleries.addPhoto"},{"_content":"flickr.galleries.create"},{"_content":"flickr.galleries.editMeta"},{"_content":"flickr.galleries.editPhoto"},{"_content":"flickr.galleries.editPhotos"},{"_content":"flickr.galleries.getInfo"},{"_content":"flickr.galleries.getList"},{"_content":"flickr.galleries.getListForPhoto"},{"_content":"flickr.galleries.getPhotos"},{"_content":"flickr.groups.browse"},{"_content":"flickr.groups.discuss.replies.add"},{"_content":"flickr.groups.discuss.replies.delete"},{"_content":"flickr.groups.discuss.replies.edit"},{"_content":"flickr.groups.discuss.replies.getInfo"},{"_content":"flickr.groups.discuss.replies.getList"},{"_content":"flickr.groups.discuss.topics.add"},{"_content":"flickr.groups.discuss.topics.getInfo"},{"_content":"flickr.groups.discuss.topics.getList"},{"_content":"flickr.groups.getInfo"},{"_content":"flickr.groups.join"},{"_content":"flickr.groups.joinRequest"},{"_content":"flickr.groups.leave"},{"_content":"flickr.groups.members.getList"},{"_content":"flickr.groups.pools.add"},{"_content":"flickr.groups.pools.getContext"},{"_content":"flickr.groups.pools.getGroups"},{"_content":"flickr.groups.pools.getPhotos"},{"_content":"flickr.groups.pools.remove"},{"_content":"flickr.groups.search"},{"_content":"flickr.interestingness.getList"},{"_content":"flickr.machinetags.getNamespaces"},{"_content":"flickr.machinetags.getPairs"},{"_content":"flickr.machinetags.getPredicates"},{"_content":"flickr.machinetags.getRecentValues"},{"_content":"flickr.machinetags.getValues"},{"_content":"flickr.panda.getList"},{"_content":"flickr.panda.getPhotos"},{"_content":"flickr.people.findByEmail"},{"_content":"flickr.people.findByUsername"},{"_content":"flickr.people.getGroups"},{"_content":"flickr.people.getInfo"},{"_content":"flickr.people.getLimits"},{"_content":"flickr.people.getPhotos"},{"_content":"flickr.people.getPhotosOf"},{"_content":"flickr.people.getPublicGroups"},{"_content":"flickr.people.getPublicPhotos"},{"_content":"flickr.people.getUploadStatus"},{"_content":"flickr.photos.addTags"},{"_content":"flickr.photos.comments.addComment"},{"_content":"flickr.photos.comments.deleteComment"},{"_content":"flickr.photos.comments.editComment"},{"_content":"flickr.photos.comments.getList"},{"_content":"flickr.photos.comments.getRecentForContacts"},{"_content":"flickr.photos.delete"},{"_content":"flickr.photos.geo.batchCorrectLocation"},{"_content":"flickr.photos.geo.correctLocation"},{"_content":"flickr.photos.geo.getLocation"},{"_content":"flickr.photos.geo.getPerms"},{"_content":"flickr.photos.geo.photosForLocation"},{"_content":"flickr.photos.geo.removeLocation"},{"_content":"flickr.photos.geo.setContext"},{"_content":"flickr.photos.geo.setLocation"},{"_content":"flickr.photos.geo.setPerms"},{"_content":"flickr.photos.getAllContexts"},{"_content":"flickr.photos.getContactsPhotos"},{"_content":"flickr.photos.getContactsPublicPhotos"},{"_content":"flickr.photos.getContext"},{"_content":"flickr.photos.getCounts"},{"_content":"flickr.photos.getExif"},{"_content":"flickr.photos.getFavorites"},{"_content":"flickr.photos.getInfo"},{"_content":"flickr.photos.getNotInSet"},{"_content":"flickr.photos.getPerms"},{"_content":"flickr.photos.getRecent"},{"_content":"flickr.photos.getSizes"},{"_content":"flickr.photos.getUntagged"},{"_content":"flickr.photos.getWithGeoData"},{"_content":"flickr.photos.getWithoutGeoData"},{"_content":"flickr.photos.licenses.getInfo"},{"_content":"flickr.photos.licenses.setLicense"},{"_content":"flickr.photos.notes.add"},{"_content":"flickr.photos.notes.delete"},{"_content":"flickr.photos.notes.edit"},{"_content":"flickr.photos.people.add"},{"_content":"flickr.photos.people.delete"},{"_content":"flickr.photos.people.deleteCoords"},{"_content":"flickr.photos.people.editCoords"},{"_content":"flickr.photos.people.getList"},{"_content":"flickr.photos.recentlyUpdated"},{"_content":"flickr.photos.removeTag"},{"_content":"flickr.photos.search"},{"_content":"flickr.photos.setContentType"},{"_content":"flickr.photos.setDates"},{"_content":"flickr.photos.setMeta"},{"_content":"flickr.photos.setPerms"},{"_content":"flickr.photos.setSafetyLevel"},{"_content":"flickr.photos.setTags"},{"_content":"flickr.photos.suggestions.approveSuggestion"},{"_content":"flickr.photos.suggestions.getList"},{"_content":"flickr.photos.suggestions.rejectSuggestion"},{"_content":"flickr.photos.suggestions.removeSuggestion"},{"_content":"flickr.photos.suggestions.suggestLocation"},{"_content":"flickr.photos.transform.rotate"},{"_content":"flickr.photos.upload.checkTickets"},{"_content":"flickr.photosets.addPhoto"},{"_content":"flickr.photosets.comments.addComment"},{"_content":"flickr.photosets.comments.deleteComment"},{"_content":"flickr.photosets.comments.editComment"},{"_content":"flickr.photosets.comments.getList"},{"_content":"flickr.photosets.create"},{"_content":"flickr.photosets.delete"},{"_content":"flickr.photosets.editMeta"},{"_content":"flickr.photosets.editPhotos"},{"_content":"flickr.photosets.getContext"},{"_content":"flickr.photosets.getInfo"},{"_content":"flickr.photosets.getList"},{"_content":"flickr.photosets.getPhotos"},{"_content":"flickr.photosets.orderSets"},{"_content":"flickr.photosets.removePhoto"},{"_content":"flickr.photosets.removePhotos"},{"_content":"flickr.photosets.reorderPhotos"},{"_content":"flickr.photosets.setPrimaryPhoto"},{"_content":"flickr.places.find"},{"_content":"flickr.places.findByLatLon"},{"_content":"flickr.places.getChildrenWithPhotosPublic"},{"_content":"flickr.places.getInfo"},{"_content":"flickr.places.getInfoByUrl"},{"_content":"flickr.places.getPlaceTypes"},{"_content":"flickr.places.getShapeHistory"},{"_content":"flickr.places.getTopPlacesList"},{"_content":"flickr.places.placesForBoundingBox"},{"_content":"flickr.places.placesForContacts"},{"_content":"flickr.places.placesForTags"},{"_content":"flickr.places.placesForUser"},{"_content":"flickr.places.resolvePlaceId"},{"_content":"flickr.places.resolvePlaceURL"},{"_content":"flickr.places.tagsForPlace"},{"_content":"flickr.prefs.getContentType"},{"_content":"flickr.prefs.getGeoPerms"},{"_content":"flickr.prefs.getHidden"},{"_content":"flickr.prefs.getPrivacy"},{"_content":"flickr.prefs.getSafetyLevel"},{"_content":"flickr.push.getSubscriptions"},{"_content":"flickr.push.getTopics"},{"_content":"flickr.push.subscribe"},{"_content":"flickr.push.unsubscribe"},{"_content":"flickr.reflection.getMethodInfo"},{"_content":"flickr.reflection.getMethods"},{"_content":"flickr.stats.getCollectionDomains"},{"_content":"flickr.stats.getCollectionReferrers"},{"_content":"flickr.stats.getCollectionStats"},{"_content":"flickr.stats.getCSVFiles"},{"_content":"flickr.stats.getPhotoDomains"},{"_content":"flickr.stats.getPhotoReferrers"},{"_content":"flickr.stats.getPhotosetDomains"},{"_content":"flickr.stats.getPhotosetReferrers"},{"_content":"flickr.stats.getPhotosetStats"},{"_content":"flickr.stats.getPhotoStats"},{"_content":"flickr.stats.getPhotostreamDomains"},{"_content":"flickr.stats.getPhotostreamReferrers"},{"_content":"flickr.stats.getPhotostreamStats"},{"_content":"flickr.stats.getPopularPhotos"},{"_content":"flickr.stats.getTotalViews"},{"_content":"flickr.tags.getClusterPhotos"},{"_content":"flickr.tags.getClusters"},{"_content":"flickr.tags.getHotList"},{"_content":"flickr.tags.getListPhoto"},{"_content":"flickr.tags.getListUser"},{"_content":"flickr.tags.getListUserPopular"},{"_content":"flickr.tags.getListUserRaw"},{"_content":"flickr.tags.getMostFrequentlyUsed"},{"_content":"flickr.tags.getRelated"},{"_content":"flickr.test.echo"},{"_content":"flickr.test.login"},{"_content":"flickr.test.null"},{"_content":"flickr.urls.getGroup"},{"_content":"flickr.urls.getUserPhotos"},{"_content":"flickr.urls.getUserProfile"},{"_content":"flickr.urls.lookupGallery"},{"_content":"flickr.urls.lookupGroup"},{"_content":"flickr.urls.lookupUser"}]},"stat":"ok"}'
|
56
|
-
http_version:
|
57
|
-
recorded_at: Sun, 01 Mar 2015 00:00:00 GMT
|
58
|
-
- request:
|
59
|
-
method: post
|
60
|
-
uri: https://api.flickr.com/services/rest/
|
61
|
-
body:
|
62
|
-
encoding: US-ASCII
|
63
|
-
string: photo_id=15631479625&method=flickr.photos.getInfo&format=json&nojsoncallback=1
|
64
|
-
headers:
|
65
|
-
Accept-Encoding:
|
66
|
-
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
67
|
-
Accept:
|
68
|
-
- "*/*"
|
69
|
-
User-Agent:
|
70
|
-
- FlickRaw/0.9.8
|
71
|
-
Authorization:
|
72
|
-
- OAuth realm="https://api.flickr.com/services/rest/", oauth_consumer_key="<FLICKR_API_KEY>",
|
73
|
-
oauth_nonce="Tq2RTqs5fj4uG%2ByxGvBcRN8rVKypfn81Lb2ezGejOx4%3D", oauth_signature="<FLICKR_SECRET>%26",
|
74
|
-
oauth_signature_method="PLAINTEXT", oauth_timestamp="1425168000", oauth_token="",
|
75
|
-
oauth_version="1.0"
|
76
|
-
Content-Type:
|
77
|
-
- application/x-www-form-urlencoded
|
78
|
-
response:
|
79
|
-
status:
|
80
|
-
code: 200
|
81
|
-
message: OK
|
82
|
-
headers:
|
83
|
-
Date:
|
84
|
-
- Sun, 01 Mar 2015 17:57:41 GMT
|
85
|
-
Content-Type:
|
86
|
-
- application/json
|
87
|
-
Content-Length:
|
88
|
-
- '665'
|
89
|
-
P3p:
|
90
|
-
- policyref="http://info.yahoo.com/w3c/p3p.xml", CP="CAO DSP COR CUR ADM DEV
|
91
|
-
TAI PSA PSD IVAi IVDi CONi TELo OTPi OUR DELi SAMi OTRi UNRi PUBi IND PHY
|
92
|
-
ONL UNI PUR FIN COM NAV INT DEM CNT STA POL HEA PRE LOC GOV"
|
93
|
-
Cache-Control:
|
94
|
-
- private
|
95
|
-
X-Served-By:
|
96
|
-
- www285.flickr.bf1.yahoo.com
|
97
|
-
Vary:
|
98
|
-
- Accept-Encoding
|
99
|
-
Age:
|
100
|
-
- '2'
|
101
|
-
Via:
|
102
|
-
- http/1.1 fts101.flickr.bf1.yahoo.com (ApacheTrafficServer/4.0.2 [cMsSf ]),
|
103
|
-
http/1.1 r13.ycpi.ir2.yahoo.net (ApacheTrafficServer [cMsSf ])
|
104
|
-
Server:
|
105
|
-
- ATS
|
106
|
-
Connection:
|
107
|
-
- keep-alive
|
108
|
-
body:
|
109
|
-
encoding: ASCII-8BIT
|
110
|
-
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
|
111
|
-
Funk Maharishi","location":"","iconserver":"3933","iconfarm":4,"path_alias":"rawfunkmaharishi"},"title":{"_content":"The
|
112
|
-
Comedy, October 2014"},"description":{"_content":""},"visibility":{"ispublic":1,"isfriend":0,"isfamily":0},"dates":{"posted":"1414326010","taken":"2014-10-22
|
113
|
-
15:54:24","takengranularity":"0","takenunknown":"0","lastupdate":"1416111853"},"views":"91","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
|
114
|
-
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"}'
|
115
|
-
http_version:
|
116
|
-
recorded_at: Sun, 01 Mar 2015 00:00:00 GMT
|
117
|
-
- request:
|
118
|
-
method: post
|
119
|
-
uri: https://api.flickr.com/services/rest/
|
120
|
-
body:
|
121
|
-
encoding: US-ASCII
|
122
|
-
string: method=flickr.photos.licenses.getInfo&format=json&nojsoncallback=1
|
123
|
-
headers:
|
124
|
-
Accept-Encoding:
|
125
|
-
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
126
|
-
Accept:
|
127
|
-
- "*/*"
|
128
|
-
User-Agent:
|
129
|
-
- FlickRaw/0.9.8
|
130
|
-
Authorization:
|
131
|
-
- OAuth realm="https://api.flickr.com/services/rest/", oauth_consumer_key="<FLICKR_API_KEY>",
|
132
|
-
oauth_nonce="E5lHZdOsyCNzFbLfN4YbOW7%2BaC8eWyIlMxot5qTvK%2Bc%3D", oauth_signature="<FLICKR_SECRET>%26",
|
133
|
-
oauth_signature_method="PLAINTEXT", oauth_timestamp="1425168000", oauth_token="",
|
134
|
-
oauth_version="1.0"
|
135
|
-
Content-Type:
|
136
|
-
- application/x-www-form-urlencoded
|
137
|
-
response:
|
138
|
-
status:
|
139
|
-
code: 200
|
140
|
-
message: OK
|
141
|
-
headers:
|
142
|
-
Date:
|
143
|
-
- Sun, 01 Mar 2015 17:57:41 GMT
|
144
|
-
Content-Type:
|
145
|
-
- application/json
|
146
|
-
Content-Length:
|
147
|
-
- '314'
|
148
|
-
P3p:
|
149
|
-
- policyref="http://info.yahoo.com/w3c/p3p.xml", CP="CAO DSP COR CUR ADM DEV
|
150
|
-
TAI PSA PSD IVAi IVDi CONi TELo OTPi OUR DELi SAMi OTRi UNRi PUBi IND PHY
|
151
|
-
ONL UNI PUR FIN COM NAV INT DEM CNT STA POL HEA PRE LOC GOV"
|
152
|
-
Cache-Control:
|
153
|
-
- private
|
154
|
-
X-Served-By:
|
155
|
-
- www16.flickr.bf1.yahoo.com
|
156
|
-
Vary:
|
157
|
-
- Accept-Encoding
|
158
|
-
Age:
|
159
|
-
- '0'
|
160
|
-
Via:
|
161
|
-
- http/1.1 fts110.flickr.bf1.yahoo.com (ApacheTrafficServer/4.0.2 [cMsSf ]),
|
162
|
-
http/1.1 r06.ycpi.ir2.yahoo.net (ApacheTrafficServer [cMsSf ])
|
163
|
-
Server:
|
164
|
-
- ATS
|
165
|
-
Connection:
|
166
|
-
- keep-alive
|
167
|
-
body:
|
168
|
-
encoding: ASCII-8BIT
|
169
|
-
string: '{"licenses":{"license":[{"id":"0","name":"All Rights Reserved","url":""},{"id":"4","name":"Attribution
|
170
|
-
License","url":"https:\/\/creativecommons.org\/licenses\/by\/2.0\/"},{"id":"6","name":"Attribution-NoDerivs
|
171
|
-
License","url":"https:\/\/creativecommons.org\/licenses\/by-nd\/2.0\/"},{"id":"3","name":"Attribution-NonCommercial-NoDerivs
|
172
|
-
License","url":"https:\/\/creativecommons.org\/licenses\/by-nc-nd\/2.0\/"},{"id":"2","name":"Attribution-NonCommercial
|
173
|
-
License","url":"https:\/\/creativecommons.org\/licenses\/by-nc\/2.0\/"},{"id":"1","name":"Attribution-NonCommercial-ShareAlike
|
174
|
-
License","url":"https:\/\/creativecommons.org\/licenses\/by-nc-sa\/2.0\/"},{"id":"5","name":"Attribution-ShareAlike
|
175
|
-
License","url":"https:\/\/creativecommons.org\/licenses\/by-sa\/2.0\/"},{"id":"7","name":"No
|
176
|
-
known copyright restrictions","url":"https:\/\/www.flickr.com\/commons\/usage\/"},{"id":"8","name":"United
|
177
|
-
States Government Work","url":"http:\/\/www.usa.gov\/copyright.shtml"}]},"stat":"ok"}'
|
178
|
-
http_version:
|
179
|
-
recorded_at: Sun, 01 Mar 2015 00:00:00 GMT
|
180
|
-
recorded_with: VCR 2.9.3
|