Querying information from Amazons Webservices
Based on another question at German Delphi-PRAXiS (see here and here), I took out CollectionTemplater, the tool I wrote to easily generate comfortable collection classes, and added some stuff to search Amazons library. Supported download methods are WinInet (through the pkWinInet unit available here as well), Indy (if someone really cares to use that) and of course Synapse (my personal choice). XML handling as with all CollectionTemplater units can be either XMLLib, JclSimpleXml or SimpleXML.
How to use it?
program AmazonListTest;
{$APPTYPE CONSOLE}
uses snlProtoAmazonOnca;
var al: TAmazonList;
i: integer;
begin
al := TAmazonList.Create;
al.DeveloperToken := ''; // fill in your token
al.AssociateID := ''; // fill in your assoc. id
if not al.QueryArtist('New%20Model%20Army')
then WriteLn('What the ...?');
if al.Count>0 then begin
for i := 0 to Pred(al.Count)
do WriteLn('This is great: ' + al[i].ProductName);
end else WriteLn('Amazon doesn''t know good music!');
al.Free;
end.
Oh, I nearly forgot: here's snlProtoAmazonOnca.pas.

1 Comments:
Oh i love it! ;)
22:05
Post a Comment
<< Home