Giter VIP home page Giter VIP logo

paapi5's Introduction

Paapi5

Build Hex.pm

A minimalistic Elixir library for the Amazon Product Advertising Api version 5.

Installation

This package can be installed by adding paapi5 to your list of dependencies in mix.exs:

def deps do
  [
    {:paapi5, "~> 0.1.1"}
  ]
end

Usage

Build a signed request for the Amazon Product Advertising API 5 (PAAPI5):

  request =
    Paapi5.request(
      "<access_key>",
      "<secret_key>",
      "<partner_tag>",
      :us,
      "SearchItems",
      %{"Keywords" => "elixir in action"}
    )

You can then use a HTTP client of your choice to actually send this request, e.g.:

  items = HTTPoison.request!(request.method, request.url, request.body, request.headers)

The marketplace can either be an atom (e.g., :us, :it, :uk, etc.) or a Paapi5.Marketplace struct with the host and region (e.g., %Paapi5.Marketplace{host: "webservices.amazon.it", region: "eu-west-1"}). The known marketplaces are :au, :br, :ca, :fr, :de, :in, :it, :jp, :mx, :nl, :sg, :sa, :es, :se, :tr, :ae, :uk, :us.

For a reference about operations and their parameters, see the PAAPI5 documentation.

For working examples on usage of this library, see the tests.

Development

Issues and contributions are very welcome!

To launch tests, run:

mix test

Tests require a valid set of credentials for the Italian PAAPI to be passed via environment variables:

export ACCESS_KEY="your-paapi-access-key"
export SECRET_KEY="your-paapi-secret-key"
export PARTNER_TAG="your-paapi-partner-tag"

paapi5's People

Contributors

dallagi avatar toberoni avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.