With a given Package ID (and optionally, package key), metadata about Pando packages can be retrieved from the Pando system. Request URLs take the following form:
http://cache.pando.com/soapservices/SendToWeb?action=info&format=Format&id=PackageId&key=PackageKey
Format can be either "xml" or "json," which determines how the data you request will be returned. The information returned includes:
So, for example, the XML encoded package info for a package can be retrieved from the following URL:
http://cache.pando.com/soapservices/SendToWeb?action=info&format=xml
&id=5AEDE982393976A10050F2EC7C20C3C5EFDE0BBB
&key=C51E9F2767B6747A9C9841AF7EEB9CC0E967D5B37CEC05B8C9DF310A03958AD2
Which returns the following result (with the "files" list trimmed -- full result here).
<?xml version="1.0"?>
<packageInfo>
<version>1.0</version>
<packageId>5AEDE982393976A10050F2EC7C20C3C5EFDE0BBB</packageId>
<key>C51E9F2767B6747A9C9841AF7EEB9CC0E967D5B37CEC05B8C9DF310A03958AD2</key>
<title>Spring Street Art</title>
<description>
At 11 Spring St. some of NYC's best street artists have canvassed
(literally) the building with art that is sprayed/painted/glued on the
exterior and interior walls.
</description>
<creationDate>Sun, 17 Dec 2006 14:06:30 -0500</creationDate>
<packager>Yaron Samid</packager>
<thumbnailURL>http://services.pando.com/soapservices/SendToWeb?action=thumbnail
&id=5AEDE982393976A10050F2EC7C20C3C5EFDE0BBB</thumbnailURL>
<packageURL>http://cache.pando.com/soapservices/Package/package.pando?
id=5AEDE982393976A10050F2EC7C20C3C5EFDE0BBB
&key=C51E9F2767B6747A9C9841AF7EEB9CC0E967D5B37CEC05B8C9DF310A03958AD2
</packageURL>
<packageSize>187249946</packageSize>
<files num="91">
<file name="Spring Street Art/IMG_8277.jpg" size="2196499"/>
[... trimmed ...]
<file name="Spring Street Art/IMG_8367.jpg"size="2071726"/>
</files>
<downloads>55</downloads>
<expirationDate>Sat, 12 Dec 2026 15:42:20 -0500</expirationDate>
</packageInfo>
To retrieve a JSON encoded version of the same data, we simply ask for a different format in the URL:
http://cache.pando.com/soapservices/SendToWeb?action=info&format=json
&id=5AEDE982393976A10050F2EC7C20C3C5EFDE0BBB
&key=C51E9F2767B6747A9C9841AF7EEB9CC0E967D5B37CEC05B8C9DF310A03958AD2
Which returns the following result (with the "files" list trimmed -- full result here).
{"version":"1.0",
"packageId":"5AEDE982393976A10050F2EC7C20C3C5EFDE0BBB",
"key":"C51E9F2767B6747A9C9841AF7EEB9CC0E967D5B37CEC05B8C9DF310A03958AD2",
"title":"Spring Street Art",
"description":"At 11 Spring St. some of NYC's best street artists have canvassed
(literally) the building with art that is sprayed/painted/glued on
the exterior and interior walls.",
"creationDate":"Sun, 17 Dec 2006 14:06:30 -0500",
"packager":"Yaron Samid",
"thumbnailURL":"http://services.pando.com/soapservices/SendToWeb?action=thumbnail
&id=5AEDE982393976A10050F2EC7C20C3C5EFDE0BBB",
"packageURL":"http://cache.pando.com/soapservices/Package/package.pando
?id=5AEDE982393976A10050F2EC7C20C3C5EFDE0BBB
&key=C51E9F2767B6747A9C9841AF7EEB9CC0E967D5B37CEC05B8C9DF310A03958AD2",
"packageSize":187249946,
"fileCount":91,
"files":[
{"name":"Spring Street Art/IMG_8277.jpg","size":2196499},
[... trimmed ...],
{"name":"Spring Street Art/IMG_8367.jpg","size":2071726}],
"downloads":55,
"expirationDate":"Sat, 12 Dec 2026 15:42:20 -0500"}
Comments
Retrieving only dynamic
Retrieving only dynamic package information would be great.
Let's say if I had a pretty web page with lots of content from pando displayed for download, for instance a showcase of artists productions or all the content of my channel.
The site would list 50 releases by page, I already have the packageId and the key stored in my database, so I don't need to access the xml file to generate thumbnailURL or packageURL and I would probably have also the static info stored in my DB but I need for example the number of downloads.
I would be quicker (for browser-side or server-side scripts) to make 50 calls to get only this tiny piece of information, rather than making 50 calls to get the full xml file and extract only dynamic information from it.
Or better: to be able to generate a customized xml file based on serveral packageId
ex:
http://cache.pando.com/soapservices/SendToWeb?action=dynamicinfo&format=xml&ids=PackageId01;PackageId02;PackageId03;PackageId04would return:
< item >
< packageId >PackageId01< /packageId >
< expirationDate >Thu, 12 Apr 2007 05:45:49 -0400< /expirationDate >
< downloads >76< /downloads >
< /item >
< item >
< packageId >PackageId02< /packageId >
< expirationDate >Thu, 14 Apr 2007 05:45:49 -0400< /expirationDate >
< downloads >24< /downloads >
< /item >
< item >
< packageId >PackageId03< /packageId >
< expirationDate >Thu, 19 Apr 2007 05:45:49 -0400< /expirationDate >
< downloads >46< /downloads >
< /item >
...
I suspect something like
I suspect something like this will come eventually, since we'll need it internally, as well.
If you're caching the results, it shouldn't be too big a deal that you're getting the entire XML file each time, should it? The only real cost is the bandwidth bill for a larger-than-necessary XML result. If you're not caching the result, I recommend doing so.
For example, if the request fails you can fall back on the last successful request, and
ifwhen your site gets mad popular, you won't hammer our servers multiple times per second. :)Yes of course caching is
Yes of course caching is always in my mind when using external data sources, with cronjob to refresh cache and verification of consistency (I had a bad experience of a small site mainly using rss/xml as content, which raised from few dozens of visitors per day to dozen of thousand per day in a very short time).
But I'm always concerned with the optimization of data exchanges ;)