Sha256: 067eb3374201f03e17d1d0c8478f5e5e30f3ea30551a70c069f4ce46d06a7794
Contents?: true
Size: 502 Bytes
Versions: 1
Compression:
Stored size: 502 Bytes
Contents
module MakePrintable class Client def base_uri(path='/') "http://api.makeprintable.com#{path}?api_key=#{api_key}&api_secret=#{api_secret}" end def configure_payload(path, opts={}) base_uri(path) + opts.to_params end def get_request(uri) JSON.parse RestClient.get(uri) end def post_request(path, opts) JSON.parse RestClient.post(base_uri(path), opts) end def delete_request(uri) JSON.parse RestClient.delete(uri) end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
makeprintable-0.0.1 | lib/makeprintable/client/endpoints.rb |