Skip to content

Commit 80758c0

Browse files
committed
Add retainer endpoint
1 parent 8779b92 commit 80758c0

File tree

2 files changed

+11
-26
lines changed

2 files changed

+11
-26
lines changed

cli

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,11 @@ $option = isset($argv[1]) ? trim($argv[1]) : false;
77
$arg1 = isset($argv[2]) ? trim($argv[2]) : false;
88

99
// setup xivapi
10-
$api = new \XIVAPI\XIVAPI(\XIVAPI\XIVAPI::STAGING);
10+
$api = new \XIVAPI\XIVAPI(\XIVAPI\XIVAPI::PROD);
1111

12-
$results = $api->market->item(3, [ 'Phoenix' ]);
12+
#$results = $api->market->item(3, [ 'Phoenix' ]);
13+
14+
$results = $api->market->retainer('11fd65c0-e3ea-4f45-aa52-1586ca2f6fc8');
1315

1416
print_r($results);
1517
die;

src/XIVAPI/Api/Market.php

Lines changed: 7 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -28,33 +28,11 @@ public function item(int $itemId, array $servers = [], string $dc = '')
2828
]);
2929
}
3030

31-
public function itemPrices(string $accessKey, int $itemId, string $server)
31+
public function retainer(string $retainerId)
3232
{
33-
return Guzzle::get("/private/market/item", [
34-
RequestOptions::QUERY => [
35-
'companion_access_key' => $accessKey,
36-
'item_id' => $itemId,
37-
'server' => $server,
38-
]
39-
]);
40-
}
41-
42-
public function itemHistory(string $accessKey, int $itemId, string $server)
43-
{
44-
return Guzzle::get("/private/market/item/history", [
45-
RequestOptions::QUERY => [
46-
'companion_access_key' => $accessKey,
47-
'item_id' => $itemId,
48-
'server' => $server,
49-
]
50-
]);
33+
return Guzzle::get("/market/retainer/{$retainerId}");
5134
}
5235

53-
public function stats()
54-
{
55-
return Guzzle::get("/market/stats");
56-
}
57-
5836
public function search($elasticQuery)
5937
{
6038
return Guzzle::get("/market/search", [
@@ -66,4 +44,9 @@ public function categories()
6644
{
6745
return Guzzle::get("/market/categories");
6846
}
47+
48+
public function stats()
49+
{
50+
return Guzzle::get("/market/stats");
51+
}
6952
}

0 commit comments

Comments
 (0)