-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathDetailsEndpoint.php
47 lines (39 loc) · 1.02 KB
/
DetailsEndpoint.php
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
namespace GW2Treasures\GW2Api\V2\Endpoint\Guild;
use GW2Treasures\GW2Api\GW2Api;
use GW2Treasures\GW2Api\V2\Authentication\AuthenticatedEndpoint;
use GW2Treasures\GW2Api\V2\Authentication\IAuthenticatedEndpoint;
use GW2Treasures\GW2Api\V2\Endpoint;
class DetailsEndpoint extends Endpoint implements IAuthenticatedEndpoint {
use AuthenticatedEndpoint ;
/** @var string $guildId */
private $guildId;
/**
* DetailsEndpoint constructor.
*
* @param GW2Api $api
* @param $guildId
* @param null $apiKey
*/
public function __construct(GW2Api $api, $guildId, $apiKey = null) {
parent::__construct($api);
$this->guildId = $guildId;
$this->apiKey = $apiKey;
}
/**
* The url of this endpoint.
*
* @return string
*/
public function url() {
return 'v2/guild/'.$this->guildId;
}
/**
* Get the guild details.
*
* @return mixed
*/
public function get() {
return $this->request()->json();
}
}