[erlang-questions] Amazon API -- Lookup by ISBN

ayodele abejide abejideayodele@REDACTED
Thu Apr 9 20:20:31 CEST 2015


I played around with implementing this:

https://gist.github.com/bjhaid/5d3c58aca0dbee0d96fd

PS: It's not tested outside of erl, and was a lunch time hacking.

BR,

Ayo


On Thu, Apr 9, 2015 at 12:44 PM, Bob Ippolito <bob@REDACTED> wrote:

> I'm sure they're just trying to keep tabs on who uses the API so that they
> can implement rate limiting and such to prevent third parties from scraping
> the entire database or adversely affecting performance for everyone else.
> This actually looks like one of the simpler APIs to implement, since it's
> just in the query string, and the signature is using standard algorithms.
> I'm sure you could get it if you put some effort into just building it
> rather than trying to find an implementation that someone else has already
> built.
>
> On Thu, Apr 9, 2015 at 9:55 AM, <lloyd@REDACTED> wrote:
>
>> Thanks all.
>>
>> Darach--- looks like the Library of Congress API fits the bill.
>>
>> Garrett--- for sake of self-enlightenment I'll take a look at Python
>> implementations.
>>
>> I can understand that Amazon needs to enforce security on their api, but
>> one would think that the inventor of one-click ordering could come up with
>> a simpler api request implementation. Maybe they're just trying to keep
>> pesky users like me out of the goodies. Wizards only apply.
>>
>> Best wishes,
>>
>> Lloyd
>>
>>
>>
>> -----Original Message-----
>> From: "Darach Ennis" <darach@REDACTED>
>> Sent: Wednesday, April 8, 2015 8:07pm
>> To: "Lloyd Prentice" <lloyd@REDACTED>
>> Cc: "Erlang Questions" <erlang-questions@REDACTED>
>> Subject: Re: [erlang-questions] Amazon API -- Lookup by ISBN
>>
>> If you don't need the rank information you can get the metadata through
>> composing a URL
>> against the library of congress database:
>>
>>
>> http://lx2.loc.gov:210/lcdb?version=1.1&operation=searchRetrieve&query=bath.isbn=0448421658&maximumRecords=1&recordSchema=mods
>>
>> This will deliver an XML document. You can get similar information from
>> Google's API:
>>
>> http://www.google.com/books/feeds/volumes/?q=ISBN%3C0448421658%3E
>>
>> Both are simple HTTP GET requests so unless you absolutely need data
>> unique
>> to Amazon's DB perhaps that would suffice.
>>
>> Cheers,
>>
>> Darach.
>>
>> On Wed, Apr 8, 2015 at 9:47 PM, <lloyd@REDACTED> wrote:
>>
>> > Hello,
>> >
>> > I'm striving to look up books in Amazon's db by ISBN. At first blush it
>> > looks easy enough:
>> >
>> >
>> >
>> http://docs.aws.amazon.com/AWSECommerceService/latest/DG/EX_LookupbyISBN.html
>> >
>> > But the last item, Signature, baffles me. Procedure here:
>> >
>> >
>> >
>> http://docs.aws.amazon.com/AWSECommerceService/latest/DG/rest-signature.html
>> >
>> > I'm fine with this until I hit step 4:
>> >
>> > -- Sort parameter/value pairs by byte value --- I can see how to do this
>> > manually, but don't know how put Erlang to the task
>> >
>> > And I'm really stumped when I hit step 8:
>> >
>> > -- Calculate an RFC 2104-compliant HMAC with the SHA256 hash algorithm
>> >
>> > Any help? Better yet, does anyone have actual code to make such requests
>> > they're willing to share?
>> >
>> > NOTE: Dave Thomas solved this problem way back in 2007. But looks like
>> > Amazon has changed their request format:
>> >
>> > http://pragdave.me/blog/2007/04/15/a-first-erlang-program/
>> >
>> > Many thanks,
>> >
>> > LRP
>> >
>> >
>> >
>> >
>> >
>> >
>> >
>> >
>> > _______________________________________________
>> > erlang-questions mailing list
>> > erlang-questions@REDACTED
>> > http://erlang.org/mailman/listinfo/erlang-questions
>> >
>>
>>
>> _______________________________________________
>> erlang-questions mailing list
>> erlang-questions@REDACTED
>> http://erlang.org/mailman/listinfo/erlang-questions
>>
>
>
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20150409/6a11183c/attachment.htm>


More information about the erlang-questions mailing list