Created
September 9, 2011 07:24
-
-
Save mimeoconnect/1205666 to your computer and use it in GitHub Desktop.
Doc APIs - Poster - Order Quote (GET)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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