module PrintfulAPI
Constants
- VERSION
Public Class Methods
api_key=( api_key )
click to toggle source
# File lib/printful_api.rb, line 42 def self.api_key=( api_key ) @@client = PrintfulClient.new( api_key ) end
request( method, path, opts = {} )
click to toggle source
# File lib/printful_api.rb, line 46 def self.request( method, path, opts = {} ) # puts "#{method}, #{path}, #{opts}" case method.to_s.upcase when "GET" @@client.get(path, opts[:params]) when "DELETE" @@client.delete(path, opts[:params]) when "POST" @@client.post(path, opts[:data], opts[:params]) when "PUT" @@client.put(path, opts[:data], opts[:params]) else die() end end