Skip to content

Commit

Permalink
add example
Browse files Browse the repository at this point in the history
  • Loading branch information
latik committed Apr 7, 2015
1 parent 37af7bf commit aa16544
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 0 deletions.
28 changes: 28 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1 +1,29 @@
Mirror taobao api official package

Installation
------------

php composer.phar composer require latik/taobao-sdk

Usage
-----

Once the library is installed, simply use it in your code by:

```php
<?php

require_once __DIR__ .'/vendor/autoload.php';

$topClient = new TopClient();
$topClient->appkey = '..';
$topClient->secretKey = '..';
var_dump($topClient);
$itemReq = new ItemGetRequest();
$itemReq->setFields("detail_url,nick,props_name,num_iid,title,num_iid,input_str,pic_url,location,price,item_img,prop_img");
$itemReq->setNumIid(123456); // id good

$objResult = $topClient->execute($itemReq);

?>
```
3 changes: 3 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
{
"name": "latik/taobao-sdk",
"description": "Mirror taobao api official package",
"keywords": ["taobao", "api", "top", "sdk"],
"authors": [
{
"name": "Latik",
"email": "[email protected]"
}
],
"type": "library",
"license": "MIT",
"require": {
"php": ">= 5.2.0",
"ext-curl": "*"
Expand Down

0 comments on commit aa16544

Please sign in to comment.