Class: YahooShoppingSearch::Config

Inherits:
Object
  • Object
show all
Defined in:
lib/yahoo_shopping_search/config.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#affiliate_typeObject

Returns the value of attribute affiliate_type.



5
6
7
# File 'lib/yahoo_shopping_search/config.rb', line 5

def affiliate_type
  @affiliate_type
end

#app_idObject

Returns the value of attribute app_id.



5
6
7
# File 'lib/yahoo_shopping_search/config.rb', line 5

def app_id
  @app_id
end

#pidObject

Returns the value of attribute pid.



5
6
7
# File 'lib/yahoo_shopping_search/config.rb', line 5

def pid
  @pid
end

#sidObject

Returns the value of attribute sid.



5
6
7
# File 'lib/yahoo_shopping_search/config.rb', line 5

def sid
  @sid
end

Instance Method Details

#affiliate_idString

Returns:

  • (String)


9
10
11
12
13
14
# File 'lib/yahoo_shopping_search/config.rb', line 9

def affiliate_id
  return if sid.nil? || pid.nil?

  base_url = 'https://ck.jp.ap.valuecommerce.com/servlet/referral'
  URI.encode("#{base_url}?sid=#{sid}&pid=#{pid}&vc_url=")
end