Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

A gem wrapping CafePress API and trying to make up for the API's inadequacies

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 lib
Octocat-spinner-32 .gitignore
Octocat-spinner-32 Gemfile
Octocat-spinner-32 LICENSE
Octocat-spinner-32 README
Octocat-spinner-32 Rakefile
Octocat-spinner-32 cafepress_api.gemspec
README
# Copyright 2011 Benjamin Lee Smith <benjamin.lee.smith@gmail.com>
#
# This file is part of CafePressAPI.
# CafePressAPI is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# CafePressAPI is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with CafePressAPI.  If not, see <http://www.gnu.org/licenses/>.

== INTRODUCTION ==
CafePressAPI is a simple Ruby wrapper for some of the CafePress API
http://developer.cafepress.com/docs

== HOW TO ==
The library is fairly simple. Taking a look at the class methods defined in
cafepress_api.rb will give you a better idea of how things work. Configuration
stuff can either be passed as argument(s) when calling the methods, or placed
in environment variables.

$ irb
> require 'rubygems'
=> true
> require 'cafepress_api'
=> true
> CafePressAPI.get_store_products('carabinerpirate','YOUR-CAFEPRESS-API-KEY')
=> [{:cafepress_design_id=>"21823412", :cafepress_back_design_id=>nil, :default_caption=>"Women's Long Sleeve Dark T-Shirt", :cafepress_product_id=>"164539429", :name=>"Pirates of the Carabiner Women's Long Sleeve Shirt", :url=>"http://www.cafepress.com/buy/x/-/pv_design_prod/pg_1/p_2627625.164539429/pNo_164539429"}, ...]
> CafePressAPI.add_to_cart_url('164539432', '6', '29', 2, 'http://rockclimbingshirts.com')
=> "http://www.cafepress.com/cp/addtocart.aspx?color_164539432=29&size_164539432=6&qty_164539432=2&keepshopping=http://rockclimbingshirts.com&storeid=search"

I wrote this gem for a Rails app which creates a portal of multiple CafePress
basic stores (https://github.com/benjaminleesmith/cafepress_wrapper). This gem
was built with very specific use cases in mind. If you find it lacking, please
improve on it and contribute (https://github.com/benjaminleesmith/cafepress_api)

== TODO ==
* Lots.
Something went wrong with that request. Please try again.