-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.php
More file actions
47 lines (38 loc) · 1.17 KB
/
test.php
File metadata and controls
47 lines (38 loc) · 1.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
<?php
require_once __DIR__ . '/vendor/autoload.php';
use Holmang\Tradera\PublicService\PublicService;
use Holmang\Tradera\Search\SearchAdvancedRequest;
use Holmang\Tradera\Search\SearchService;
function test_getSellerItems()
{
$public = new PublicService([
'appId' => '1461',
'appKey' => 'fe2b3cbf-fd5c-43b3-b341-1aa26f802d95', //'05f131ab-2389-467b-84d4-51ae2958824f'
]);
$response = $public->GetSellerItems(467760, 2108);
var_dump($response);
}
function test_getItem()
{
$public = new PublicService([
'appId' => '1460',
'appKey' => '05f131ab-2389-467b-84d4-51ae2958824f',
]);
$response = $public->GetItem(383719920);
}
function test_searchAdvanced()
{
$service = new SearchService([
'appId' => '1460',
'appKey' => '05f131ab-2389-467b-84d4-51ae2958824f',
]);
$request = new SearchAdvancedRequest();
$request->ItemStatus = 'Active';
$request->OrderBy = 'StartDateDescending';
$request->CategoryId = 2108;
$request->Alias = 'Trulse85';
$request->ItemType = 'BuyItNow';
$response = $service->searchAdvanced($request);
var_dump($response->Items[0]);
}
test_searchAdvanced();