eray-akartuna / n11client
n11.com 网络服务客户端
dev-master / 4.1.x-dev
2017-03-04 20:40 UTC
Requires
- php: >=5.4.0
Requires (Dev)
- phpunit/phpunit: ~4.0
This package is not auto-updated.
Last update: 2024-09-18 20:51:12 UTC
README
使用此库可以访问 n11 网络服务。
### 示例代码
$client = new n11Client(); // App key ve app secretları giriyoruz. $client->auth(array('appKey' => 'xxxx-xxxx-xxxx','appSecret' => 'xxxxxxx')); $categories = $client->getTopLevelCategories(); //Kategorileri Çekiyoruz $cities = $client->getCities(); //İl listesine ulaşıyoruz. //Ürün ekleme - daha fazlası için n11 dökümanına bakabilirsiniz. $client->saveProduct([ 'productSellerCode' => 'exp-111', 'title' => 'Test Product', 'subtitle' => 'Web service test ', 'description' => 'test product detail', 'attributes' => [ 'attribute' => Array() ], 'category' => [ 'id' => 1000038 ], 'price' => 0.99, 'currencyType' => 'TL', 'images' => [ 'image' => [ ] ], 'saleStartDate' => '', 'saleEndDate' => '', 'productionDate' => '', 'expirationDate' => '', 'productCondition' => '1', 'preparingDay' => '3', 'discount' => 10, 'shipmentTemplate' => 'Kapıda Ödeme', 'stockItems' => [ 'stockItem' => [ ] ] ]);
要查看其他方法,请查看 client/Gateway.php 文件。
要开发,请将您的代码添加到 n11Client.php 中。