flickrie 0.7.3 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (70) hide show
  1. data/.gitignore +1 -0
  2. data/.travis.yml +4 -0
  3. data/CHANGELOG.md +70 -30
  4. data/Gemfile +5 -4
  5. data/README.md +55 -53
  6. data/Rakefile +6 -9
  7. data/lib/flickrie/api_methods.rb +16 -3
  8. data/lib/flickrie/client.rb +11 -40
  9. data/lib/flickrie/instance.rb +0 -1
  10. data/lib/flickrie/location.rb +21 -18
  11. data/lib/flickrie/media.rb +5 -21
  12. data/lib/flickrie/media_count.rb +4 -0
  13. data/lib/flickrie/middleware.rb +71 -0
  14. data/lib/flickrie/oauth.rb +58 -49
  15. data/lib/flickrie/photo.rb +0 -2
  16. data/lib/flickrie/set.rb +0 -5
  17. data/lib/flickrie/upload_client.rb +45 -56
  18. data/lib/flickrie/user.rb +10 -10
  19. data/lib/flickrie/version.rb +1 -1
  20. data/lib/flickrie/video.rb +0 -2
  21. data/spec/files/photo.bla +0 -0
  22. data/spec/{api_methods_spec.rb → flickrie/api_methods_spec.rb} +14 -14
  23. data/spec/{error_spec.rb → flickrie/error_spec.rb} +1 -1
  24. data/spec/{instance_spec.rb → flickrie/instance_spec.rb} +2 -5
  25. data/spec/{license_spec.rb → flickrie/license_spec.rb} +1 -1
  26. data/spec/{location_spec.rb → flickrie/location_spec.rb} +12 -1
  27. data/spec/{media_count_spec.rb → flickrie/media_count_spec.rb} +7 -3
  28. data/spec/{media_spec.rb → flickrie/media_spec.rb} +25 -26
  29. data/spec/flickrie/oauth_spec.rb +25 -0
  30. data/spec/{photo_spec.rb → flickrie/photo_spec.rb} +1 -1
  31. data/spec/{set_spec.rb → flickrie/set_spec.rb} +2 -2
  32. data/spec/flickrie/upload_client_spec.rb +40 -0
  33. data/spec/flickrie/user_spec.rb +58 -0
  34. data/spec/{video_spec.rb → flickrie/video_spec.rb} +1 -1
  35. data/spec/spec_helper.rb +16 -13
  36. data/spec/{fixtures/vcr_cassettes → vcr_cassettes}/api_methods/asynchronous_upload.yml +60 -95
  37. data/spec/{fixtures/vcr_cassettes → vcr_cassettes}/api_methods/replace.yml +16 -16
  38. data/spec/{fixtures/vcr_cassettes/api_methods/tags.yml → vcr_cassettes/api_methods/tag_manipulation.yml} +24 -24
  39. data/spec/{fixtures/vcr_cassettes → vcr_cassettes}/api_methods/upload_and_delete.yml +21 -21
  40. data/spec/{fixtures/vcr_cassettes → vcr_cassettes}/error/a_request_was_made_and_failed.yml +9 -9
  41. data/spec/{fixtures/vcr_cassettes → vcr_cassettes}/instance/calling_api_methods.yml +32 -32
  42. data/spec/{fixtures/vcr_cassettes → vcr_cassettes}/license/get.yml +4 -4
  43. data/spec/{fixtures/vcr_cassettes → vcr_cassettes}/media/from_contacts.yml +8 -8
  44. data/spec/{fixtures/vcr_cassettes → vcr_cassettes}/media/from_set.yml +5 -5
  45. data/spec/{fixtures/vcr_cassettes → vcr_cassettes}/media/from_user.yml +5 -5
  46. data/spec/{fixtures/vcr_cassettes → vcr_cassettes}/media/get_context.yml +4 -4
  47. data/spec/{fixtures/vcr_cassettes → vcr_cassettes}/media/get_exif.yml +8 -8
  48. data/spec/{fixtures/vcr_cassettes → vcr_cassettes}/media/get_info.yml +18 -18
  49. data/spec/{fixtures/vcr_cassettes → vcr_cassettes}/media/public_from_user.yml +5 -5
  50. data/spec/{fixtures/vcr_cassettes → vcr_cassettes}/media/search.yml +5 -5
  51. data/spec/{fixtures/vcr_cassettes → vcr_cassettes}/media_count/get.yml +8 -8
  52. data/spec/vcr_cassettes/o_auth/incorrect_credentials.yml +249 -0
  53. data/spec/{fixtures/vcr_cassettes → vcr_cassettes}/photo/get_info.yml +6 -6
  54. data/spec/{fixtures/vcr_cassettes → vcr_cassettes}/photo/get_sizes.yml +12 -12
  55. data/spec/{fixtures/vcr_cassettes → vcr_cassettes}/photo/search.yml +5 -5
  56. data/spec/{fixtures/vcr_cassettes → vcr_cassettes}/set/from_user.yml +16 -16
  57. data/spec/{fixtures/vcr_cassettes → vcr_cassettes}/set/get_info.yml +32 -32
  58. data/spec/vcr_cassettes/upload_client/content_type.yml +117 -0
  59. data/spec/vcr_cassettes/upload_client/invalid_credentials.yml +208 -0
  60. data/spec/{fixtures/vcr_cassettes → vcr_cassettes}/user/find_by_username_or_email.yml +8 -8
  61. data/spec/{fixtures/vcr_cassettes → vcr_cassettes}/user/get_info.yml +8 -8
  62. data/spec/{fixtures/vcr_cassettes → vcr_cassettes}/video/get_info.yml +4 -4
  63. data/spec/{fixtures/vcr_cassettes → vcr_cassettes}/video/get_sizes.yml +8 -8
  64. metadata +105 -99
  65. data/spec/fixtures/vcr_cassettes/api_methods/tag_manipulation.yml +0 -178
  66. data/spec/fixtures/vcr_cassettes/error/code.yml +0 -84
  67. data/spec/fixtures/vcr_cassettes/error/was_raised.yml +0 -84
  68. data/spec/fixtures/vcr_cassettes/o_auth/incorrect_credentials.yml +0 -167
  69. data/spec/oauth_spec.rb +0 -22
  70. data/spec/user_spec.rb +0 -53
@@ -1,4 +1,4 @@
1
- require File.expand_path(File.join(File.dirname(__FILE__), "spec_helper"))
1
+ require 'spec_helper'
2
2
 
3
3
  describe Flickrie::Location do
4
4
  context "blank" do
@@ -10,4 +10,15 @@ describe Flickrie::Location do
10
10
  end
11
11
  end
12
12
  end
13
+
14
+ context "accessing areas" do
15
+ it "should have #to_s defined on them" do
16
+ location = Flickrie::Location.public_new \
17
+ 'neighbourhood' => {
18
+ '_content' => 'A gangsta ghetto, yo'
19
+ }
20
+
21
+ location.neighbourhood.to_s.should eq('A gangsta ghetto, yo')
22
+ end
23
+ end
13
24
  end
@@ -1,17 +1,21 @@
1
- require File.expand_path(File.join(File.dirname(__FILE__), "spec_helper"))
1
+ require 'spec_helper'
2
2
 
3
3
  describe Flickrie::MediaCount do
4
4
  context "get" do
5
5
  it "should have correctly set all attributes", :vcr do
6
6
  dates = [DateTime.parse("1st March 2012"), DateTime.parse("5th May 2012")].map(&:to_time)
7
7
  [
8
- @flickrie.get_media_counts(:taken_dates => dates.join(',')).first,
9
- @flickrie.get_media_counts(:dates => dates.map(&:to_i).join(',')).first
8
+ Flickrie.get_media_counts(:taken_dates => dates.join(',')).first,
9
+ Flickrie.get_media_counts(:dates => dates.map(&:to_i).join(',')).first
10
10
  ].
11
11
  each do |count|
12
12
  count.value.should be_an_instance_of(Fixnum)
13
+
13
14
  count.date_range.begin.should eq(dates.first)
15
+ count.from.should eq(dates.first)
16
+
14
17
  count.date_range.end.should eq(dates.last)
18
+ count.to.should eq(dates.last)
15
19
  end
16
20
  end
17
21
  end
@@ -1,5 +1,4 @@
1
- # encoding: utf-8
2
- require File.expand_path(File.join(File.dirname(__FILE__), "spec_helper"))
1
+ require 'spec_helper'
3
2
 
4
3
  describe Flickrie::Media do
5
4
  before(:all) do
@@ -65,8 +64,8 @@ describe Flickrie::Media do
65
64
  :taken_at_granularity => 0,
66
65
  :owner => {
67
66
  :nsid => USER_NSID,
68
- :username => "Janko Marohnić",
69
- :real_name => "Janko Marohnić",
67
+ :username => USER_USERNAME,
68
+ :real_name => USER_USERNAME,
70
69
  :location => "Zagreb, Croatia",
71
70
  :icon_server => "5464",
72
71
  :icon_farm => 6
@@ -101,8 +100,8 @@ describe Flickrie::Media do
101
100
  :first => {
102
101
  :id => '72157629487842968',
103
102
  :author => {
104
- :nsid => '67131352@N04',
105
- :username => 'Janko Marohnić'
103
+ :nsid => USER_NSID,
104
+ :username => USER_USERNAME
106
105
  },
107
106
  :coordinates => [316, 0],
108
107
  :width => 59,
@@ -122,15 +121,15 @@ describe Flickrie::Media do
122
121
  ].
123
122
  each do |media|
124
123
  [
125
- :id, :secret, :server, :farm, :title, :description,
126
- :views_count, :comments_count, :location, :geo_permissions,
127
- :tags, :machine_tags, :license, :taken_at_granularity, :owner,
124
+ :id, :secret, :server, :farm, :title, :description, :views_count,
125
+ :comments_count, :location, :geo_permissions, :tags,
126
+ :machine_tags, :license, :taken_at_granularity, :owner,
128
127
  :safety_level, :safe?, :moderate?, :restricted?, :visibility,
129
128
  :favorite?, :can_comment?, :can_add_meta?, :can_everyone_comment?,
130
129
  :can_everyone_add_meta?, :can_download?, :can_blog?,
131
130
  :can_print?, :can_share?, :has_people?, :notes
132
131
  ].
133
- each { |attribute| test_attribute(media, attribute) }
132
+ each { |attribute| test_recursively(media, attribute) }
134
133
 
135
134
  # other
136
135
  media.url.empty?.should be_false
@@ -150,12 +149,12 @@ describe Flickrie::Media do
150
149
  :id, :secret, :server, :farm, :title, :media_status, :views_count,
151
150
  :geo_permissions, :machine_tags, :license, :taken_at_granularity
152
151
  ].
153
- each { |attribute| test_attribute(media, attribute) }
152
+ each { |attribute| test_recursively(media, attribute) }
154
153
 
155
154
  # the incomplete ones
156
- test_attribute(media, :location, @attributes[:location].except(:locality, :county, :region, :country))
157
- test_attribute(media.tags, :first, @attributes[:tags][:first].except(:author, :raw, :machine_tag?))
158
- test_attribute(media, :owner, @attributes[:owner].except(:real_name, :location))
155
+ test_recursively(media, :location, @attributes[:location].except(:locality, :county, :region, :country))
156
+ test_recursively(media.tags, :first, @attributes[:tags][:first].except(:author, :raw, :machine_tag?))
157
+ test_recursively(media, :owner, @attributes[:owner].except(:real_name, :location))
159
158
 
160
159
  # other
161
160
  media.url.empty?.should be_false
@@ -182,10 +181,10 @@ describe Flickrie::Media do
182
181
  include_context "common"
183
182
 
184
183
  it "should have all attributes correctly set", :vcr do
185
- media = @flickrie.media_from_user(USER_NSID, :extras => EXTRAS).
184
+ media = Flickrie.media_from_user(USER_NSID, :extras => EXTRAS).
186
185
  find { |media| media.id == PHOTO_ID }
187
186
  test_common_attributes(media)
188
- test_attribute(media, :visibility)
187
+ test_recursively(media, :visibility)
189
188
  end
190
189
  end
191
190
 
@@ -196,7 +195,7 @@ describe Flickrie::Media do
196
195
  media = Flickrie.public_media_from_user(USER_NSID, :extras => EXTRAS).
197
196
  find { |media| media.id == PHOTO_ID }
198
197
  test_common_attributes(media)
199
- test_attribute(media, :visibility)
198
+ test_recursively(media, :visibility)
200
199
  end
201
200
  end
202
201
 
@@ -207,7 +206,7 @@ describe Flickrie::Media do
207
206
  media = Flickrie.search_media(:user_id => USER_NSID, :extras => EXTRAS).
208
207
  find { |media| media.id == PHOTO_ID }
209
208
  test_common_attributes(media)
210
- test_attribute(media, :visibility)
209
+ test_recursively(media, :visibility)
211
210
  end
212
211
  end
213
212
 
@@ -215,8 +214,8 @@ describe Flickrie::Media do
215
214
  it "should have all attributes correctly set", :vcr do
216
215
  params = {:include_self => 1, :single_photo => 1}
217
216
  [
218
- @flickrie.media_from_contacts(params).first,
219
- @flickrie.public_media_from_user_contacts(USER_NSID, params).first
217
+ Flickrie.media_from_contacts(params).first,
218
+ Flickrie.public_media_from_user_contacts(USER_NSID, params).first
220
219
  ].
221
220
  each do |media|
222
221
  media.id.should eq('7093101501')
@@ -224,9 +223,9 @@ describe Flickrie::Media do
224
223
  media.server.should eq('7090')
225
224
  media.farm.should eq(8)
226
225
  media.owner.nsid.should eq(USER_NSID)
227
- media.owner.username.should eq('Janko Marohnić')
226
+ media.owner.username.should eq(USER_USERNAME)
228
227
  media.title.should eq('IMG_0917')
229
- test_attribute(media, :visibility)
228
+ test_recursively(media, :visibility)
230
229
  media.media_status.should eq('ready')
231
230
  end
232
231
  end
@@ -235,10 +234,10 @@ describe Flickrie::Media do
235
234
  context "get context" do
236
235
  it "should have all attributes correctly set", :vcr do
237
236
  context = Flickrie.get_media_context(PHOTO_ID)
238
- context['count'].should eq(98)
239
- context['prevphoto'].title.should eq('IMG_0795')
240
- context['prevphoto'].url.should_not be_empty
241
- context['prevphoto'].faved?.should be_false
237
+ context.count.should eq(98)
238
+ context.previous.title.should eq('IMG_0795')
239
+ context.previous.url.should_not be_empty
240
+ context.previous.faved?.should be_false
242
241
  end
243
242
  end
244
243
 
@@ -0,0 +1,25 @@
1
+ require 'spec_helper'
2
+
3
+ describe Flickrie::OAuth do
4
+ context "incorrect credentials" do
5
+ it "should raise exceptions", :vcr do
6
+ Flickrie.api_key = "foo"
7
+ Flickrie.shared_secret = "foo"
8
+
9
+ expect { Flickrie::OAuth.get_request_token }.to raise_error(Flickrie::Error)
10
+
11
+ Flickrie.api_key = ENV['FLICKR_API_KEY']
12
+ expect { Flickrie::OAuth.get_request_token }.to raise_error(Flickrie::Error)
13
+
14
+ Flickrie.shared_secret = ENV['FLICKR_SHARED_SECRET']
15
+ expect { Flickrie::OAuth.get_request_token }.to_not raise_error(Flickrie::Error)
16
+
17
+ request_token = Flickrie::OAuth.get_request_token
18
+ request_token.authorize_url.should_not be_empty
19
+ request_token.get_authorization_url.should_not be_empty
20
+
21
+ expect { Flickrie::OAuth.get_access_token("foo", request_token) }.to raise_error(Flickrie::Error)
22
+ expect { request_token.get_access_token("foo") }.to raise_error(Flickrie::Error)
23
+ end
24
+ end
25
+ end
@@ -1,4 +1,4 @@
1
- require File.expand_path(File.join(File.dirname(__FILE__), "spec_helper"))
1
+ require 'spec_helper'
2
2
 
3
3
  SIZES = ['Square 75', 'Thumbnail', 'Square 150', 'Small 240', 'Small 320',
4
4
  'Medium 500', 'Medium 640', 'Medium 800', 'Large 1024']
@@ -1,5 +1,5 @@
1
1
  # encoding: utf-8
2
- require File.expand_path(File.join(File.dirname(__FILE__), "spec_helper"))
2
+ require 'spec_helper'
3
3
 
4
4
  describe Flickrie::Set do
5
5
  before(:all) do
@@ -27,7 +27,7 @@ describe Flickrie::Set do
27
27
 
28
28
  def test_common_attributes(set)
29
29
  @attributes.keys.each do |attribute|
30
- test_attribute(set, attribute)
30
+ test_recursively(set, attribute)
31
31
  end
32
32
 
33
33
  set.photos.all? { |photo| photo.is_a?(Flickrie::Photo) }.should be_true
@@ -0,0 +1,40 @@
1
+ require 'spec_helper'
2
+
3
+ describe Flickrie::UploadClient do
4
+ context "content type" do
5
+ it "should pass the content type", :vcr do
6
+ photo_path = File.expand_path("../../files/photo.bla", __FILE__)
7
+ photo_id = Flickrie.upload(photo_path, :content_type => "image/jpeg")
8
+ Flickrie.photos_from_user(USER_NSID).map(&:id).should include(photo_id)
9
+ Flickrie.delete_photo(photo_id)
10
+ end
11
+
12
+ it "should raise an error on unknown content type", :vcr do
13
+ photo_path = File.expand_path("../../files/photo.bla", __FILE__)
14
+ expect { Flickrie.upload(photo_path) }.to raise_error(Flickrie::Error)
15
+ end
16
+ end
17
+
18
+ context "invalid credentials" do
19
+ it "should raise errors", :vcr do
20
+ Flickrie.api_key = nil
21
+ Flickrie.shared_secret = nil
22
+ Flickrie.access_token = nil
23
+ Flickrie.access_secret = nil
24
+
25
+ expect { Flickrie.upload(PHOTO_PATH) }.to raise_error(Flickrie::Error)
26
+
27
+ Flickrie.api_key = ENV['FLICKR_API_KEY']
28
+ expect { Flickrie.upload(PHOTO_PATH) }.to raise_error(Flickrie::Error)
29
+
30
+ Flickrie.shared_secret = ENV['FLICKR_SHARED_SECRET']
31
+ expect { Flickrie.upload(PHOTO_PATH) }.to raise_error(Flickrie::Error)
32
+
33
+ Flickrie.access_token = ENV['FLICKR_ACCESS_TOKEN']
34
+ expect { Flickrie.upload(PHOTO_PATH) }.to raise_error(Flickrie::Error)
35
+
36
+ Flickrie.access_secret = ENV['FLICKR_ACCESS_SECRET']
37
+ expect { Flickrie.upload(PHOTO_PATH) }.to_not raise_error
38
+ end
39
+ end
40
+ end
@@ -0,0 +1,58 @@
1
+ require 'spec_helper'
2
+
3
+ describe Flickrie::User do
4
+ before(:all) do
5
+ @attributes = {
6
+ :id => USER_NSID,
7
+ :nsid => USER_NSID,
8
+ :username => USER_USERNAME,
9
+ :real_name => USER_USERNAME,
10
+ :location => "Zagreb, Croatia",
11
+ :time_zone => {
12
+ :label => "Sarajevo, Skopje, Warsaw, Zagreb",
13
+ :offset => "+01:00"
14
+ },
15
+ :description => "I'm a programmer, and I'm gonna program a badass Ruby library for Flickr.",
16
+ :icon_server => "5464",
17
+ :icon_farm => 6,
18
+ :pro? => false,
19
+ :media_count => 98
20
+ }
21
+ end
22
+
23
+ context "get info" do
24
+ it "should have all attributes correctly set", :vcr do
25
+ [
26
+ Flickrie.get_user_info(USER_NSID),
27
+ Flickrie::User.public_new('nsid' => USER_NSID).get_info
28
+ ].
29
+ each do |user|
30
+ @attributes.keys.each do |attribute|
31
+ test_recursively(user, attribute)
32
+ end
33
+
34
+ [:profile_url, :mobile_url, :photos_url, :buddy_icon_url].each do |attribute|
35
+ user.send(attribute).should_not be_empty
36
+ end
37
+
38
+ [:first_taken, :first_uploaded].each do |time_attribute|
39
+ user.send(time_attribute).should be_an_instance_of(Time)
40
+ end
41
+ end
42
+ end
43
+ end
44
+
45
+ context "find by username or email" do
46
+ it "should have all attributes correctly set", :vcr do
47
+ [
48
+ Flickrie.find_user_by_username(USER_USERNAME),
49
+ Flickrie.find_user_by_email('janko.marohnic@gmail.com')
50
+ ].
51
+ each do |user|
52
+ [:id, :nsid, :username].each do |attribute|
53
+ test_recursively(user, attribute)
54
+ end
55
+ end
56
+ end
57
+ end
58
+ end
@@ -1,4 +1,4 @@
1
- require File.expand_path(File.join(File.dirname(__FILE__), "spec_helper"))
1
+ require 'spec_helper'
2
2
 
3
3
  describe Flickrie::Video do
4
4
  context "get info" do
data/spec/spec_helper.rb CHANGED
@@ -1,3 +1,4 @@
1
+ # encoding: utf-8
1
2
  require 'flickrie'
2
3
  require 'vcr'
3
4
  begin
@@ -6,7 +7,7 @@ rescue LoadError
6
7
  end
7
8
 
8
9
  module RSpecHelpers
9
- def test_attribute(object, attribute, hash = nil)
10
+ def test_recursively(object, attribute, hash = nil)
10
11
  expectation = hash || @attributes[attribute]
11
12
  unless expectation.is_a?(Hash)
12
13
  object.send(attribute).should eq(expectation)
@@ -26,6 +27,13 @@ module RSpecHelpers
26
27
  end
27
28
  end
28
29
  end
30
+
31
+ # SomeModule::AnotherModule::Class => "some_module/another_module/class"
32
+ def to_file_path(constants)
33
+ constants.split("::").collect do |constant|
34
+ constant.split(/(?=[A-Z])/).map(&:downcase).join('_')
35
+ end.join('/')
36
+ end
29
37
  end
30
38
 
31
39
  RSpec.configure do |c|
@@ -33,13 +41,13 @@ RSpec.configure do |c|
33
41
  c.before(:all) do
34
42
  Flickrie.api_key = ENV['FLICKR_API_KEY']
35
43
  Flickrie.shared_secret = ENV['FLICKR_SHARED_SECRET']
36
- # so that I can use the '@instance' object when I want to make authenticated API calls
37
- @flickrie = Flickrie::Instance.new(ENV['FLICKR_ACCESS_TOKEN'], ENV['FLICKR_ACCESS_SECRET'])
44
+ Flickrie.access_token = ENV['FLICKR_ACCESS_TOKEN']
45
+ Flickrie.access_secret = ENV['FLICKR_ACCESS_SECRET']
38
46
  end
39
47
  c.treat_symbols_as_metadata_keys_with_true_values = true
40
48
  c.around(:each, :vcr) do |example|
41
49
  if example.metadata[:cassette].nil?
42
- # the example is also wrapped in a 'context' block
50
+ # the example is wrapped in a 'context' block
43
51
  class_name = example.metadata[:example_group][:example_group][:description_args].first.to_s
44
52
  cassette_name = example.metadata[:example_group][:description_args].first
45
53
  else
@@ -48,14 +56,14 @@ RSpec.configure do |c|
48
56
  cassette_name = example.metadata[:cassette]
49
57
  end
50
58
 
51
- folder = class_name.to_s.match(/^Flickrie::/).post_match.to_file_path
59
+ folder = to_file_path(class_name.match(/^Flickrie::/).post_match)
52
60
  VCR.use_cassette("#{folder}/#{cassette_name}") { example.call }
53
61
  end
54
62
  c.fail_fast = true
55
63
  end
56
64
 
57
65
  VCR.configure do |c|
58
- c.cassette_library_dir = 'spec/fixtures/vcr_cassettes'
66
+ c.cassette_library_dir = 'spec/vcr_cassettes'
59
67
  c.hook_into :faraday
60
68
  c.default_cassette_options = {
61
69
  :record => :new_episodes,
@@ -66,11 +74,12 @@ VCR.configure do |c|
66
74
  c.filter_sensitive_data('ACCESS_TOKEN') { ENV['FLICKR_ACCESS_TOKEN'] }
67
75
  end
68
76
 
69
- PHOTO_PATH = File.join(File.expand_path(File.dirname(__FILE__)), 'files/photo.jpg').freeze
77
+ PHOTO_PATH = File.expand_path('../files/photo.jpg', __FILE__).freeze
70
78
  PHOTO_ID = '6946979188'.freeze
71
79
  VIDEO_ID = '7093038981'.freeze
72
80
  SET_ID = '72157629851991663'.freeze
73
81
  USER_NSID = '67131352@N04'.freeze
82
+ USER_USERNAME = 'Janko Marohnić'.freeze
74
83
  EXTRAS = %w[license date_upload date_taken owner_name
75
84
  icon_server original_format last_update geo tags machine_tags
76
85
  o_dims views media path_alias url_sq url_q url_t url_s url_n
@@ -97,9 +106,3 @@ class Hash
97
106
  self.dup.except!(*keys)
98
107
  end
99
108
  end
100
-
101
- class String
102
- def to_file_path
103
- split("::").collect { |klass| klass.split(/(?=[A-Z])/).map(&:downcase).join('_') }.join('/')
104
- end
105
- end