Created
September 9, 2011 17:31
-
-
Save mimeoconnect/1206824 to your computer and use it in GitHub Desktop.
Doc APIs - Poster - 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 Quote() | |
{ | |
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 format = "json"; | |
string environment = "Sandbox"; | |
System.Text.StringBuilder build_url = new System.Text.StringBuilder(); | |
//Sandbox Connection | |
build_url("https://developer.mimeo.com/api/poster/quote/"); | |
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("&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(); | |
} | |
} | |
} | |
} |
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 OrderService | |
{ | |
public void NewProduct() | |
{ | |
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 format = "json"; | |
string environment = "Sandbox"; | |
System.Text.StringBuilder build_url = new System.Text.StringBuilder(); | |
//Sandbox Connection | |
build_url("https://developer.mimeo.com/api/poster/quote/"); | |
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("&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