Method: LinkshareAPI::CouponWebService#initialize
- Defined in:
- lib/linkshare_api/coupon_web_service.rb
#initialize ⇒ CouponWebService
Returns a new instance of CouponWebService.
12 13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/linkshare_api/coupon_web_service.rb', line 12 def initialize @token = LinkshareAPI.token @api_base_url = LinkshareAPI::WEB_SERVICE_URIS[:coupon_web_service] @api_timeout = LinkshareAPI.api_timeout if @token.nil? raise AuthenticationError.new( "No token. Set your token by using 'LinkshareAPI.token = <TOKEN>'. " + "You can retrieve your token from LinkhShare's Web Services page under the Links tab. " + "See http://helpcenter.linkshare.com/publisher/questions.php?questionid=648 for details." ) end end |