-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathCharacterEndpoint.php
151 lines (131 loc) · 3.86 KB
/
CharacterEndpoint.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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
<?php
namespace GW2Treasures\GW2Api\V2\Endpoint\Character;
use GW2Treasures\GW2Api\GW2Api;
use GW2Treasures\GW2Api\V2\Authentication\AuthenticatedEndpoint;
use GW2Treasures\GW2Api\V2\Authentication\IAuthenticatedEndpoint;
use GW2Treasures\GW2Api\V2\Bulk\BulkEndpoint;
use GW2Treasures\GW2Api\V2\Bulk\IBulkEndpoint;
use GW2Treasures\GW2Api\V2\Endpoint;
class CharacterEndpoint extends Endpoint implements IAuthenticatedEndpoint, IBulkEndpoint {
use BulkEndpoint, AuthenticatedEndpoint;
/** @var bool $supportsIdsAll */
protected $supportsIdsAll = false;
public function __construct( GW2Api $api, $apiKey ) {
parent::__construct( $api );
$this->apiKey = $apiKey;
}
/**
* {@inheritdoc}
*/
public function url() {
return 'v2/characters';
}
/**
* Get the backstory of a character.
*
* @param string $character
* @return BackstoryEndpoint
*/
public function backstoryOf( $character ) {
return new BackstoryEndpoint( $this->api, $this->apiKey, $character );
}
/**
* Get the core information of a character.
*
* @param string $character
* @return CoreEndpoint
*/
public function coreOf( $character ) {
return new CoreEndpoint( $this->api, $this->apiKey, $character );
}
/**
* Get the crafting information of a character.
*
* @param string $character
* @return CraftingEndpoint
*/
public function craftingOf( $character ) {
return new CraftingEndpoint( $this->api, $this->apiKey, $character );
}
/**
* Get the equipment of a character.
*
* @param string $character
* @return EquipmentEndpoint
*/
public function equipmentOf( $character ) {
return new EquipmentEndpoint( $this->api, $this->apiKey, $character );
}
/**
* Get the herpoints of a character.
*
* @param string $character
* @return HeropointEndpoint
*/
public function heropointsOf( $character ) {
return new HeropointEndpoint( $this->api, $this->apiKey, $character );
}
/**
* Get the inventory of a character.
*
* @param string $character
* @return InventoryEndpoint
*/
public function inventoryOf( $character ) {
return new InventoryEndpoint( $this->api, $this->apiKey, $character );
}
/**
* Get completed quests of a character.
*
* @param $character
* @return QuestEndpoint
*/
public function questsOf( $character ) {
return new QuestEndpoint( $this->api, $this->apiKey, $character );
}
/**
* Get unlocked recipes of a character.
*
* @param $character
* @return RecipeEndpoint
*/
public function recipesOf( $character ) {
return new RecipeEndpoint( $this->api, $this->apiKey, $character );
}
/**
* Get Super Adventure Box progression of a character.
*
* @param $character
* @return SabEndpoint
*/
public function sabOf( $character ) {
return new SabEndpoint( $this->api, $this->apiKey, $character );
}
/**
* Get the skills of a character.
*
* @param string $character
* @return SkillEndpoint
*/
public function skillsOf( $character ) {
return new SkillEndpoint( $this->api, $this->apiKey, $character );
}
/**
* Get the specializations of a character.
*
* @param string $character
* @return SpecializationEndpoint
*/
public function specializationsOf( $character ) {
return new SpecializationEndpoint( $this->api, $this->apiKey, $character );
}
/**
* Get the training information of a character.
*
* @param string $character
* @return TrainingEndpoint
*/
public function trainingOf( $character ) {
return new TrainingEndpoint( $this->api, $this->apiKey, $character );
}
}