shutterstock-v2 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.gitignore +27 -0
- data/.rspec +3 -0
- data/.rubocop.yml +6 -0
- data/.travis.yml +6 -0
- data/Dockerfile +17 -0
- data/Gemfile +3 -0
- data/Guardfile +9 -0
- data/README.md +377 -0
- data/Rakefile +19 -0
- data/lib/client/auth.rb +48 -0
- data/lib/client/categories.rb +11 -0
- data/lib/client/category.rb +16 -0
- data/lib/client/client.rb +72 -0
- data/lib/client/collection.rb +151 -0
- data/lib/client/collections.rb +16 -0
- data/lib/client/configuration.rb +20 -0
- data/lib/client/contributor.rb +15 -0
- data/lib/client/driver.rb +38 -0
- data/lib/client/error.rb +20 -0
- data/lib/client/image.rb +139 -0
- data/lib/client/image_assets.rb +56 -0
- data/lib/client/image_size_details.rb +26 -0
- data/lib/client/images.rb +27 -0
- data/lib/client/license.rb +67 -0
- data/lib/client/licenses.rb +23 -0
- data/lib/client/model.rb +15 -0
- data/lib/client/models.rb +11 -0
- data/lib/client/request.rb +41 -0
- data/lib/client/subscription.rb +35 -0
- data/lib/client/subscription_allotment.rb +19 -0
- data/lib/client/subscription_license_format.rb +16 -0
- data/lib/client/subscription_license_formats.rb +12 -0
- data/lib/client/subscription_price.rb +13 -0
- data/lib/client/subscriptions.rb +37 -0
- data/lib/client/thumbnail.rb +17 -0
- data/lib/client/user.rb +68 -0
- data/lib/client/version.rb +3 -0
- data/lib/shutterstock-v2.rb +31 -0
- data/shutterstock-v2.gemspec +30 -0
- data/spec/cassettes/Shutterstock_Auth_get_access_token/returns_hash_with_access_token.yml +86 -0
- data/spec/cassettes/Shutterstock_Auth_get_authorize_url/returns_URL_to_redirect_user_to_passing_redirect_url_an.yml +48 -0
- data/spec/cassettes/Shutterstock_Categories/parses_params_correctly.yml +53 -0
- data/spec/cassettes/Shutterstock_Categories/returns_all_cats_for_an_image.yml +53 -0
- data/spec/cassettes/Shutterstock_Collection/add_image_adds_image_using_Image_new.yml +48 -0
- data/spec/cassettes/Shutterstock_Collection/add_image_adds_image_using_id.yml +48 -0
- data/spec/cassettes/Shutterstock_Collection/add_image_error_raises_error_if_collection_does_not_exist.yml +52 -0
- data/spec/cassettes/Shutterstock_Collection/create_creates_a_collection.yml +52 -0
- data/spec/cassettes/Shutterstock_Collection/destroy_destroys_a_collection.yml +93 -0
- data/spec/cassettes/Shutterstock_Collection/find_adds_an_image.yml +97 -0
- data/spec/cassettes/Shutterstock_Collection/find_converts_list_to_images.yml +101 -0
- data/spec/cassettes/Shutterstock_Collection/find_finds_a_collection_given_an_id.yml +52 -0
- data/spec/cassettes/Shutterstock_Collection/find_raises_error_for_invalid_collection_id.yml +50 -0
- data/spec/cassettes/Shutterstock_Collection/find_removes_an_image.yml +95 -0
- data/spec/cassettes/Shutterstock_Collection/list_returns_all_collections_for_the_current_user.yml +53 -0
- data/spec/cassettes/Shutterstock_Collection/remove_image_removes_image_using_Image_new.yml +46 -0
- data/spec/cassettes/Shutterstock_Collection/remove_image_removes_image_using_id.yml +46 -0
- data/spec/cassettes/Shutterstock_Collection/update_changes_the_name_of_a_collection.yml +97 -0
- data/spec/cassettes/Shutterstock_Collections/returns_all_collections_for_current_user.yml +53 -0
- data/spec/cassettes/Shutterstock_Image/fill_fills_all_details_of_current_image.yml +109 -0
- data/spec/cassettes/Shutterstock_Image/fills_all_details_of_current_image.yml +109 -0
- data/spec/cassettes/Shutterstock_Image/find_places_image_data_into_correct_fields.yml +56 -0
- data/spec/cassettes/Shutterstock_Image/find_places_more_image_data_into_correct_fields.yml +53 -0
- data/spec/cassettes/Shutterstock_Image/find_returns_an_Image_object.yml +56 -0
- data/spec/cassettes/Shutterstock_Image/finds_similar_images_given_an_image.yml +125 -0
- data/spec/cassettes/Shutterstock_Image/returns_an_Image_object.yml +56 -0
- data/spec/cassettes/Shutterstock_Image/returns_similar_images.yml +72 -0
- data/spec/cassettes/Shutterstock_Image/search_searches_for_images_based_on_searchterm.yml +73 -0
- data/spec/cassettes/Shutterstock_Image/search_searches_using_more_than_one_parameter.yml +77 -0
- data/spec/cassettes/Shutterstock_Image/searches_for_images_based_on_searchterm.yml +73 -0
- data/spec/cassettes/Shutterstock_Image/searches_using_more_than_one_parameter.yml +77 -0
- data/spec/cassettes/Shutterstock_Image/similar_finds_similar_images_given_an_image.yml +125 -0
- data/spec/cassettes/Shutterstock_Image/similar_returns_similar_images.yml +72 -0
- data/spec/cassettes/Shutterstock_ImageAssets/find_calculates_fields_correctly.yml +53 -0
- data/spec/cassettes/Shutterstock_ImageAssets/find_places_image_data_into_correct_fields.yml +53 -0
- data/spec/cassettes/Shutterstock_Images/fill_fills_details_of_all_images_in_list_all_images_now_have_keywords.yml +1144 -0
- data/spec/cassettes/Shutterstock_Images/returns_similar_images.yml +126 -0
- data/spec/cassettes/Shutterstock_License/license_editorial_acknowledgement_returns_error_if_requesting_an_image.yml +53 -0
- data/spec/cassettes/Shutterstock_License/license_editorial_acknowledgement_returns_licenced_image_if_ed_ack_is_.yml +52 -0
- data/spec/cassettes/Shutterstock_License/license_license_from_image_object_sends_editorial_acknowledgement_when.yml +160 -0
- data/spec/cassettes/Shutterstock_License/license_license_from_image_object_using_found_subscription.yml +108 -0
- data/spec/cassettes/Shutterstock_License/license_license_from_image_object_vector_image.yml +108 -0
- data/spec/cassettes/Shutterstock_License/license_multiple_licenses_multiple_images.yml +52 -0
- data/spec/cassettes/Shutterstock_License/license_multiple_licenses_multiple_images_from_Image_new.yml +52 -0
- data/spec/cassettes/Shutterstock_License/license_multiple_returns_error_in_Licenses_when_incorrect_image_used.yml +53 -0
- data/spec/cassettes/Shutterstock_License/license_single_licencing_same_image_twice_does_not_give_error.yml +101 -0
- data/spec/cassettes/Shutterstock_License/license_single_license_fails_when_subscription_doesn_t_allow.yml +49 -0
- data/spec/cassettes/Shutterstock_License/license_single_licenses_single_image.yml +52 -0
- data/spec/cassettes/Shutterstock_License/license_single_licenses_single_image_from_Image_new.yml +52 -0
- data/spec/cassettes/Shutterstock_License/license_single_licenses_single_image_from_hash.yml +52 -0
- data/spec/cassettes/Shutterstock_License/license_single_licenses_single_image_with_smaller_size.yml +52 -0
- data/spec/cassettes/Shutterstock_License/license_single_licenses_vector_image.yml +52 -0
- data/spec/cassettes/Shutterstock_License/license_single_licensing_same_image_twice_does_not_give_error.yml +101 -0
- data/spec/cassettes/Shutterstock_License/license_single_returns_error_when_incorrect_image_used.yml +103 -0
- data/spec/cassettes/Shutterstock_License/license_single_returns_error_when_incorrect_subscription_used.yml +53 -0
- data/spec/cassettes/Shutterstock_Models/parses_params_correctly.yml +53 -0
- data/spec/cassettes/Shutterstock_Models/returns_all_models_for_an_image.yml +53 -0
- data/spec/cassettes/Shutterstock_Subscription/allows_image_size_download_correctly_finds_if_image_size_is_possi.yml +59 -0
- data/spec/cassettes/Shutterstock_Subscription/new_parses_info_on_user_correctly.yml +59 -0
- data/spec/cassettes/Shutterstock_Subscription/new_returns_a_subscription_for_current_user.yml +59 -0
- data/spec/cassettes/Shutterstock_SubscriptionLicenseFormat/new_parses_info_correctly.yml +59 -0
- data/spec/cassettes/Shutterstock_SubscriptionLicenseFormat/new_returns_a_subscription_license_format_for_curren.yml +59 -0
- data/spec/cassettes/Shutterstock_Subscriptions/subscriptions_active_expired_total_subscriptions.yml +59 -0
- data/spec/cassettes/Shutterstock_Subscriptions/subscriptions_active_returns_only_active_subscriptions.yml +59 -0
- data/spec/cassettes/Shutterstock_Subscriptions/subscriptions_downloads_left_only_subscriptions_with_downloads_l.yml +59 -0
- data/spec/cassettes/Shutterstock_Subscriptions/subscriptions_expired_returns_only_expired_subscriptions.yml +59 -0
- data/spec/cassettes/Shutterstock_Subscriptions/subscriptions_find_subscription_for_image_size_finds_subs_to_use.yml +59 -0
- data/spec/cassettes/Shutterstock_Subscriptions/subscriptions_returns_all_subscriptions_for_current_user.yml +59 -0
- data/spec/cassettes/Shutterstock_User/find_parses_info_on_user_correctly.yml +52 -0
- data/spec/cassettes/Shutterstock_User/find_returns_object_for_current_user.yml +52 -0
- data/spec/client/auth_spec.rb +36 -0
- data/spec/client/categories_spec.rb +26 -0
- data/spec/client/category_spec.rb +16 -0
- data/spec/client/client_spec.rb +32 -0
- data/spec/client/collection_spec.rb +159 -0
- data/spec/client/collections_spec.rb +18 -0
- data/spec/client/configuration_spec.rb +10 -0
- data/spec/client/contributor_spec.rb +14 -0
- data/spec/client/driver_spec.rb +20 -0
- data/spec/client/image_assets_spec.rb +51 -0
- data/spec/client/image_size_details_spec.rb +33 -0
- data/spec/client/image_spec.rb +102 -0
- data/spec/client/images_spec.rb +31 -0
- data/spec/client/license_spec.rb +234 -0
- data/spec/client/model_spec.rb +14 -0
- data/spec/client/models_spec.rb +23 -0
- data/spec/client/request_spec.rb +79 -0
- data/spec/client/subscription_allotment_spec.rb +25 -0
- data/spec/client/subscription_license_format_spec.rb +29 -0
- data/spec/client/subscription_price_spec.rb +17 -0
- data/spec/client/subscription_spec.rb +60 -0
- data/spec/client/subscriptions_spec.rb +54 -0
- data/spec/client/thumbnail_spec.rb +21 -0
- data/spec/client/user_spec.rb +37 -0
- data/spec/spec_helper.rb +88 -0
- metadata +467 -0
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
require 'spec_helper'
|
|
2
|
+
|
|
3
|
+
describe Subscription do
|
|
4
|
+
before do
|
|
5
|
+
client
|
|
6
|
+
end
|
|
7
|
+
|
|
8
|
+
context 'new' do
|
|
9
|
+
|
|
10
|
+
subject { User.subscriptions.first }
|
|
11
|
+
|
|
12
|
+
it 'returns a subscription for current user' do
|
|
13
|
+
expect(subject).to_not be_nil
|
|
14
|
+
expect(subject).to be_a Subscription
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
it 'parses info on user correctly' do
|
|
18
|
+
# Test variables from this specific API call.
|
|
19
|
+
# Might break if vcr recording is deleted. If so, use new values
|
|
20
|
+
expect(subject.id).to eq "s29729296"
|
|
21
|
+
expect(subject.description).to eq "Monthly Subscription"
|
|
22
|
+
expect(subject.expiration_time).to eq DateTime.parse("2016-12-28T09:36:49-05:00")
|
|
23
|
+
expect(subject.price_per_download).to be nil
|
|
24
|
+
expect(subject.license).to eq "standard"
|
|
25
|
+
expect(subject.allotment).to be nil
|
|
26
|
+
expect(subject.formats).to be_a Array
|
|
27
|
+
expect(subject.formats.first).to be_a SubscriptionLicenseFormat
|
|
28
|
+
expect(subject.metadata).to eq nil
|
|
29
|
+
end
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
context 'allows_image_size_download?' do
|
|
33
|
+
|
|
34
|
+
subject { User.subscriptions.active.first }
|
|
35
|
+
|
|
36
|
+
it "correctly finds if image size is possible by this subscription" do
|
|
37
|
+
expect(subject.allows_image_size_download?("small")).to be true
|
|
38
|
+
expect(subject.allows_image_size_download?("made_up_size")).to be false
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
context 'expired?' do
|
|
44
|
+
|
|
45
|
+
subject { Subscription.new("id" => "s1", "expiration_time" => "2016-12-28T09:36:49-05:00") }
|
|
46
|
+
|
|
47
|
+
it "correctly calculates not expired plan" do
|
|
48
|
+
allow(DateTime).to receive(:now).and_return(DateTime.parse("2015-12-28T09:36:49-05:00"))
|
|
49
|
+
|
|
50
|
+
expect(subject.expired?).to be false
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
it "correctly calculates not expired plan" do
|
|
54
|
+
allow(DateTime).to receive(:now).and_return(DateTime.parse("2017-12-28T09:36:49-05:00"))
|
|
55
|
+
|
|
56
|
+
expect(subject.expired?).to be true
|
|
57
|
+
end
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
end
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
require 'spec_helper'
|
|
2
|
+
|
|
3
|
+
describe Subscriptions do
|
|
4
|
+
before do
|
|
5
|
+
client
|
|
6
|
+
end
|
|
7
|
+
|
|
8
|
+
context 'subscriptions' do
|
|
9
|
+
|
|
10
|
+
subject { User.subscriptions }
|
|
11
|
+
|
|
12
|
+
it 'returns all subscriptions for current user' do
|
|
13
|
+
expect(subject).to_not be_nil
|
|
14
|
+
expect(subject).to be_a Array
|
|
15
|
+
expect(subject.first).to be_a Subscription
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
it '.expired returns only expired subscriptions' do
|
|
19
|
+
expect(subject.expired).to be_a Array
|
|
20
|
+
expect(subject.expired.first).to be_a Subscription
|
|
21
|
+
expect(subject.expired.count).to be <= subject.count
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
it '.active returns only active subscriptions' do
|
|
25
|
+
expect(subject.active).to be_a Array
|
|
26
|
+
expect(subject.active.first).to be_a Subscription
|
|
27
|
+
expect(subject.active.count).to be <= subject.count
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
it '.active + .expired = total subscriptions' do
|
|
31
|
+
expect(subject.active.count + subject.expired.count).to eq subject.count
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
it '.downloads_left only subscriptions with downloads left' do
|
|
35
|
+
expect(subject.downloads_left).to be_a Array
|
|
36
|
+
expect(subject.downloads_left).to eq subject.select{|sub| sub.has_downloads_left? }
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
it '.find_subscription_for_image_size finds subs to use for download of image size' do
|
|
40
|
+
sub = subject.find_subscription_for_image_size("huge")
|
|
41
|
+
expect(sub.id).to eq "s30187600"
|
|
42
|
+
expect(sub.has_downloads_left?).to be true
|
|
43
|
+
expect(sub.allows_image_size_download?("huge")).to be true
|
|
44
|
+
|
|
45
|
+
# Defaults to huge when no param
|
|
46
|
+
sub = subject.find_subscription_for_image_size()
|
|
47
|
+
expect(sub.id).to eq "s30187600"
|
|
48
|
+
|
|
49
|
+
expect(subject.find_subscription_for_image_size("invalid_size")).to be nil
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
end
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
require 'spec_helper'
|
|
2
|
+
|
|
3
|
+
describe Thumbnail do
|
|
4
|
+
# before do
|
|
5
|
+
# client
|
|
6
|
+
# end
|
|
7
|
+
|
|
8
|
+
context 'initialize' do
|
|
9
|
+
it 'initializes params correctly' do
|
|
10
|
+
isd = Thumbnail.new({"height" => 299,
|
|
11
|
+
"url" => "https://image.shutterstock.com/xxx.jpg",
|
|
12
|
+
"width" => 450})
|
|
13
|
+
|
|
14
|
+
expect(isd.height).to eq 299
|
|
15
|
+
expect(isd.url).to eq "https://image.shutterstock.com/xxx.jpg"
|
|
16
|
+
expect(isd.width).to eq 450
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
end
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
require 'spec_helper'
|
|
2
|
+
|
|
3
|
+
describe User do
|
|
4
|
+
before do
|
|
5
|
+
client
|
|
6
|
+
end
|
|
7
|
+
|
|
8
|
+
context 'find' do
|
|
9
|
+
|
|
10
|
+
subject { User.find }
|
|
11
|
+
|
|
12
|
+
it 'returns object for current user' do
|
|
13
|
+
expect(subject).to_not be_nil
|
|
14
|
+
expect(subject).to be_a User
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
it 'parses info on user correctly' do
|
|
18
|
+
expect(subject.contributor_id).to be nil
|
|
19
|
+
expect(subject.customer_id).to eq ENV["SSTK_CUSTOMER_ID"]
|
|
20
|
+
expect(subject.email).to be nil
|
|
21
|
+
expect(subject.first_name).to eq ENV["SSTK_FIRST_NAME"]
|
|
22
|
+
expect(subject.full_name).to eq ENV["SSTK_FULL_NAME"]
|
|
23
|
+
expect(subject.id).to eq ENV["SSTK_USER_ID"]
|
|
24
|
+
expect(subject.last_name).to eq ENV["SSTK_LAST_NAME"]
|
|
25
|
+
expect(subject.language).to eq "en"
|
|
26
|
+
expect(subject.organization_id).to eq nil
|
|
27
|
+
expect(subject.username).to eq ENV["SSTK_USERNAME"]
|
|
28
|
+
expect(subject.is_premier).to eq nil
|
|
29
|
+
expect(subject.is_premier_parent).to eq nil
|
|
30
|
+
expect(subject.premier_permissions).to eq nil
|
|
31
|
+
expect(subject.only_sensitive_use).to eq nil
|
|
32
|
+
expect(subject.only_enhanced_license).to eq nil
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
end
|
data/spec/spec_helper.rb
ADDED
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
require 'webmock'
|
|
2
|
+
require 'vcr'
|
|
3
|
+
require 'rspec'
|
|
4
|
+
require 'pry'
|
|
5
|
+
|
|
6
|
+
require 'shutterstock'
|
|
7
|
+
include Shutterstock
|
|
8
|
+
|
|
9
|
+
DEFAULTS = {
|
|
10
|
+
SSTK_CLIENT_ID: 'client_id',
|
|
11
|
+
SSTK_CLIENT_SECRET: 'client_secret',
|
|
12
|
+
SSTK_ACCESS_TOKEN: 'access_token',
|
|
13
|
+
SSTK_BASE_API_URI: 'https://api.shutterstock.com/v2'
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
def sensitive_data(c, env_key)
|
|
17
|
+
c.filter_sensitive_data("<#{env_key}>") do
|
|
18
|
+
ENV[env_key.to_s] || DEFAULTS[env_key]
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
VCR.configure do |c|
|
|
23
|
+
c.cassette_library_dir = 'spec/cassettes'
|
|
24
|
+
c.hook_into :webmock
|
|
25
|
+
c.configure_rspec_metadata!
|
|
26
|
+
c.allow_http_connections_when_no_cassette = true
|
|
27
|
+
|
|
28
|
+
# Errors for any requests with '99999' in them
|
|
29
|
+
c.before_http_request do |request|
|
|
30
|
+
raise FailedResponse.new("uri forced failure") if request.uri =~ /99999/
|
|
31
|
+
end
|
|
32
|
+
sensitive_data(c, :SSTK_CLIENT_ID)
|
|
33
|
+
sensitive_data(c, :SSTK_CLIENT_SECRET)
|
|
34
|
+
sensitive_data(c, :SSTK_ACCESS_TOKEN)
|
|
35
|
+
|
|
36
|
+
# returned by shutterstock in cassettes, but is private
|
|
37
|
+
sensitive_data(c, :SSTK_USER_ID)
|
|
38
|
+
sensitive_data(c, :SSTK_USERNAME)
|
|
39
|
+
sensitive_data(c, :SSTK_FULL_NAME)
|
|
40
|
+
sensitive_data(c, :SSTK_FIRST_NAME)
|
|
41
|
+
sensitive_data(c, :SSTK_LAST_NAME)
|
|
42
|
+
sensitive_data(c, :SSTK_CUSTOMER_ID)
|
|
43
|
+
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
if ENV['VCR_OFF']
|
|
47
|
+
WebMock.allow_net_connect!
|
|
48
|
+
VCR.turn_off!(ignore_cassettes: true)
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
uri_without_access_token = VCR.request_matchers.uri_without_param(:access_token)
|
|
52
|
+
|
|
53
|
+
RSpec.configure do |config|
|
|
54
|
+
# Add VCR to all tests
|
|
55
|
+
config.around(:each) do |example|
|
|
56
|
+
options = example.metadata[:vcr] || {}
|
|
57
|
+
options[:match_requests_on] = [:method, uri_without_access_token]
|
|
58
|
+
#options[:record] = :new_episodes # uncomment when updating existing tests
|
|
59
|
+
if options[:record] == :skip
|
|
60
|
+
VCR.turned_off(&example)
|
|
61
|
+
else
|
|
62
|
+
name = example.metadata[:full_description]
|
|
63
|
+
.split(/\s+/, 2).join('/')
|
|
64
|
+
.gsub(/[^\w\/]+/, '_')[0..90]
|
|
65
|
+
VCR.use_cassette(name, options, &example)
|
|
66
|
+
end
|
|
67
|
+
end
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
def client
|
|
71
|
+
Client.instance.configure do |config|
|
|
72
|
+
config.client_id = ENV['SSTK_CLIENT_ID'] || "client_id"
|
|
73
|
+
config.client_secret = ENV['SSTK_CLIENT_SECRET'] || "client_secret"
|
|
74
|
+
config.access_token = ENV['SSTK_ACCESS_TOKEN'] || "access_token"
|
|
75
|
+
end
|
|
76
|
+
Client.instance
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
def client_no_token
|
|
81
|
+
Client.instance.configure do |config|
|
|
82
|
+
config.client_id = ENV['SSTK_CLIENT_ID'] || "client_id"
|
|
83
|
+
config.client_secret = ENV['SSTK_CLIENT_SECRET'] || "client_secret"
|
|
84
|
+
end
|
|
85
|
+
Client.instance
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
|
metadata
ADDED
|
@@ -0,0 +1,467 @@
|
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
|
2
|
+
name: shutterstock-v2
|
|
3
|
+
version: !ruby/object:Gem::Version
|
|
4
|
+
version: 0.0.1
|
|
5
|
+
platform: ruby
|
|
6
|
+
authors:
|
|
7
|
+
- David Peterson
|
|
8
|
+
autorequire:
|
|
9
|
+
bindir: bin
|
|
10
|
+
cert_chain: []
|
|
11
|
+
date: 2017-01-13 00:00:00.000000000 Z
|
|
12
|
+
dependencies:
|
|
13
|
+
- !ruby/object:Gem::Dependency
|
|
14
|
+
name: rspec
|
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
|
16
|
+
requirements:
|
|
17
|
+
- - ">="
|
|
18
|
+
- !ruby/object:Gem::Version
|
|
19
|
+
version: '0'
|
|
20
|
+
type: :runtime
|
|
21
|
+
prerelease: false
|
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
23
|
+
requirements:
|
|
24
|
+
- - ">="
|
|
25
|
+
- !ruby/object:Gem::Version
|
|
26
|
+
version: '0'
|
|
27
|
+
- !ruby/object:Gem::Dependency
|
|
28
|
+
name: equalizer
|
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
|
30
|
+
requirements:
|
|
31
|
+
- - ">="
|
|
32
|
+
- !ruby/object:Gem::Version
|
|
33
|
+
version: '0'
|
|
34
|
+
type: :runtime
|
|
35
|
+
prerelease: false
|
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
37
|
+
requirements:
|
|
38
|
+
- - ">="
|
|
39
|
+
- !ruby/object:Gem::Version
|
|
40
|
+
version: '0'
|
|
41
|
+
- !ruby/object:Gem::Dependency
|
|
42
|
+
name: faraday
|
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
|
44
|
+
requirements:
|
|
45
|
+
- - ">="
|
|
46
|
+
- !ruby/object:Gem::Version
|
|
47
|
+
version: '0'
|
|
48
|
+
type: :runtime
|
|
49
|
+
prerelease: false
|
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
51
|
+
requirements:
|
|
52
|
+
- - ">="
|
|
53
|
+
- !ruby/object:Gem::Version
|
|
54
|
+
version: '0'
|
|
55
|
+
- !ruby/object:Gem::Dependency
|
|
56
|
+
name: faraday_middleware
|
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
|
58
|
+
requirements:
|
|
59
|
+
- - ">="
|
|
60
|
+
- !ruby/object:Gem::Version
|
|
61
|
+
version: '0'
|
|
62
|
+
type: :runtime
|
|
63
|
+
prerelease: false
|
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
65
|
+
requirements:
|
|
66
|
+
- - ">="
|
|
67
|
+
- !ruby/object:Gem::Version
|
|
68
|
+
version: '0'
|
|
69
|
+
- !ruby/object:Gem::Dependency
|
|
70
|
+
name: pry
|
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
|
72
|
+
requirements:
|
|
73
|
+
- - ">="
|
|
74
|
+
- !ruby/object:Gem::Version
|
|
75
|
+
version: '0'
|
|
76
|
+
type: :development
|
|
77
|
+
prerelease: false
|
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
79
|
+
requirements:
|
|
80
|
+
- - ">="
|
|
81
|
+
- !ruby/object:Gem::Version
|
|
82
|
+
version: '0'
|
|
83
|
+
- !ruby/object:Gem::Dependency
|
|
84
|
+
name: pry-rescue
|
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
|
86
|
+
requirements:
|
|
87
|
+
- - ">="
|
|
88
|
+
- !ruby/object:Gem::Version
|
|
89
|
+
version: '0'
|
|
90
|
+
type: :development
|
|
91
|
+
prerelease: false
|
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
93
|
+
requirements:
|
|
94
|
+
- - ">="
|
|
95
|
+
- !ruby/object:Gem::Version
|
|
96
|
+
version: '0'
|
|
97
|
+
- !ruby/object:Gem::Dependency
|
|
98
|
+
name: pry-stack_explorer
|
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
|
100
|
+
requirements:
|
|
101
|
+
- - ">="
|
|
102
|
+
- !ruby/object:Gem::Version
|
|
103
|
+
version: '0'
|
|
104
|
+
type: :development
|
|
105
|
+
prerelease: false
|
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
107
|
+
requirements:
|
|
108
|
+
- - ">="
|
|
109
|
+
- !ruby/object:Gem::Version
|
|
110
|
+
version: '0'
|
|
111
|
+
- !ruby/object:Gem::Dependency
|
|
112
|
+
name: pry-nav
|
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
|
114
|
+
requirements:
|
|
115
|
+
- - ">="
|
|
116
|
+
- !ruby/object:Gem::Version
|
|
117
|
+
version: '0'
|
|
118
|
+
type: :development
|
|
119
|
+
prerelease: false
|
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
121
|
+
requirements:
|
|
122
|
+
- - ">="
|
|
123
|
+
- !ruby/object:Gem::Version
|
|
124
|
+
version: '0'
|
|
125
|
+
- !ruby/object:Gem::Dependency
|
|
126
|
+
name: vcr
|
|
127
|
+
requirement: !ruby/object:Gem::Requirement
|
|
128
|
+
requirements:
|
|
129
|
+
- - ">="
|
|
130
|
+
- !ruby/object:Gem::Version
|
|
131
|
+
version: '0'
|
|
132
|
+
type: :development
|
|
133
|
+
prerelease: false
|
|
134
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
135
|
+
requirements:
|
|
136
|
+
- - ">="
|
|
137
|
+
- !ruby/object:Gem::Version
|
|
138
|
+
version: '0'
|
|
139
|
+
- !ruby/object:Gem::Dependency
|
|
140
|
+
name: webmock
|
|
141
|
+
requirement: !ruby/object:Gem::Requirement
|
|
142
|
+
requirements:
|
|
143
|
+
- - ">="
|
|
144
|
+
- !ruby/object:Gem::Version
|
|
145
|
+
version: '0'
|
|
146
|
+
type: :development
|
|
147
|
+
prerelease: false
|
|
148
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
149
|
+
requirements:
|
|
150
|
+
- - ">="
|
|
151
|
+
- !ruby/object:Gem::Version
|
|
152
|
+
version: '0'
|
|
153
|
+
- !ruby/object:Gem::Dependency
|
|
154
|
+
name: rake
|
|
155
|
+
requirement: !ruby/object:Gem::Requirement
|
|
156
|
+
requirements:
|
|
157
|
+
- - ">="
|
|
158
|
+
- !ruby/object:Gem::Version
|
|
159
|
+
version: '0'
|
|
160
|
+
type: :development
|
|
161
|
+
prerelease: false
|
|
162
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
163
|
+
requirements:
|
|
164
|
+
- - ">="
|
|
165
|
+
- !ruby/object:Gem::Version
|
|
166
|
+
version: '0'
|
|
167
|
+
- !ruby/object:Gem::Dependency
|
|
168
|
+
name: guard
|
|
169
|
+
requirement: !ruby/object:Gem::Requirement
|
|
170
|
+
requirements:
|
|
171
|
+
- - ">="
|
|
172
|
+
- !ruby/object:Gem::Version
|
|
173
|
+
version: '0'
|
|
174
|
+
type: :development
|
|
175
|
+
prerelease: false
|
|
176
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
177
|
+
requirements:
|
|
178
|
+
- - ">="
|
|
179
|
+
- !ruby/object:Gem::Version
|
|
180
|
+
version: '0'
|
|
181
|
+
- !ruby/object:Gem::Dependency
|
|
182
|
+
name: guard-rspec
|
|
183
|
+
requirement: !ruby/object:Gem::Requirement
|
|
184
|
+
requirements:
|
|
185
|
+
- - ">="
|
|
186
|
+
- !ruby/object:Gem::Version
|
|
187
|
+
version: '0'
|
|
188
|
+
type: :development
|
|
189
|
+
prerelease: false
|
|
190
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
191
|
+
requirements:
|
|
192
|
+
- - ">="
|
|
193
|
+
- !ruby/object:Gem::Version
|
|
194
|
+
version: '0'
|
|
195
|
+
- !ruby/object:Gem::Dependency
|
|
196
|
+
name: rubocop
|
|
197
|
+
requirement: !ruby/object:Gem::Requirement
|
|
198
|
+
requirements:
|
|
199
|
+
- - ">="
|
|
200
|
+
- !ruby/object:Gem::Version
|
|
201
|
+
version: '0'
|
|
202
|
+
type: :development
|
|
203
|
+
prerelease: false
|
|
204
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
205
|
+
requirements:
|
|
206
|
+
- - ">="
|
|
207
|
+
- !ruby/object:Gem::Version
|
|
208
|
+
version: '0'
|
|
209
|
+
description: see summary
|
|
210
|
+
email: dp@vivitec.com.au
|
|
211
|
+
executables: []
|
|
212
|
+
extensions: []
|
|
213
|
+
extra_rdoc_files: []
|
|
214
|
+
files:
|
|
215
|
+
- ".gitignore"
|
|
216
|
+
- ".rspec"
|
|
217
|
+
- ".rubocop.yml"
|
|
218
|
+
- ".travis.yml"
|
|
219
|
+
- Dockerfile
|
|
220
|
+
- Gemfile
|
|
221
|
+
- Guardfile
|
|
222
|
+
- README.md
|
|
223
|
+
- Rakefile
|
|
224
|
+
- lib/client/auth.rb
|
|
225
|
+
- lib/client/categories.rb
|
|
226
|
+
- lib/client/category.rb
|
|
227
|
+
- lib/client/client.rb
|
|
228
|
+
- lib/client/collection.rb
|
|
229
|
+
- lib/client/collections.rb
|
|
230
|
+
- lib/client/configuration.rb
|
|
231
|
+
- lib/client/contributor.rb
|
|
232
|
+
- lib/client/driver.rb
|
|
233
|
+
- lib/client/error.rb
|
|
234
|
+
- lib/client/image.rb
|
|
235
|
+
- lib/client/image_assets.rb
|
|
236
|
+
- lib/client/image_size_details.rb
|
|
237
|
+
- lib/client/images.rb
|
|
238
|
+
- lib/client/license.rb
|
|
239
|
+
- lib/client/licenses.rb
|
|
240
|
+
- lib/client/model.rb
|
|
241
|
+
- lib/client/models.rb
|
|
242
|
+
- lib/client/request.rb
|
|
243
|
+
- lib/client/subscription.rb
|
|
244
|
+
- lib/client/subscription_allotment.rb
|
|
245
|
+
- lib/client/subscription_license_format.rb
|
|
246
|
+
- lib/client/subscription_license_formats.rb
|
|
247
|
+
- lib/client/subscription_price.rb
|
|
248
|
+
- lib/client/subscriptions.rb
|
|
249
|
+
- lib/client/thumbnail.rb
|
|
250
|
+
- lib/client/user.rb
|
|
251
|
+
- lib/client/version.rb
|
|
252
|
+
- lib/shutterstock-v2.rb
|
|
253
|
+
- shutterstock-v2.gemspec
|
|
254
|
+
- spec/cassettes/Shutterstock_Auth_get_access_token/returns_hash_with_access_token.yml
|
|
255
|
+
- spec/cassettes/Shutterstock_Auth_get_authorize_url/returns_URL_to_redirect_user_to_passing_redirect_url_an.yml
|
|
256
|
+
- spec/cassettes/Shutterstock_Categories/parses_params_correctly.yml
|
|
257
|
+
- spec/cassettes/Shutterstock_Categories/returns_all_cats_for_an_image.yml
|
|
258
|
+
- spec/cassettes/Shutterstock_Collection/add_image_adds_image_using_Image_new.yml
|
|
259
|
+
- spec/cassettes/Shutterstock_Collection/add_image_adds_image_using_id.yml
|
|
260
|
+
- spec/cassettes/Shutterstock_Collection/add_image_error_raises_error_if_collection_does_not_exist.yml
|
|
261
|
+
- spec/cassettes/Shutterstock_Collection/create_creates_a_collection.yml
|
|
262
|
+
- spec/cassettes/Shutterstock_Collection/destroy_destroys_a_collection.yml
|
|
263
|
+
- spec/cassettes/Shutterstock_Collection/find_adds_an_image.yml
|
|
264
|
+
- spec/cassettes/Shutterstock_Collection/find_converts_list_to_images.yml
|
|
265
|
+
- spec/cassettes/Shutterstock_Collection/find_finds_a_collection_given_an_id.yml
|
|
266
|
+
- spec/cassettes/Shutterstock_Collection/find_raises_error_for_invalid_collection_id.yml
|
|
267
|
+
- spec/cassettes/Shutterstock_Collection/find_removes_an_image.yml
|
|
268
|
+
- spec/cassettes/Shutterstock_Collection/list_returns_all_collections_for_the_current_user.yml
|
|
269
|
+
- spec/cassettes/Shutterstock_Collection/remove_image_removes_image_using_Image_new.yml
|
|
270
|
+
- spec/cassettes/Shutterstock_Collection/remove_image_removes_image_using_id.yml
|
|
271
|
+
- spec/cassettes/Shutterstock_Collection/update_changes_the_name_of_a_collection.yml
|
|
272
|
+
- spec/cassettes/Shutterstock_Collections/returns_all_collections_for_current_user.yml
|
|
273
|
+
- spec/cassettes/Shutterstock_Image/fill_fills_all_details_of_current_image.yml
|
|
274
|
+
- spec/cassettes/Shutterstock_Image/fills_all_details_of_current_image.yml
|
|
275
|
+
- spec/cassettes/Shutterstock_Image/find_places_image_data_into_correct_fields.yml
|
|
276
|
+
- spec/cassettes/Shutterstock_Image/find_places_more_image_data_into_correct_fields.yml
|
|
277
|
+
- spec/cassettes/Shutterstock_Image/find_returns_an_Image_object.yml
|
|
278
|
+
- spec/cassettes/Shutterstock_Image/finds_similar_images_given_an_image.yml
|
|
279
|
+
- spec/cassettes/Shutterstock_Image/returns_an_Image_object.yml
|
|
280
|
+
- spec/cassettes/Shutterstock_Image/returns_similar_images.yml
|
|
281
|
+
- spec/cassettes/Shutterstock_Image/search_searches_for_images_based_on_searchterm.yml
|
|
282
|
+
- spec/cassettes/Shutterstock_Image/search_searches_using_more_than_one_parameter.yml
|
|
283
|
+
- spec/cassettes/Shutterstock_Image/searches_for_images_based_on_searchterm.yml
|
|
284
|
+
- spec/cassettes/Shutterstock_Image/searches_using_more_than_one_parameter.yml
|
|
285
|
+
- spec/cassettes/Shutterstock_Image/similar_finds_similar_images_given_an_image.yml
|
|
286
|
+
- spec/cassettes/Shutterstock_Image/similar_returns_similar_images.yml
|
|
287
|
+
- spec/cassettes/Shutterstock_ImageAssets/find_calculates_fields_correctly.yml
|
|
288
|
+
- spec/cassettes/Shutterstock_ImageAssets/find_places_image_data_into_correct_fields.yml
|
|
289
|
+
- spec/cassettes/Shutterstock_Images/fill_fills_details_of_all_images_in_list_all_images_now_have_keywords.yml
|
|
290
|
+
- spec/cassettes/Shutterstock_Images/returns_similar_images.yml
|
|
291
|
+
- spec/cassettes/Shutterstock_License/license_editorial_acknowledgement_returns_error_if_requesting_an_image.yml
|
|
292
|
+
- spec/cassettes/Shutterstock_License/license_editorial_acknowledgement_returns_licenced_image_if_ed_ack_is_.yml
|
|
293
|
+
- spec/cassettes/Shutterstock_License/license_license_from_image_object_sends_editorial_acknowledgement_when.yml
|
|
294
|
+
- spec/cassettes/Shutterstock_License/license_license_from_image_object_using_found_subscription.yml
|
|
295
|
+
- spec/cassettes/Shutterstock_License/license_license_from_image_object_vector_image.yml
|
|
296
|
+
- spec/cassettes/Shutterstock_License/license_multiple_licenses_multiple_images.yml
|
|
297
|
+
- spec/cassettes/Shutterstock_License/license_multiple_licenses_multiple_images_from_Image_new.yml
|
|
298
|
+
- spec/cassettes/Shutterstock_License/license_multiple_returns_error_in_Licenses_when_incorrect_image_used.yml
|
|
299
|
+
- spec/cassettes/Shutterstock_License/license_single_licencing_same_image_twice_does_not_give_error.yml
|
|
300
|
+
- spec/cassettes/Shutterstock_License/license_single_license_fails_when_subscription_doesn_t_allow.yml
|
|
301
|
+
- spec/cassettes/Shutterstock_License/license_single_licenses_single_image.yml
|
|
302
|
+
- spec/cassettes/Shutterstock_License/license_single_licenses_single_image_from_Image_new.yml
|
|
303
|
+
- spec/cassettes/Shutterstock_License/license_single_licenses_single_image_from_hash.yml
|
|
304
|
+
- spec/cassettes/Shutterstock_License/license_single_licenses_single_image_with_smaller_size.yml
|
|
305
|
+
- spec/cassettes/Shutterstock_License/license_single_licenses_vector_image.yml
|
|
306
|
+
- spec/cassettes/Shutterstock_License/license_single_licensing_same_image_twice_does_not_give_error.yml
|
|
307
|
+
- spec/cassettes/Shutterstock_License/license_single_returns_error_when_incorrect_image_used.yml
|
|
308
|
+
- spec/cassettes/Shutterstock_License/license_single_returns_error_when_incorrect_subscription_used.yml
|
|
309
|
+
- spec/cassettes/Shutterstock_Models/parses_params_correctly.yml
|
|
310
|
+
- spec/cassettes/Shutterstock_Models/returns_all_models_for_an_image.yml
|
|
311
|
+
- spec/cassettes/Shutterstock_Subscription/allows_image_size_download_correctly_finds_if_image_size_is_possi.yml
|
|
312
|
+
- spec/cassettes/Shutterstock_Subscription/new_parses_info_on_user_correctly.yml
|
|
313
|
+
- spec/cassettes/Shutterstock_Subscription/new_returns_a_subscription_for_current_user.yml
|
|
314
|
+
- spec/cassettes/Shutterstock_SubscriptionLicenseFormat/new_parses_info_correctly.yml
|
|
315
|
+
- spec/cassettes/Shutterstock_SubscriptionLicenseFormat/new_returns_a_subscription_license_format_for_curren.yml
|
|
316
|
+
- spec/cassettes/Shutterstock_Subscriptions/subscriptions_active_expired_total_subscriptions.yml
|
|
317
|
+
- spec/cassettes/Shutterstock_Subscriptions/subscriptions_active_returns_only_active_subscriptions.yml
|
|
318
|
+
- spec/cassettes/Shutterstock_Subscriptions/subscriptions_downloads_left_only_subscriptions_with_downloads_l.yml
|
|
319
|
+
- spec/cassettes/Shutterstock_Subscriptions/subscriptions_expired_returns_only_expired_subscriptions.yml
|
|
320
|
+
- spec/cassettes/Shutterstock_Subscriptions/subscriptions_find_subscription_for_image_size_finds_subs_to_use.yml
|
|
321
|
+
- spec/cassettes/Shutterstock_Subscriptions/subscriptions_returns_all_subscriptions_for_current_user.yml
|
|
322
|
+
- spec/cassettes/Shutterstock_User/find_parses_info_on_user_correctly.yml
|
|
323
|
+
- spec/cassettes/Shutterstock_User/find_returns_object_for_current_user.yml
|
|
324
|
+
- spec/client/auth_spec.rb
|
|
325
|
+
- spec/client/categories_spec.rb
|
|
326
|
+
- spec/client/category_spec.rb
|
|
327
|
+
- spec/client/client_spec.rb
|
|
328
|
+
- spec/client/collection_spec.rb
|
|
329
|
+
- spec/client/collections_spec.rb
|
|
330
|
+
- spec/client/configuration_spec.rb
|
|
331
|
+
- spec/client/contributor_spec.rb
|
|
332
|
+
- spec/client/driver_spec.rb
|
|
333
|
+
- spec/client/image_assets_spec.rb
|
|
334
|
+
- spec/client/image_size_details_spec.rb
|
|
335
|
+
- spec/client/image_spec.rb
|
|
336
|
+
- spec/client/images_spec.rb
|
|
337
|
+
- spec/client/license_spec.rb
|
|
338
|
+
- spec/client/model_spec.rb
|
|
339
|
+
- spec/client/models_spec.rb
|
|
340
|
+
- spec/client/request_spec.rb
|
|
341
|
+
- spec/client/subscription_allotment_spec.rb
|
|
342
|
+
- spec/client/subscription_license_format_spec.rb
|
|
343
|
+
- spec/client/subscription_price_spec.rb
|
|
344
|
+
- spec/client/subscription_spec.rb
|
|
345
|
+
- spec/client/subscriptions_spec.rb
|
|
346
|
+
- spec/client/thumbnail_spec.rb
|
|
347
|
+
- spec/client/user_spec.rb
|
|
348
|
+
- spec/spec_helper.rb
|
|
349
|
+
homepage: https://github.com/dippysan/shutterstock
|
|
350
|
+
licenses: []
|
|
351
|
+
metadata: {}
|
|
352
|
+
post_install_message:
|
|
353
|
+
rdoc_options: []
|
|
354
|
+
require_paths:
|
|
355
|
+
- lib
|
|
356
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
|
357
|
+
requirements:
|
|
358
|
+
- - ">="
|
|
359
|
+
- !ruby/object:Gem::Version
|
|
360
|
+
version: '0'
|
|
361
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
362
|
+
requirements:
|
|
363
|
+
- - ">="
|
|
364
|
+
- !ruby/object:Gem::Version
|
|
365
|
+
version: '0'
|
|
366
|
+
requirements: []
|
|
367
|
+
rubyforge_project:
|
|
368
|
+
rubygems_version: 2.5.1
|
|
369
|
+
signing_key:
|
|
370
|
+
specification_version: 4
|
|
371
|
+
summary: A ruby client to work with shutterstock API v2
|
|
372
|
+
test_files:
|
|
373
|
+
- spec/cassettes/Shutterstock_Auth_get_access_token/returns_hash_with_access_token.yml
|
|
374
|
+
- spec/cassettes/Shutterstock_Auth_get_authorize_url/returns_URL_to_redirect_user_to_passing_redirect_url_an.yml
|
|
375
|
+
- spec/cassettes/Shutterstock_Categories/parses_params_correctly.yml
|
|
376
|
+
- spec/cassettes/Shutterstock_Categories/returns_all_cats_for_an_image.yml
|
|
377
|
+
- spec/cassettes/Shutterstock_Collection/add_image_adds_image_using_Image_new.yml
|
|
378
|
+
- spec/cassettes/Shutterstock_Collection/add_image_adds_image_using_id.yml
|
|
379
|
+
- spec/cassettes/Shutterstock_Collection/add_image_error_raises_error_if_collection_does_not_exist.yml
|
|
380
|
+
- spec/cassettes/Shutterstock_Collection/create_creates_a_collection.yml
|
|
381
|
+
- spec/cassettes/Shutterstock_Collection/destroy_destroys_a_collection.yml
|
|
382
|
+
- spec/cassettes/Shutterstock_Collection/find_adds_an_image.yml
|
|
383
|
+
- spec/cassettes/Shutterstock_Collection/find_converts_list_to_images.yml
|
|
384
|
+
- spec/cassettes/Shutterstock_Collection/find_finds_a_collection_given_an_id.yml
|
|
385
|
+
- spec/cassettes/Shutterstock_Collection/find_raises_error_for_invalid_collection_id.yml
|
|
386
|
+
- spec/cassettes/Shutterstock_Collection/find_removes_an_image.yml
|
|
387
|
+
- spec/cassettes/Shutterstock_Collection/list_returns_all_collections_for_the_current_user.yml
|
|
388
|
+
- spec/cassettes/Shutterstock_Collection/remove_image_removes_image_using_Image_new.yml
|
|
389
|
+
- spec/cassettes/Shutterstock_Collection/remove_image_removes_image_using_id.yml
|
|
390
|
+
- spec/cassettes/Shutterstock_Collection/update_changes_the_name_of_a_collection.yml
|
|
391
|
+
- spec/cassettes/Shutterstock_Collections/returns_all_collections_for_current_user.yml
|
|
392
|
+
- spec/cassettes/Shutterstock_Image/fill_fills_all_details_of_current_image.yml
|
|
393
|
+
- spec/cassettes/Shutterstock_Image/fills_all_details_of_current_image.yml
|
|
394
|
+
- spec/cassettes/Shutterstock_Image/find_places_image_data_into_correct_fields.yml
|
|
395
|
+
- spec/cassettes/Shutterstock_Image/find_places_more_image_data_into_correct_fields.yml
|
|
396
|
+
- spec/cassettes/Shutterstock_Image/find_returns_an_Image_object.yml
|
|
397
|
+
- spec/cassettes/Shutterstock_Image/finds_similar_images_given_an_image.yml
|
|
398
|
+
- spec/cassettes/Shutterstock_Image/returns_an_Image_object.yml
|
|
399
|
+
- spec/cassettes/Shutterstock_Image/returns_similar_images.yml
|
|
400
|
+
- spec/cassettes/Shutterstock_Image/search_searches_for_images_based_on_searchterm.yml
|
|
401
|
+
- spec/cassettes/Shutterstock_Image/search_searches_using_more_than_one_parameter.yml
|
|
402
|
+
- spec/cassettes/Shutterstock_Image/searches_for_images_based_on_searchterm.yml
|
|
403
|
+
- spec/cassettes/Shutterstock_Image/searches_using_more_than_one_parameter.yml
|
|
404
|
+
- spec/cassettes/Shutterstock_Image/similar_finds_similar_images_given_an_image.yml
|
|
405
|
+
- spec/cassettes/Shutterstock_Image/similar_returns_similar_images.yml
|
|
406
|
+
- spec/cassettes/Shutterstock_ImageAssets/find_calculates_fields_correctly.yml
|
|
407
|
+
- spec/cassettes/Shutterstock_ImageAssets/find_places_image_data_into_correct_fields.yml
|
|
408
|
+
- spec/cassettes/Shutterstock_Images/fill_fills_details_of_all_images_in_list_all_images_now_have_keywords.yml
|
|
409
|
+
- spec/cassettes/Shutterstock_Images/returns_similar_images.yml
|
|
410
|
+
- spec/cassettes/Shutterstock_License/license_editorial_acknowledgement_returns_error_if_requesting_an_image.yml
|
|
411
|
+
- spec/cassettes/Shutterstock_License/license_editorial_acknowledgement_returns_licenced_image_if_ed_ack_is_.yml
|
|
412
|
+
- spec/cassettes/Shutterstock_License/license_license_from_image_object_sends_editorial_acknowledgement_when.yml
|
|
413
|
+
- spec/cassettes/Shutterstock_License/license_license_from_image_object_using_found_subscription.yml
|
|
414
|
+
- spec/cassettes/Shutterstock_License/license_license_from_image_object_vector_image.yml
|
|
415
|
+
- spec/cassettes/Shutterstock_License/license_multiple_licenses_multiple_images.yml
|
|
416
|
+
- spec/cassettes/Shutterstock_License/license_multiple_licenses_multiple_images_from_Image_new.yml
|
|
417
|
+
- spec/cassettes/Shutterstock_License/license_multiple_returns_error_in_Licenses_when_incorrect_image_used.yml
|
|
418
|
+
- spec/cassettes/Shutterstock_License/license_single_licencing_same_image_twice_does_not_give_error.yml
|
|
419
|
+
- spec/cassettes/Shutterstock_License/license_single_license_fails_when_subscription_doesn_t_allow.yml
|
|
420
|
+
- spec/cassettes/Shutterstock_License/license_single_licenses_single_image.yml
|
|
421
|
+
- spec/cassettes/Shutterstock_License/license_single_licenses_single_image_from_Image_new.yml
|
|
422
|
+
- spec/cassettes/Shutterstock_License/license_single_licenses_single_image_from_hash.yml
|
|
423
|
+
- spec/cassettes/Shutterstock_License/license_single_licenses_single_image_with_smaller_size.yml
|
|
424
|
+
- spec/cassettes/Shutterstock_License/license_single_licenses_vector_image.yml
|
|
425
|
+
- spec/cassettes/Shutterstock_License/license_single_licensing_same_image_twice_does_not_give_error.yml
|
|
426
|
+
- spec/cassettes/Shutterstock_License/license_single_returns_error_when_incorrect_image_used.yml
|
|
427
|
+
- spec/cassettes/Shutterstock_License/license_single_returns_error_when_incorrect_subscription_used.yml
|
|
428
|
+
- spec/cassettes/Shutterstock_Models/parses_params_correctly.yml
|
|
429
|
+
- spec/cassettes/Shutterstock_Models/returns_all_models_for_an_image.yml
|
|
430
|
+
- spec/cassettes/Shutterstock_Subscription/allows_image_size_download_correctly_finds_if_image_size_is_possi.yml
|
|
431
|
+
- spec/cassettes/Shutterstock_Subscription/new_parses_info_on_user_correctly.yml
|
|
432
|
+
- spec/cassettes/Shutterstock_Subscription/new_returns_a_subscription_for_current_user.yml
|
|
433
|
+
- spec/cassettes/Shutterstock_SubscriptionLicenseFormat/new_parses_info_correctly.yml
|
|
434
|
+
- spec/cassettes/Shutterstock_SubscriptionLicenseFormat/new_returns_a_subscription_license_format_for_curren.yml
|
|
435
|
+
- spec/cassettes/Shutterstock_Subscriptions/subscriptions_active_expired_total_subscriptions.yml
|
|
436
|
+
- spec/cassettes/Shutterstock_Subscriptions/subscriptions_active_returns_only_active_subscriptions.yml
|
|
437
|
+
- spec/cassettes/Shutterstock_Subscriptions/subscriptions_downloads_left_only_subscriptions_with_downloads_l.yml
|
|
438
|
+
- spec/cassettes/Shutterstock_Subscriptions/subscriptions_expired_returns_only_expired_subscriptions.yml
|
|
439
|
+
- spec/cassettes/Shutterstock_Subscriptions/subscriptions_find_subscription_for_image_size_finds_subs_to_use.yml
|
|
440
|
+
- spec/cassettes/Shutterstock_Subscriptions/subscriptions_returns_all_subscriptions_for_current_user.yml
|
|
441
|
+
- spec/cassettes/Shutterstock_User/find_parses_info_on_user_correctly.yml
|
|
442
|
+
- spec/cassettes/Shutterstock_User/find_returns_object_for_current_user.yml
|
|
443
|
+
- spec/client/auth_spec.rb
|
|
444
|
+
- spec/client/categories_spec.rb
|
|
445
|
+
- spec/client/category_spec.rb
|
|
446
|
+
- spec/client/client_spec.rb
|
|
447
|
+
- spec/client/collection_spec.rb
|
|
448
|
+
- spec/client/collections_spec.rb
|
|
449
|
+
- spec/client/configuration_spec.rb
|
|
450
|
+
- spec/client/contributor_spec.rb
|
|
451
|
+
- spec/client/driver_spec.rb
|
|
452
|
+
- spec/client/image_assets_spec.rb
|
|
453
|
+
- spec/client/image_size_details_spec.rb
|
|
454
|
+
- spec/client/image_spec.rb
|
|
455
|
+
- spec/client/images_spec.rb
|
|
456
|
+
- spec/client/license_spec.rb
|
|
457
|
+
- spec/client/model_spec.rb
|
|
458
|
+
- spec/client/models_spec.rb
|
|
459
|
+
- spec/client/request_spec.rb
|
|
460
|
+
- spec/client/subscription_allotment_spec.rb
|
|
461
|
+
- spec/client/subscription_license_format_spec.rb
|
|
462
|
+
- spec/client/subscription_price_spec.rb
|
|
463
|
+
- spec/client/subscription_spec.rb
|
|
464
|
+
- spec/client/subscriptions_spec.rb
|
|
465
|
+
- spec/client/thumbnail_spec.rb
|
|
466
|
+
- spec/client/user_spec.rb
|
|
467
|
+
- spec/spec_helper.rb
|