Skip to content

Commit

Permalink
Created main documentation structure.
Browse files Browse the repository at this point in the history
Removed old and unusable README tutorial.
Also created AUTHORS file :).
  • Loading branch information
0xp3p3x0 committed May 8, 2013
1 parent c1ff82e commit ed123de
Show file tree
Hide file tree
Showing 14 changed files with 109 additions and 62 deletions.
11 changes: 11 additions & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
Current or previous core committers:

* Paulo Alvarado

Contributors (in alphabetical order):

* Mike Patek
* Jonas Obrist
* Pierre
* Shalabh Aggarwal
* Sylvain Fauveau
62 changes: 4 additions & 58 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,69 +15,15 @@ This is still an ongoing project. If you would like to contribute, see below :).

Its based on the [amazon-mws-python](http://code.google.com/p/amazon-mws-python).

# API usage

Make sure you check out the Amazon MWS documentation at https://developer.amazonservices.com/

Here's an exmaple of how to use python-amazon-mws to upload your products to amazon.


```python
from mws import mws

# You can get all these credentials when you sign up for Amazon MWS

MWS_ACCESS_KEY = 'your key'
MWS_SECRET_KEY = 'your secret'
MERCHANT_ID = 'your merchantid'

# Amazon supports different file formats for uploading products
# here i use a simple tsv file.

file_name = "templates/amazon-upload.tsv"

with open(file_name, "r+") as f:
data = f.read()
f.close()
amazon = mws.Feeds(MWS_ACCESS_KEY, MWS_SECRET_KEY, MERCHANT_ID)
response = amazon.submit_feed(data, feed_type="_POST_FLAT_FILE_LISTINGS_DATA_",
content_type="text/tab-separated-values;charset=iso-8859-1")

# In shell...

print response
<Element '{http://mws.amazonaws.com/doc/2009-01-01/}SubmitFeedResponse' at 0x8edaa4c>

```
For more information, check out the [Products API Documentation](https://developer.amazonservices.com/gp/mws/api.html/182-2079318-8524647?ie=UTF8&section=products&group=products&version=latest).

Here's another example in which i use python-amazon-mws to query amazon for a product using the product's UPC

```python
from mws import mws

MWS_ACCESS_KEY = 'your key'
MWS_SECRET_KEY = 'your secret'
MERCHANT_ID = 'your merchantid'
MARKETPLACE_ID = 'your marketplaceid'
UPC = "886039397430"

amazon = mws.Products(MWS_ACCESS_KEY, MWS_SECRET_KEY, MERCHANT_ID)
response = amazon.list_matching_products(MARKETPLACE_ID, UPC)

# In shell...

print response
<Element '{http://mws.amazonservices.com/schema/Products/2011-10-01}ListMatchingProductsResponse' at 0xa1b188c>

```
Checkout the documentation [here](http://code.google.com/p/amazon-mws-python).
You can read the official Amazon MWS documentation [here](https://developer.amazonservices.com/).

# To-Do

* Update README
* Improve README
* Create tests
* Finish InboundShipments & OutboundShipments APIs
* Build Docs
* Finish Docs

# Contribute

Expand Down
2 changes: 1 addition & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static']
html_static_path = ['static']

# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
# using the given strftime format.
Expand Down
3 changes: 3 additions & 0 deletions docs/source/feeds.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
############
Feeds
############
3 changes: 3 additions & 0 deletions docs/source/fulfillmentInboundShipment.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
############################
Fulfillment Inbound Shipment
############################
3 changes: 3 additions & 0 deletions docs/source/fulfillmentInventory.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
############################
Fulfillment Inventory
############################
3 changes: 3 additions & 0 deletions docs/source/fulfillmentOutboundShipment.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#############################
Fulfillment Outbound Shipment
#############################
29 changes: 26 additions & 3 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,36 @@
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
#############################################
Welcome to Python Amazon MWS's documentation!
=============================================
#############################################

Contents:
***************
Getting Started
***************

.. toctree::
:maxdepth: 2
:maxdepth: 2

installation.rst
tutorial_1.rst


********
APIs
********

.. toctree::
:maxdepth: 1

feeds.rst
reports.rst
fulfillmentInboundShipment.rst
fulfillmentInventory.rst
fulfillmentOutboundShipment.rst
orders.rst
products.rst
sellers.rst



Expand Down
36 changes: 36 additions & 0 deletions docs/source/installation.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
Installation
=============
This process assumes you have already created an Amazon Marketplace Webservices (MWS) account.

Setup API Access
---------------------

* Go to https://developer.amazonservices.com (or .ca/.de/.jp/.fr/.co.uk)
* Click on the *Sign up for MWS* button and follow the instructions.
* At the end you must have a screen (print it and save it !)
This screen will contain the following credentials:
* Merchant Id (or Seller Id) - This is your unique merchant/seller ID
* Marketplace Id - This is the id for the marketplace you are selling on.
It allows you to target specific markerplaces (US, Japan, Europe, etc..) in which you are authorized to sell.
* Access key - Used to identify the user of this API.
* Secret key - This is used to authenticate every request sent to Amazon
Make sure to keep this confidential as these credentials can potentially compromise your account.


Test API Access
-----------------

* Go to https://mws.amazonservices.com/scratchpad/index.html (you can change the domain .com like before)
* In API selection, choose **Products** and *ListMatchingProducts*
* In Authentication put your credentials.
* Input the desired MarketplaceId and put "python" in Query
* Click on the submit button

If everything is good, you can see a response 200 and a list of item matching python


Install MWS Python API :)
-------------------------

Currently you have to checkout the git repo and run ./setup.py install

3 changes: 3 additions & 0 deletions docs/source/orders.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
############
Orders
############
3 changes: 3 additions & 0 deletions docs/source/products.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
############
Products
############
3 changes: 3 additions & 0 deletions docs/source/reports.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
############
Reports
############
3 changes: 3 additions & 0 deletions docs/source/sellers.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
############
Sellers
############
7 changes: 7 additions & 0 deletions docs/source/tutorial_1.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Tutorials
====================


Uploading Products to Amazon
----------------------------

0 comments on commit ed123de

Please sign in to comment.