Skip to content

Instantly share code, notes, and snippets.

@mimeoconnect
Created September 9, 2011 07:24
Show Gist options
  • Save mimeoconnect/1205666 to your computer and use it in GitHub Desktop.
Save mimeoconnect/1205666 to your computer and use it in GitHub Desktop.
Doc APIs - Poster - Order Quote (GET)
require 'net/http'
# Get Order Quote
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"
companyname = "Mimeo"
fullname = "John Doe"
firstname = "John"
lastname = "Doe"
careof = "Jane Doe"
streetaddress = "123 There Street"
apartmentorsuite = "Suite 101"
state = "NY"
postalcode = "91101"
phone = "555-555-5555"
email = "[email protected]"
isresidential = "True"
quantity = "5"
format = "JSON"
environment = "Sandbox"
mimeouser = ""
mimeopass = ""
url = 'https://developer.mimeo.com/orderquote/?'
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 + "companyname=" + companyname
url = url + "fullname=" + fullname
url = url + "firstname=" + firstname
url = url + "lastname=" + lastname
url = url + "careof=" + careof
url = url + "streetaddress=" + streetaddress
url = url + "apartmentorsuite=" + apartmentorsuite
url = url + "city=" + city
url = url + "state=" + state
url = url + "postalcode=" + postalcode
url = url + "phone=" + phone
url = url + "email=" + email
url = url + "isresidential=" + isresidential
url = url + "quantity=" + quantity
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