Created
September 9, 2011 06:06
-
-
Save mimeoconnect/1205576 to your computer and use it in GitHub Desktop.
Doc APIs - Poster - Shipping Options (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
import urllib2 | |
# 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" | |
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 = "info@dot.com" | |
isresidential = "True" | |
quantity = "5" | |
format = "JSON" | |
environment = "Sandbox" | |
mimeouser = "" | |
mimeopass = "" | |
url = 'https://developer.mimeo.com/shippingoptions/?' | |
url += "userid=" + userid | |
url += "userkey=" + userkey | |
url += "size=" + size | |
url += "paperstock=" + paperstock | |
url += "lamination=" + lamination | |
url += "mounting=" + mounting | |
url += "pdfurl=" + pdfurl | |
url += "companyname=" + companyname | |
url += "fullname=" + fullname | |
url += "firstname=" + firstname | |
url += "lastname=" + lastname | |
url += "careof=" + careof | |
url += "streetaddress=" + streetaddress | |
url += "apartmentorsuite=" + apartmentorsuite | |
url += "city=" + city | |
url += "state=" + state | |
url += "postalcode=" + postalcode | |
url += "phone=" + phone | |
url += "email=" + email | |
url += "isresidential=" + isresidential | |
url += "quantity=" + quantity | |
url += "format=" + format | |
url += "environment=" + environment | |
url += "mimeouser=" + mimeouser | |
url += "mimeopass=" + mimeopass} | |
response = urllib2.urlopen(url).read() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment