Skip to content

AmzSpApi - Unofficial Ruby gem for the Selling Partner APIs (SP-API)

License

Notifications You must be signed in to change notification settings

blinken/amz_sp_api

Repository files navigation

amz_sp_api

AmzSpApi - the Ruby gem for the Amazon Selling Partner API (SP-API)

This SDK is automatically generated by running Swagger Codegen on each SP-API model using the codegen.sh script.

Installation

Build a gem

To build the Ruby code into a gem:

gem build amz_sp_api.gemspec

Then either install the gem locally:

gem install ./amz_sp_api-0.1.0.gem

(for development, run gem install --dev ./amz_sp_api-0.1.0.gem to install the development dependencies)

or publish the gem to a gem hosting service, e.g. RubyGems.

Finally add this to the Gemfile:

gem 'amz_sp_api', '~> 0.1.0'

Install from Git

If the Ruby gem is hosted at a git repository: https://github.com/GIT_USER_ID/GIT_REPO_ID, then add the following in the Gemfile:

gem 'amz_sp_api', :git => 'https://github.com/GIT_USER_ID/GIT_REPO_ID.git'

Getting Started

Please follow the installation procedure and then run the following code:

# Load the gem and specific api model you'd like to use

require 'amz_sp_api'
require 'fulfillment-outbound-api-model'

  AmzSpApi.configure do |config|
    config.refresh_token = 
    config.client_id = 
    config.client_secret = 
    config.aws_access_key_id = 
    config.aws_secret_access_key = 
    config.region = 'eu'
    # config.debugging = true
  end

  begin
    api = AmzSpApi::FulfillmentOutboundApiModel::FbaOutboundApi.new(AmzSpApi::SpApiClient.new)
    p api.list_all_fulfillment_orders.payload
  rescue AmzSpApi::ApiError => e
    puts "Exception when calling SP-API: #{e}"
  end

About

AmzSpApi - Unofficial Ruby gem for the Selling Partner APIs (SP-API)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Ruby 99.4%
  • Shell 0.6%