-
Notifications
You must be signed in to change notification settings - Fork 82
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 #5 from openlabs/goodscloud-merge
The original pull request #4 was refactored and commits were reorganized to have a cleaner history. Thanks to @goodscloud for collecting improvements from different forks
- Loading branch information
Showing
8 changed files
with
262 additions
and
67 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
Magento Python API | ||
================== | ||
|
||
Python library to connect to Magento Webservices. | ||
|
||
Check documentation source code | ||
|
||
Usage | ||
----- | ||
|
||
.. code-block:: python | ||
import magento | ||
url = 'http://domain.com/' | ||
apiuser = 'user' | ||
apipass = 'password' | ||
with magento.Product(url, apiuser, apipass) as product_api: | ||
order_filter = {'created_at':{'from':'2011-09-15 00:00:00'}} | ||
products = product_api.list(order_filter) | ||
with magento.ProductTypes(url, apiuser, apipass) as product_type_api: | ||
product_type = product_type_api.list() | ||
with magento.Product(url, apiuser, apipass) as product_api: | ||
sku = 'prod1' | ||
product = product_api.info(sku) | ||
with magento.API(url, apiuser, apipass) as magento_api: | ||
# Calling custom APIs if you have extension modules on your | ||
# magento installation | ||
websites = magento_api.call('ol_websites.list', []) | ||
store_group = magento_api.call('ol_groups.list', []) | ||
store_views = magento_api.call('ol_storeviews.list', []) | ||
with magento.Order(url, apiuser, apipass) as order_api: | ||
order_increment_id = '100000001 ' | ||
status = 'canceled' | ||
order_api.addcomment(order_increment_id, status) | ||
License | ||
------- | ||
|
||
GNU Affero General Public License version 3 | ||
|
||
See LICENSE for more details |
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
Oops, something went wrong.