Knowledgebase
Example XML Response (ready to download)
Posted by Brandon Elliott on 19 June 2015 03:08 PM
|
|
Here is an example of an XML response, from the "Advanced Method" API, for a cached request that is ready for download.
Use the PHP simplexml library (or equivalent for your selected language) or download our sample library for legacy ways to pull the values from the XML response.
See the "STW API Documentation" for details on what the values can be and what they mean (though some are self-explanatory).
<?xml version="1.0" encoding="UTF-8"?>
<stw:ThumbnailResponse xmlns:stw="https://shrinktheweb.com/doc/stwresponse.xsd"> <stw:Response> <stw:ThumbnailResult> <stw:ThumbnailExists="true">http://images.shrinktheweb.com/xian.php?stwaccesskeyid=&stwu=&subref=&stwq=95&stwxmax=320&hash=</stw:Thumbnail> <stw:Thumbnail Verified="true">delivered</stw:Thumbnail> </stw:ThumbnailResult> <stw:ThumbnailSize> <stw:StatusCode>10</stw:StatusCode> </stw:ThumbnailSize> <stw:ResponseStatus> <stw:StatusCode>Success</stw:StatusCode> </stw:ResponseStatus> <stw:ResponseTimestamp> <stw:StatusCode>1426457959</stw:StatusCode> </stw:ResponseTimestamp> <stw:ResponseCode> <stw:StatusCode>HTTP:200</stw:StatusCode> </stw:ResponseCode> <stw:CategoryCode> <stw:StatusCode></stw:StatusCode> </stw:CategoryCode> <stw:Quota_Remaining> <stw:StatusCode>162</stw:StatusCode> </stw:Quota_Remaining> <stw:Bandwidth_Remaining> <stw:StatusCode>999673</stw:StatusCode> </stw:Bandwidth_Remaining> </stw:Response> </stw:ThumbnailResponse> | |
|
Comments (0)