Skip to content

Commit

Permalink
Merge pull request #6 from tylercai/remove_license_model
Browse files Browse the repository at this point in the history
Remove license_models
  • Loading branch information
ssterli2 authored Dec 10, 2019
2 parents 40b9668 + d1993f2 commit 17934a0
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 26 deletions.
2 changes: 1 addition & 1 deletion lib/Search/SearchImages.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ class SearchImages < RequestBase

API_ROUTE = "/v3/search/images" # mashery endpoint
QUERY_PARAMS_NAMES = ["age_of_people","artists","collection_codes","collections_filter_type","color","compositions","embed_content_only","ethnicity","event_ids","exclude_nudity","fields",
"file_types","graphical_styles","keyword_ids","license_models","minimum_size","number_of_people","orientations","page","page_size","phrase","prestige_content_only","product_types",
"file_types","graphical_styles","keyword_ids","minimum_size","number_of_people","orientations","page","page_size","phrase","prestige_content_only","product_types",
"sort_order","specific_people"]

QUERY_PARAMS_NAMES.each do |key|
Expand Down
2 changes: 1 addition & 1 deletion lib/Search/SearchImagesCreative.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ class SearchImagesCreative < RequestBase

API_ROUTE = "/v3/search/images/creative" # mashery endpoint
QUERY_PARAMS_NAMES = ["age_of_people","artists","collection_codes","collections_filter_type","color","compositions","embed_content_only","ethnicity","exclude_nudity","fields","file_types",
"graphical_styles","keyword_ids","license_models","minimum_size","number_of_people","orientations","page","page_size","phrase","prestige_content_only","product_types",
"graphical_styles","keyword_ids","minimum_size","number_of_people","orientations","page","page_size","phrase","prestige_content_only","product_types",
"sort_order"]

QUERY_PARAMS_NAMES.each do |key|
Expand Down
12 changes: 0 additions & 12 deletions unit_tests/SearchImagesCreativeTests.rb
Original file line number Diff line number Diff line change
Expand Up @@ -178,18 +178,6 @@ def test_search_images_creative_with_keyword_ids
assert_equal({"message" => "success"}, search_results.to_hash )
end

def test_search_images_creative_with_license_models
stub_request(:get, "https://api.gettyimages.com/v3/search/images/creative").with(query: {"license_models" => ["rightsmanaged", "royaltyfree"].join(",")})
.to_return(body: '{ "message": "success" }')

apiClient = ApiClient.new("api key", "api secret")
search_results = apiClient.search_images_creative()
.with_license_models(["rightsmanaged", "royaltyfree"])
.execute()

assert_equal({"message" => "success"}, search_results.to_hash )
end

def test_search_images_creative_with_minimum_size
stub_request(:get, "https://api.gettyimages.com/v3/search/images/creative").with(query: {"minimum_size" => "small"})
.to_return(body: '{ "message": "success" }')
Expand Down
12 changes: 0 additions & 12 deletions unit_tests/SearchImagesTests.rb
Original file line number Diff line number Diff line change
Expand Up @@ -191,18 +191,6 @@ def test_search_images_with_keyword_ids
assert_equal({"message" => "success"}, search_results.to_hash )
end

def test_search_images_with_license_models
stub_request(:get, "https://api.gettyimages.com/v3/search/images").with(query: {"license_models" => ["rightsmanaged", "royaltyfree"].join(",")})
.to_return(body: '{ "message": "success" }')

apiClient = ApiClient.new("api key", "api secret")
search_results = apiClient.search_images()
.with_license_models(["rightsmanaged", "royaltyfree"])
.execute()

assert_equal({"message" => "success"}, search_results.to_hash )
end

def test_search_images_with_minimum_size
stub_request(:get, "https://api.gettyimages.com/v3/search/images").with(query: {"minimum_size" => "small"})
.to_return(body: '{ "message": "success" }')
Expand Down

0 comments on commit 17934a0

Please sign in to comment.