hakanensari / peddler

Ruby wrapper for the Amazon Selling Partner API (SP-API)
MIT License
307 stars 130 forks source link

Migration to Selling Partner API? #155

Closed skatkov closed 8 hours ago

skatkov commented 3 years ago

Hey @hakanensari

Noticed your note in the project. Decided to ask... What about Selling Partner API? anything I can give a hand with? any progress? any plans/estimations?

hakanensari commented 3 years ago

Hey @skatkov, no immediate plans I am afraid. If you have something where you want to switch to the new API, you could take a stab first, and I jump in afterwards?

rdaniels commented 3 years ago

Amazon is forcing us to move to SP-API, have you started coding for this? If not I'm going to start coding for it

skatkov commented 3 years ago

I'm not yeat doing anything on this, still kinda researching if I want to and need to do this.

ericcj commented 3 years ago

I inquired about MWS for amazon.co.uk and they said "We understand that you are requesting to get access to the MWS API in the UK. Please note that we are no longer accepting registration applications for MWS." so at least there we're already forced to use SP-API. Between the oauth, LWA, and request signing it's no small effort: https://github.com/amzn/selling-partner-api-docs/blob/main/guides/developer-guide/SellingPartnerApiDeveloperGuide.md

They intend for us to generate a ruby client with swagger from the models in their repo, but we'd have to port the auth stuff they did for java https://github.com/amzn/selling-partner-api-models/tree/main/clients/sellingpartner-api-aa-java/resources/swagger-codegen/templates

Seems like it might be easier to just depend on https://rubygems.org/gems/aws-sigv4/ for the request signing since it has no deps https://docs.aws.amazon.com/sdk-for-ruby/v3/api/Aws/Sigv4/Signer.html

Also please vote for more support on https://github.com/amzn/selling-partner-api-models/issues/43 They indicated they might do this for python based on level of interest.

skatkov commented 3 years ago

Interesting if we could crowdfund a rewrite to this library?

We did a rewrite to PA-API v5 before: https://github.com/hakanensari/vacuum/pull/83

But scope of this rewrite is way bigger (and I really need only one end-point from entire api). Really hard to justify spending so much time for an open source library (while my own projects will suffer from that).

rdaniels commented 3 years ago

Interesting if we could crowdfund a rewrite to this library?

We did a rewrite to PA-API v5 before: hakanensari/vacuum#83

But scope of this rewrite is way bigger (and I really need only one end-point from entire api). Really hard to justify spending so much time for an open source library (while my own projects will suffer from that).

I would be willing to contribute financially to this

george-tigoris commented 3 years ago

@ericcj indicated the possibility of using https://rubygems.org/gems/aws-sigv4/ for the request signing. Has anyone verified if this really works with the SP-API?

If it does and some of us only need a few end-points then we don't have to wait for a ruby client library.

I have not used https://rubygems.org/gems/aws-sigv4/ before but I could attempt to implement it if I know that it is expected to work.

skatkov commented 3 years ago

@george-tigoris

Signing is pretty much standardized across different amazon api's. We already used aws-sigv4 in a vacuum rewrite

Check this out: https://github.com/hakanensari/vacuum/blob/ad60efe9c4c4c6928466836c9d298d2797a48457/lib/vacuum/operation.rb#L68

gavinritchie commented 3 years ago

Hey everyone, we've built a small gem called muffin_man to interface with the Selling Partner API. So far we've only implemented the Solicitations API because that's what we need right now, but we've got the auth working so it shouldn't be too hard to implement other endpoints. Feel free to contribute and/or use what we have so far.

ericcj commented 3 years ago

@gavinritchie THANK YOU! We'd like to use several of the other API's and are planning on using swagger-codegen to generate them like https://github.com/amzn/selling-partner-api-models recommends. It would be helpful if we could leverage (copy and paste) a little bit of your muffin_man code, but selling-partner-api-models is under the Apache 2.0 license and muffin_man is MIT. Would you be be willing to grant use of muffin_man under the Apache 2.0 license and/or would you mind us using some of your code in a fork or different project that's based on the codegen-and-subclassing strategy vs the green field one you've taken?

ericcj commented 3 years ago

I published a rubygem of the codegen for each model they provide with a minimal client based on muffin_man: https://github.com/ericcj/amz_sp_api

iamricks commented 3 years ago

New update from Amazon says we need to make the switch by September 30th, yikes...

ytsipun commented 3 years ago

Any plans?

rinoldsimon commented 3 years ago

Can we expect any milestones for SP-API support? This is critical.

skatkov commented 3 years ago

It's too big of an undertaking for an open source project. @hakanensari and I did a rewrite for another, smaller, amazon library and took at least a month.

Amount of work here is staggering. So your best bet is to ask amazon to support ruby here or explore alternative libraries.

igorkasyanchuk commented 3 years ago

hello, does anyone has a suggestion what is the best option how to migrate to SP-API?

iamricks commented 3 years ago

hello, does anyone has a suggestion what is the best option how to migrate to SP-API?

Your best bet is using: https://github.com/ericcj/amz_sp_api

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

dbwinger commented 1 year ago

@hakanensari I see you started some work on the selling-partner branch last year. Any (change of) plans to update peddler to support it? Thanks for this awesome gem that's helped me a bunch over the last 8 years!

hakanensari commented 8 hours ago

It's been a while, but I have resumed working on this. A minimal implementation, while not production ready, is up online.