wobscale / EuIrcBot

A featureful nodejs irc bot
MIT License
14 stars 15 forks source link

Amazon retail store support #28

Closed cbgbt closed 6 years ago

cbgbt commented 10 years ago

It would be neat if linking a product gave title & price, and perhaps search similar to !g.

euank commented 10 years ago

Both those features are planned. I intend to implement them.

gmackie commented 7 years ago

Looked into this today... turned out to be a bit more work than anticipated to get access to the API. It requires signing up as an advertising(?) associate: http://docs.aws.amazon.com/AWSECommerceService/latest/DG/becomingAssociate.html

Also, there is a node library that uses the API to get product info (lookup by ASIN, which is in the URL): https://www.npmjs.com/package/amazon-product-api

But it doesnt have support for the "Retrieve Price" API (which does exist): http://docs.aws.amazon.com/AWSECommerceService/latest/DG/EX_RetrievingPriceInformation.html

My work ive done so far is in #140

LinuxMercedes commented 7 years ago

It looks like it wouldn't be too bad to add the retrieve price API; it should just be a modification of this: https://github.com/t3chnoboy/amazon-product-api/blob/master/lib/utils.js#L51

(See https://github.com/euank/EuIrcBot/commit/3bcb3132946da5d9f96af5f08bb3286f37a1d2ba for an example of how to use a fork of an npm module; it's quite easy.)

I haven't got any problem with making some bullshit amazon account but I guess that's more @euank 's call...

gmackie commented 7 years ago

HOOOO RAY WE DID IT. #141

Turns out that lib is calling for the ItemAttributes ResponseGroup, which contains ListPrice, which seems to fit our needs nicely.

Signing up for an affiliate account is kinda annoying. They make you list websites you're going to display ads on, ask you a bunch of questions about making money, had to verify idenity using a phone #...

gmackie commented 6 years ago

This issue should be closed...

Also published a new PR for getting this info easier: #180

euank commented 6 years ago

ty @gmackie 💙