Skip to content

Commit 9362ec1

Browse files
committed
initial commit
0 parents  commit 9362ec1

69 files changed

Lines changed: 4128 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
node_modules/
2+
*/node_modules/
3+
.DS_Store
4+
*/.DS_Store
5+
*.txt
6+
*.log

README.md

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
# Magento SOAP API Wrapper
2+
3+
This wrapper lets you talk to Magento via SOAP.
4+
5+
```js
6+
var magento = require('magento')({
7+
host: 'your.host',
8+
port: 80,
9+
path: '/api/xmlrpc/',
10+
login: 'your_username',
11+
pass: 'your_pass'
12+
});
13+
14+
magento.login(function(err, sessId) {
15+
if (err) {
16+
// deal with error
17+
return;
18+
}
19+
20+
// use magento
21+
});
22+
```
23+
24+
All of the API methods take an object of params as the first argument, and a callback as the second.
25+
26+
Or, if no params are sent, just a callback as the first argument.
27+
28+
## Methods
29+
30+
+ [Catalog Category](./readmes/catalog_category.md)
31+
+ [Catalog Category Attribute](./readmes/catalog_category_attribute.md)
32+
+ [Catalog Product](./readmes/catalog_product.md)
33+
+ [Catalog Product Attribute](./readmes/catalog_product_attribute.md)
34+
+ [Catalog Product Attribute Media](./readmes/catalog_product_attribute_media.md)
35+
+ [Catalog Product Attribute Set](./readmes/catalog_product_attribute_set.md)
36+
+ [Catalog Product Custom Option](./readmes/catalog_product_custom_option.md)
37+
+ [Catalog Product Custom Option Value](./readmes/catalog_product_custom_option_value.md)
38+
+ [Catalog Product Downloadable Link](./readmes/catalog_product_downloadable_link.md)
39+
+ [Catalog Product Link](./readmes/catalog_product_link.md)
40+
+ [Catalog Product Tag](./readmes/catalog_product_tag.md)
41+
+ [Catalog Product Tier Price](./readmes/catalog_product_tier_price.md)
42+
+ [Catalog Product Type](./readmes/catalog_product_type.md)
43+
+ [Catalog Inventory Stock Item](./readmes/catalogInventory_stock_item.md)
44+
+ [Checkout Cart](./readmes/checkout_cart.md)
45+
+ [Checkout Cart Coupon](./readmes/checkout_cart_coupon.md)
46+
+ [Checkout Cart Customer](./readmes/checkout_cart_customer.md)
47+
+ [Checkout Cart Payment](./readmes/checkout_cart_payment.md)
48+
+ [Checkout Cart Product](./readmes/checkout_cart_product.md)
49+
+ [Checkout Cart Shipping](./readmes/checkout_cart_shipping.md)
50+
+ [Core](./readmes/core.md)
51+
+ [Customer](./readmes/customer.md)
52+
+ [Customer Address](./readmes/customer_address.md)
53+
+ [Customer Group](./readmes/customer_group.md)
54+
+ [Directory Country](./readmes/directory_country.md)
55+
+ [Directory Region](./readmes/directory_region.md)
56+
+ [Sales Order](./readmes/sales_order.md)
57+
+ [Sales Order Credit Memo](./readmes/sales_order_credit_memo.md)
58+
+ [Sales Order Invoice](./readmes/sales_order_invoice.md)
59+
+ [Sales Order Shipment](./readmes/sales_order_shipment.md)
60+
+ [Store](./readmes/store.md)

package.json

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{
2+
"name": "Magento",
3+
"author": "Tim Marshall <timothyjmarshall@gmail.com>",
4+
"description": "Magento SOAP API wrapper for Node.js",
5+
"version": "0.0.0",
6+
"main": "./src/magento",
7+
"contributors": [
8+
{
9+
"name": "Tim Marshall",
10+
"email": "timothyjmarshall@gmail.com"
11+
}
12+
],
13+
"engines": {
14+
"node": ">=0.10.20"
15+
},
16+
"dependencies" : {
17+
"request": "2.34.0",
18+
"xmlrpc": "1.2.0"
19+
},
20+
"keywords": [
21+
"magento",
22+
"soap",
23+
"api",
24+
"xml"
25+
],
26+
"repository": "git://github.com/MadisonReed/magentoapi",
27+
"license": "MIT"
28+
}
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# Catalog Inventory Stock Item
2+
3+
## [list](http://www.magentocommerce.com/api/soap/catalogInventory/cataloginventory_stock_item.list.html)
4+
5+
Allows you to retrieve the list of stock data by product IDs.
6+
7+
```js
8+
magento.catalogInventoryStockItem.list({
9+
products: [ val, val, val ]
10+
}, callback);
11+
12+
// or a single product
13+
14+
magento.catalogInventoryStockItem.list({
15+
products: val
16+
}, callback);
17+
```
18+
19+
## [update](http://www.magentocommerce.com/api/soap/catalogInventory/cataloginventory_stock_item.update.html)
20+
21+
Allows you to update the required product stock data.
22+
23+
`data` is a catalogInventoryStockItemUpdateEntity object.
24+
25+
```js
26+
magento.catalogInventoryStockItem.update({
27+
product: val,
28+
data: val
29+
}, callback);
30+
```

readmes/catalog_category.md

Lines changed: 147 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,147 @@
1+
# Catalog Category
2+
3+
## [assignedProducts](http://www.magentocommerce.com/api/soap/catalog/catalogCategory/catalog_category.assignedProducts.html)
4+
5+
Retrieve the list of products assigned to a required category.
6+
7+
```js
8+
magento.catalogCategory.assignedProducts({
9+
categoryId: val
10+
}, callback);
11+
```
12+
13+
## [assignProduct](http://www.magentocommerce.com/api/soap/catalog/catalogCategory/catalog_category.assignProduct.html)
14+
15+
Create a new category and return its ID.
16+
17+
```js
18+
magento.catalogCategory.assignProduct({
19+
categoryId: val,
20+
product: val,
21+
position: val /* optional */
22+
}, callback);
23+
```
24+
25+
## [create](http://www.magentocommerce.com/api/soap/catalog/catalogCategory/catalog_category.create.html)
26+
27+
Create a new category and return its ID.
28+
29+
`data` is a catalogCategoryEntityCreate object.
30+
31+
```js
32+
magento.catalogCategory.create({
33+
categoryId: val,
34+
data: val,
35+
storeView: val /* optional */
36+
}, callback);
37+
```
38+
39+
## [currentStore](http://www.magentocommerce.com/api/soap/catalog/catalogCategory/catalog_category.currentStore.html)
40+
41+
Allows you to set/get the current store view.
42+
43+
```js
44+
magento.catalogCategory.currentStore({
45+
storeView: val
46+
}, callback);
47+
```
48+
49+
## [delete](http://www.magentocommerce.com/api/soap/catalog/catalogCategory/catalog_category.delete.html)
50+
51+
Allows you to delete the required category.
52+
53+
```js
54+
magento.catalogCategory.delete({
55+
categoryId: val
56+
}, callback);
57+
```
58+
59+
## [info](http://www.magentocommerce.com/api/soap/catalog/catalogCategory/catalog_category.info.html)
60+
61+
Allows you to retrieve information about the required category.
62+
63+
```js
64+
magento.catalogCategory.info({
65+
categoryId: val,
66+
storeView: val, /* optional */
67+
attributes: val /* optional */
68+
}, callback);
69+
```
70+
71+
## [level](http://www.magentocommerce.com/api/soap/catalog/catalogCategory/catalog_category.level.html)
72+
73+
Allows you to retrieve one level of categories by a website, a store view, or a parent category.
74+
75+
```js
76+
magento.catalogCategory.level(callback);
77+
78+
// or
79+
80+
magento.catalogCategory.level({
81+
website: val, /* optional */
82+
storeView: val, /* optional */
83+
parentCategory: val /* optional */
84+
}, callback);
85+
```
86+
87+
## [move](http://www.magentocommerce.com/api/soap/catalog/catalogCategory/catalog_category.move.html)
88+
89+
Allows you to move the required category in the category tree.
90+
91+
```js
92+
magento.catalogCategory.move({
93+
categoryId: val,
94+
parentId: val,
95+
afterId: val /* optional */
96+
}, callback);
97+
```
98+
99+
## [removeProduct](http://www.magentocommerce.com/api/soap/catalog/catalogCategory/catalog_category.removeProduct.html)
100+
101+
Allows you to remove the product assignment from the category.
102+
103+
```js
104+
magento.catalogCategory.removeProduct({
105+
categoryId: val,
106+
productId: val
107+
}, callback);
108+
```
109+
110+
## [tree](http://www.magentocommerce.com/api/soap/catalog/catalogCategory/catalog_category.tree.html)
111+
112+
Allows you to retrieve the hierarchical tree of categories.
113+
114+
```js
115+
magento.catalogCategory.tree(callback);
116+
117+
// or
118+
119+
magento.catalogCategory.tree({
120+
parentId: val, /* optional */
121+
storeView: val /* optional */
122+
}, callback);
123+
```
124+
125+
## [update](http://www.magentocommerce.com/api/soap/catalog/catalogCategory/catalog_category.update.html)
126+
127+
Update the required category. Note that you should specify only those parameters which you want to be updated.
128+
129+
```js
130+
magento.catalogCategory.update({
131+
categoryId: val,
132+
categoryData: val,
133+
storeView: val /* optional */
134+
}, callback);
135+
```
136+
137+
## [updateProduct](http://www.magentocommerce.com/api/soap/catalog/catalogCategory/catalog_category.updateProduct.html)
138+
139+
Allows you to update the product assigned to a category. The product position is updated.
140+
141+
```js
142+
magento.catalogCategory.updateProduct({
143+
categoryId: val,
144+
productId: val,
145+
position: val /* optional */
146+
}, callback);
147+
```
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# Catalog Category Attribute
2+
3+
## [currentStore](http://www.magentocommerce.com/api/soap/catalog/catalogCategoryAttributes/catalog_category_attribute.currentStore.html)
4+
5+
Allows you to set/get the current store view.
6+
7+
```js
8+
magento.catalogCategoryAttribute.currentStore({
9+
storeView: val
10+
}, callback);
11+
```
12+
13+
## [list](http://www.magentocommerce.com/api/soap/catalog/catalogCategoryAttributes/catalog_category_attribute.list.html)
14+
15+
Allows you to retrieve the list of category attributes.
16+
17+
```js
18+
magento.catalogCategoryAttribute.list(callback);
19+
```
20+
21+
## [options](http://www.magentocommerce.com/api/soap/catalog/catalogCategoryAttributes/catalog_category_attribute.options.html)
22+
23+
Allows you to retrieve the attribute options.
24+
25+
```js
26+
magento.catalogCategoryAttribute.options({
27+
attributeId: val,
28+
storeView: val
29+
}, callback);
30+
```

0 commit comments

Comments
 (0)