lib/blurb/suggested_keyword.rb in blurb-0.2.3 vs lib/blurb/suggested_keyword.rb in blurb-0.3.0
- old
+ new
@@ -1,29 +1,29 @@
module Blurb
class SuggestedKeyword < BaseResource
- def self.ad_group_suggestions(params = {}, opts = {})
+ def ad_group_suggestions(params = {}, opts = {})
# required argument checks
raise ArgumentError.new("params hash must contain an adGroupId") unless params["adGroupId"]
get_request("/v2/adGroups/#{params["adGroupId"]}/suggested/keywords?#{setup_url_params(params)}")
end
- def self.ad_group_extended_suggestions(params = {}, opts = {})
+ def ad_group_extended_suggestions(params = {}, opts = {})
# required argument checks
raise ArgumentError.new("params hash must contain an adGroupId") unless params["adGroupId"]
get_request("/v2/adGroups/#{params["adGroupId"]}/suggested/keywords/extended?#{setup_url_params(params)}")
end
- def self.asin_suggestions(params = {}, opts = {})
+ def asin_suggestions(params = {}, opts = {})
# required argument checks
raise ArgumentError.new("params hash must contain an asinValue") unless params["asinValue"]
get_request("/v2/asins/#{params["asinValue"]}/suggested/keywords?#{setup_url_params(params)}")
end
- def self.bulk_asin_suggestions(params = {}, opts = {})
+ def bulk_asin_suggestions(params = {}, opts = {})
# required argument checks
raise ArgumentError.new("params hash must contain an asins array") unless params["asins"]
maxNumSuggestions = 100
maxNumSuggestions = params["maxNumSuggestions"] if params["maxNumSuggestions"]
@@ -34,10 +34,10 @@
})
end
private
- def self.setup_url_params(params)
+ def setup_url_params(params)
url_params = ""
url_params = "maxNumSuggestions=#{params['maxNumSuggestions']}" if params['maxNumSuggestions']
if params['adStateFilter']
url_params += "&" if url_params.size > 0