Created
September 9, 2011 17:47
-
-
Save mimeoconnect/1206858 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
using System; | |
using System.Web.UI; | |
using System.Web.UI.WebControls; | |
using System.Web.UI.HtmlControls; | |
using System.Data; | |
using System.IO; | |
using System.Net; | |
using System.Text; | |
using System.Xml; | |
namespace Mimeo | |
{ | |
public class Poster | |
{ | |
public void OrderQuote() | |
{ | |
string userid = "[user id]"; | |
string userkey = "[user key]"; | |
string size = "11x17"; | |
string paperstock = "Premium Photo"; | |
string lamination = "None"; | |
string mounting = "None"; | |
string pdfurl = "[url of PDF]"; | |
string companyname = "Mimeo"; | |
string fullname = "Kin Lane"; | |
string firstname = "Kin"; | |
string lastname = "Lane"; | |
string careof = ""; | |
string streetaddress = "588 Sutter Street"; | |
string apartmentorsuite = "Suite 203"; | |
string city = "San Francisco"; | |
string state = "CA"; | |
string postalcode = "94102"; | |
string phone = "555-555-5555"; | |
string email = "[email protected]"; | |
string isresidential = "true"; | |
string quantity = "1"; | |
string shippingchoice = "Ground"; | |
string format = "json"; | |
string environment = "Sandbox"; | |
System.Text.StringBuilder build_url = new System.Text.StringBuilder(); | |
//Sandbox Connection | |
build_url("https://developer.mimeo.com/api/poster/orderquote/"); | |
build_url("?userid="+userid); | |
build_url("&userkey="+userkey); | |
build_url("&size="+size); | |
build_url("&paperstock="+paperstock); | |
build_url("&lamination="+lamination); | |
build_url("&mounting="+mounting); | |
build_url("&pdfurl="+pdfurl); | |
build_url("&companyname="+companyname); | |
build_url("&fullname="+fullname); | |
build_url("&firstname="+firstname); | |
build_url("&lastname="+lastname); | |
build_url("&careof="+careof); | |
build_url("&streetaddress="+streetaddress); | |
build_url("&apartmentorsuite="+apartmentorsuite); | |
build_url("&city="+city); | |
build_url("&state="+state); | |
build_url("&postalcode="+postalcode); | |
build_url("&phone="+phone); | |
build_url("&email="+email); | |
build_url("&isresidential="+isresidential); | |
build_url("&quantity="+quantity); | |
build_url("&shippingchoice="+shippingchoice); | |
build_url("&format="+format); | |
build_url("&environment="+environment); | |
string get_url = build_url(); | |
HttpWebRequest request = (HttpWebRequest) HttpWebRequest.Create (get_url); | |
request.Method = "GET"; | |
string new_product_template = ""; | |
using (HttpWebResponse response = request.GetResponse() as HttpWebResponse) | |
{ | |
// Get the response stream | |
StreamReader reader = new StreamReader(response.GetResponseStream()); | |
// Console application output | |
response = reader.ReadToEnd(); | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment