Link | amazon_albumcover |
Author | Jason Huck |
Category | Utility |
Version | 8.x |
License | http://opensource.org/licenses/artistic-license.php |
Posted | 26 Apr 2006 |
Updated | 26 Apr 2006 |
More by this author... |
This tag returns the first Large Image URL for the given album from Amazon Web Services. Requires a valid AWS Access Key ID.
var('coverURL') = amazon_albumcover( -key=$key, -artist=$artist, -album=$album ); $coverURL->size ? '';
Click the "Download" button below to retrieve a copy of this tag, including the complete documentation and sample usage shown on this page. Place the downloaded ".inc" file in your LassoStartup folder, restart Lasso, and you can begin using this tag immediately.
define_tag( 'albumcover', -namespace='amazon_', -required='key', -type='string', -required='artist', -type='string', -required='album', -type='string', -priority='replace', -description='Returns the first Large Image URL for the given album from Amazon Web Services.' ); local('baseurl' = 'http://webservices.amazon.com/onca/xml'); local('params') = array( 'Service' = 'AWSECommerceService', 'AWSAccessKeyId' = #key, 'Operation' = 'ItemSearch', 'SearchIndex' = 'Music', 'Artist' = encode_url(#artist), 'Title' = encode_url(#album), 'ResponseGroup' = 'Images' ); local('response') = include_url( #baseurl, -getparams=#params ); #response = string_replaceregexp( #response, -find='xmlns=".+?"', -replace='' ); #response = xml(#response); local('imagedata') = #response->extract('//LargeImage/URL/text()'); #imagedata->size ? return(#imagedata->first) | return; /define_tag;
No comments
©LassoSoft Inc 2015 | Web Development by Treefrog Inc | Privacy | Legal terms and Shipping | Contact LassoSoft