-
Notifications
You must be signed in to change notification settings - Fork 228
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #22 from Peardian/betterdoc
better documentation
- Loading branch information
Showing
3 changed files
with
67 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,34 @@ | ||
phpAmazonMWS | ||
============ | ||
|
||
A library to connect to Amazon's MWS web services in an object-oriented manner, with a focus on intuitive usage. | ||
A library to connect to Amazon's MWS web services in an object-oriented manner, with a focus on intuitive usage. | ||
|
||
|
||
## Example Usage | ||
Here are a couple of examples of the library in use. | ||
All of the technical details required by the API are handled behind the scenes, | ||
so users can easily build code for sending requests to Amazon | ||
without having to jump hurdles such as parameter URL formatting and token management. | ||
|
||
Here is an example of a function used to get all warehouse-fulfilled orders from Amazon updated in the past 24 hours: | ||
```php | ||
function getAmazonOrders() { | ||
$amz = new AmazonOrderList("myStore"); | ||
$amz->setLimits('Modified', "- 24 hours"); | ||
$amz->setFulfillmentChannelFilter("MFN"); //no Amazon-fulfilled orders | ||
$amz->setOrderStatusFilter(array("Unshipped", "Canceled", "Unfulfillable")); //no shipped or pending | ||
$amz->setUseToken(); //Amazon sends orders 100 at a time, but we want them all | ||
$amz->fetchOrders(); | ||
return $amz->getList(); | ||
} | ||
``` | ||
This example shows a function used to send a previously-created XML feed to Amazon to update Inventory numbers: | ||
```php | ||
function sendInventoryFeed($feed) { | ||
$amz=new AmazonFeed("myStore"); | ||
$amz->setFeedType("_POST_INVENTORY_AVAILABILITY_DATA_"); //feed types listed in documentation | ||
$amz->setFeedContent($feed); | ||
$amz->submitFeed(); | ||
return $amz->getResponse(); | ||
} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters