cafepress_api 0.3.0 → 0.3.1

Sign up to get free protection for your applications and to get access to all the features.
data/lib/cafepress_api.rb CHANGED
@@ -22,6 +22,7 @@ module CafePressAPI
22
22
  RESULTS_PER_PAGE = 100
23
23
  FRONT_PRODUCT_VIEW = 'f'
24
24
  BACK_PRODUCT_VIEW = 'b'
25
+ ADD_TO_CART_BASE_URL = 'http://www.cafepress.com/cp/addtocart.aspx'
25
26
  include ProductGenders
26
27
  include ProductColors
27
28
 
@@ -32,7 +33,7 @@ module CafePressAPI
32
33
  # Generates a url to add one product to a CafePress cart.
33
34
  # This isn't part of the CafePress API, use at your own risk!
34
35
  def self.add_to_cart_url(product_id, size, color, quantity, keep_shopping_url)
35
- "http://www.cafepress.com/cp/addtocart.aspx?color_#{product_id}=#{color}&size_#{product_id}=#{size}&qty_#{product_id}=#{quantity}&keepshopping=#{keep_shopping_url}&storeid=search"
36
+ "#{ADD_TO_CART_BASE_URL}?color_#{product_id}=#{color}&size_#{product_id}=#{size}&qty_#{product_id}=#{quantity}&keepshopping=#{keep_shopping_url}&storeid=search"
36
37
  end
37
38
 
38
39
  def self.user_token(app_key = ENV['cp_app_key'], email = ENV['cp_email'], password = ENV['cp_password'])
@@ -15,5 +15,5 @@
15
15
  # along with CafePressAPI. If not, see <http://www.gnu.org/licenses/>.
16
16
 
17
17
  module CafePressAPI
18
- VERSION = "0.3.0"
18
+ VERSION = "0.3.1"
19
19
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cafepress_api
3
3
  version: !ruby/object:Gem::Version
4
- hash: 19
4
+ hash: 17
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 3
9
- - 0
10
- version: 0.3.0
9
+ - 1
10
+ version: 0.3.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - Benjamin Lee Smith
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-03-07 00:00:00 -07:00
18
+ date: 2011-03-08 00:00:00 -07:00
19
19
  default_executable:
20
20
  dependencies: []
21
21