Documente Academic
Documente Profesional
Documente Cultură
Benoit
App Settings
The App Settings parameter is optional. An application can send both anonymous and / or signed requests to Joliprint. We recommend to add the App name parameter in the requests so Joliprint can provide accurate analytics reports.
REST API
No user key or authentication are required to use the API. The only thing you need is : 1. Choose a server based on your server location. 2. Call a method (print, xml, json, jpg, text) 3. Feed the method with a URL
Notes
URLs should be URL-encoded. You cant include a url in the request with &, ?, #, , or other reserved parameters without encoding it. Avoid spaces: any url with spaces will be
http://joliprint.com/api/
/url/print
/url/print turns a URL into a PDF document.
Love this
PDF?
December 7, 2010
Parameter
url (required): the URL to turn into PDF.
Output Example
Url to convert: http://lifehacker. com/5706937/dont-make-important-decisions-until-your-decision-time Url to convert (encoded): http%3A%2F%2Flifehacker.com%2F5 706937%2Fdont%2Dmake%2Dimportant% 2Ddecisions%2Duntil%2Dyour%2Ddecision %2Dtime Get the PDF from the API: http://api. joliprint.com/api/rest/url/print/s/ foo?url=http%3A%2F%2Flifehacker.com%2 F5706937%2Fdont%2Dmake%2Dimportant %2Ddecisions%2Duntil%2Dyour%2Ddecisi on%2Dtime
size: PDF size in bytes. lastmodified: last modification date in milliseconds. url: PDF long url. shorturl: PDF short url. preview: PDF thumbnail (JPG).
Example
Get the XML informations: http://api.joliprint.com/api/rest/url/xml/s/ foo?url=http%3A%2F%2Flifehacker.co m%2F5706937%2Fdont%2Dmake%2D important%2Ddecisions%2Duntil%2D your%2Ddecision%2Dtime <?xml version=1.0 encoding=UTF-8?> <response> <status_code>200</status_code> <status_text>OK</status_text> <data> <title>Dont Make Important Decisions Until Your Decision Time</title> <filename>lifehacker.com-don-t-make-important-decisions-until-your-decision-time-. pdf</filename> <size>267384</size> <lastmodified>1291750695000</lastmodified> <url>http://api.joliprint.com/api/rest/url/ print?url=http%3A%2F%2Flifehacker. com%2F5706937%2Fdont-make-importantdecisions-until-your-decision-time</url> <shorturl>http://prin.tt/hnT5RN</shorturl> <preview>http://api.joliprint.com/api/rest/ url/jpg?url=http%3A%2F%2Flifehacker. com%2F5706937%2Fdont-make-importantdecisions-until-your-decision-time</preview> </data> </response>
/url/xml
/url/xml returns a structured XML document that describes the PDF attributes.
Parameter
url (required): the URL to turn into PDF.
Output
status_code: indicates wether the request succeeded or failed: 200 : Success. Everything is right 500 : Fail. An error occured status_text: the status_code label: 200 : OK 500 : the error message title: webpage title filename: PDF file name
/url/json
/url/json returns a structured JSON document that describes the PDF.
http://joliprint.com/api/
Parameter
url (required): the URL to turn into PDF.
Love this
PDF?
December 7, 2010
Output
status_code: indicates wether the request succeeded or failed: 200 : Success. Everything is right 500 : Fail. An error occured status_text: the status_code label: 200 : OK 500 : the error message title: webpage title filename: PDF file name size: PDF size in bytes. lastmodified: last modification date in milliseconds. url: PDF long url. shorturl: PDF short url. preview: PDF thumbnail (JPG).
/url/jpg
/url/jpg returns a JPEG image (thumbnail) of the PDFs firt page.
Parameter
url (required): the URL to turn into PDF.
Output Example
Url to convert: http://lifehacker. com/5706937/dont-make-important-decisions-until-your-decision-time Url to convert (encoded): http%3A%2F%2Flifehacker.com%2F57069 37%2Fdont%2Dmake%2Dimportant%2Dde cisions%2Duntil%2Dyour%2Ddecision%2D time Get the thumbnail from the API: http:// api.joliprint.com/api/rest/url/jpg/s/ foo?url=http%3A%2F%2Flifehacker.com%2 F5706937%2Fdont%2Dmake%2Dimportant %2Ddecisions%2Duntil%2Dyour%2Ddecisi on%2Dtime
Example
Get the JSON informations: http:// api.joliprint.com/api/rest/url/json/s/ foo?url=http%3A%2F%2Flifehacker.com% 2F5706937%2Fdont%2Dmake%2Dimporta nt%2Ddecisions%2Duntil%2Dyour%2Ddec ision%2Dtime { status_code:200, status_txt:OK, data: { shorturl:http:// prin.tt/hnT5RN, title:Dont Make Important Decisions Until Your \Decision Time\, preview:http://api.joliprint.com/api/rest/ url/jpg?url=http%3A%2F%2Flifehacker. com%2F5706937%2Fdont-make-important-decisions-until-your-decisiontime, lastmodified:1291750695000, filename:lifehacker.com-don-t-make-important-decisions-until-your-decision-time-. pdf, url:http://api.joliprint.com/api/ rest/url/print?url=http%3A%2F%2Flifehac ker.com%2F5706937%2Fdont-make-important-decisions-until-your-decision-time, size:267384 } }
/url/text/
/url/text/ returns the PDF shorten URL.
Parameter
url (required): the URL to turn into PDF.
Output Example
Url to convert : http://lifehacker. com/5706937/dont-make-important-decisions-until-your-decision-time
http://joliprint.com/api/
Love this
PDF?
December 7, 2010
Url to convert (encoded): http%3A%2F%2Flifehacker.com%2F57069 37%2Fdont%2Dmake%2Dimportant%2Dde cisions%2Duntil%2Dyour%2Ddecision%2D time Get the short URL from the API: http:// api.joliprint.com/api/rest/url/text/s/ foo?url=http%3A%2F%2Flifehacker.com%2 F5706937%2Fdont%2Dmake%2Dimportant %2Ddecisions%2Duntil%2Dyour%2Ddecisi on%2Dtime
http://joliprint.com/api/
Love this
PDF?