README.md in peddler-1.6.3 vs README.md in peddler-1.6.4
- old
+ new
@@ -1,10 +1,10 @@
# Peddler
[![Build Status](https://travis-ci.org/hakanensari/peddler.svg)](https://travis-ci.org/hakanensari/peddler)
-[![Code Climate](https://codeclimate.com/github/hakanensari/peddler/badges/gpa.svg)](https://codeclimate.com/github/hakanensari/peddler)
-[![Test Coverage](https://codeclimate.com/github/hakanensari/peddler/badges/coverage.svg)](https://codeclimate.com/github/hakanensari/peddler/coverage)
+[![Maintainability](https://api.codeclimate.com/v1/badges/281e6176048f3c0a1ed3/maintainability)](https://codeclimate.com/github/hakanensari/peddler/maintainability)
+[![Test Coverage](https://api.codeclimate.com/v1/badges/281e6176048f3c0a1ed3/test_coverage)](https://codeclimate.com/github/hakanensari/peddler/test_coverage)
**Peddler** is a Ruby interface to the [Amazon MWS API](https://developer.amazonservices.com/), a collection of web services that help Amazon sellers programmatically exchange data on their listings, orders, payments, reports, and more.
To use Amazon MWS, you must have an eligible seller account and register for MWS. This applies to developers as well.
@@ -27,47 +27,45 @@
# or the shorthand
client = MWS.orders
```
-Each client requires valid MWS credentials. You can set these globally in the shell.
+Each client requires valid MWS credentials. Set these globally in the shell.
```bash
export MWS_MARKETPLACE_ID=YOUR_MARKETPLACE_ID
export MWS_MERCHANT_ID=YOUR_MERCHANT_OR_SELLER_ID
export AWS_ACCESS_KEY_ID=YOUR_AWS_ACCESS_KEY_ID
export AWS_SECRET_ACCESS_KEY=YOUR_AWS_SECRET_ACCESS_KEY
```
-You can now instantiate a client.
+You can now instantiate a client. The client will pick up credentials automatically from the environment.
```ruby
client = MWS.orders
```
-The client will pick up credentials automatically from the environment.
+If you are creating a [client for another seller](https://developer.amazonservices.com/gp/mws/faq.html#developForSeller), pass the latter's Merchant (Seller) ID and Marketplace ID along with the `MWSAuthToken` they obtained for you.
-Alternatively, if you do not rely on environment variables, you can set some or all credentials when or after creating the client.
+```ruby
+client = MWS.orders(
+ primary_marketplace_id: "Seller's Marketplace ID",
+ merchant_id: "Seller's Merchant or Seller ID",
+ auth_token: "Seller's MWS Authorisation Token"
+)
+```
+Finally, if you do not want to use environment variables at all, you can set all credentials when or after creating the client.
+
```ruby
client = MWS.orders(
primary_marketplace_id: "Your Marketplace ID",
merchant_id: "Your Merchant or Seller ID",
aws_access_key_id: "Your AWS Access Key ID",
aws_secret_access_key: "Your AWS Secret Access Key",
)
client.primary_marketplace_id = "Another Marketplace ID"
-```
-
-If you are creating a [client for another seller](https://developer.amazonservices.com/gp/mws/faq.html#developForSeller), pass the latter's Merchant (Seller) ID and Marketplace ID along with the `MWSAuthToken` they obtained for you.
-
-```ruby
-client = MWS.orders(
- primary_marketplace_id: "Seller's Marketplace ID",
- merchant_id: "Seller's Merchant or Seller ID",
- auth_token: "Seller's MWS Authorisation Token"
-)
```
Once you have a client with valid credentials, you should be able to make requests to the API. Clients map operation names in a flat structure. Methods have positional arguments for required input and keyword arguments for optional parameters. Both method and argument names are underscored but otherwise identical to the names of the corresponding operations and parameters documented in the API.
### Parser