Skip to content

Instantly share code, notes, and snippets.

@mimeoconnect
Created September 9, 2011 07:21
Show Gist options
  • Save mimeoconnect/1205664 to your computer and use it in GitHub Desktop.
Save mimeoconnect/1205664 to your computer and use it in GitHub Desktop.
Doc APIs - Poster - Quote (GET)
require 'net/http'
# Get Shipping Options
userid = "[your user id]"
userkey = "[your user key]"
size = "8.5x11"
paperstock = "Premium Photo"
lamination = "None"
mounting = "None"
pdfurl = "http://kinlane-productions.s3.amazonaws.com/pdf-samples/high-resolution-images/austrian-mountains-seen-in-the-distance.pdf"
format = "JSON"
environment = "Sandbox"
mimeouser = ""
mimeopass = ""
url = 'https://developer.mimeo.com/quote/?'
url = url + "userid=" + userid
url = url + "userkey=" + userkey
url = url + "size=" + size
url = url + "paperstock=" + paperstock
url = url + "lamination=" + lamination
url = url + "mounting=" + mounting
url = url + "pdfurl=" + pdfurl
url = url + "format=" + format
url = url + "environment=" + environment
url = url + "mimeouser=" + mimeouser
url = url + "mimeopass=" + mimeopass}
resp = Net::HTTP.get_response(URI.parse(url))
resp_text = resp.body
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment