1 | <?php |
||
11 | class WowService extends BattlenetHttpClient |
||
12 | { |
||
13 | /** |
||
14 | * {@inheritdoc} |
||
15 | */ |
||
16 | protected $gameParam = '/wow'; |
||
17 | |||
18 | /** |
||
19 | * Get achievement information by id. |
||
20 | * |
||
21 | * This provides data about an individual achievement |
||
22 | * |
||
23 | * @param int $achievementId Id of the achievement to retrieve |
||
24 | * @param array $options Options |
||
25 | * |
||
26 | * @return Illuminate\Support\Collection api response |
||
27 | */ |
||
28 | public function getAchievement($achievementId, array $options = []) |
||
32 | |||
33 | /** |
||
34 | * Get auction data. |
||
35 | * |
||
36 | * Auction APIs currently provide rolling batches of data about current auctions. Fetching auction dumps is a two |
||
37 | * step process that involves checking a per-realm index file to determine if a recent dump has been generated and |
||
38 | * then fetching the most recently generated dump file if necessary. |
||
39 | * |
||
40 | * This API resource provides a per-realm list of recently generated auction house data dumps |
||
41 | * |
||
42 | * @param string $realm Realm being requested |
||
43 | * @param array $options Options |
||
44 | * |
||
45 | * @return Illuminate\Support\Collection api response |
||
46 | */ |
||
47 | public function getAuctionDataStatus($realm, array $options = []) |
||
51 | |||
52 | /** |
||
53 | * Get boss master list. |
||
54 | * |
||
55 | * A list of all supported bosses. A 'boss' in this context should be considered a boss encounter, which may include |
||
56 | * more than one NPC. |
||
57 | * |
||
58 | * @param array $options Options |
||
59 | * |
||
60 | * @return Illuminate\Support\Collection api response |
||
61 | */ |
||
62 | public function getBossMasterList(array $options = []) |
||
66 | |||
67 | /** |
||
68 | * Get boss information by id. |
||
69 | * |
||
70 | * The boss API provides information about bosses. A 'boss' in this context should be considered a boss encounter, |
||
71 | * which may include more than one NPC. |
||
72 | * |
||
73 | * @param int $bossId Id of the boss you want to retrieve |
||
74 | * @param array $options Options |
||
75 | * |
||
76 | * @return Illuminate\Support\Collection api response |
||
77 | */ |
||
78 | public function getBoss($bossId, array $options = []) |
||
82 | |||
83 | /** |
||
84 | * Get realm leaderboards. |
||
85 | * |
||
86 | * The data in this request has data for all 9 challenge mode maps (currently). The map field includes the current |
||
87 | * medal times for each dungeon. Inside each ladder we provide data about each character that was part of each run. |
||
88 | * The character data includes the current cached spec of the character while the member field includes the spec of |
||
89 | * the character during the challenge mode run. |
||
90 | * |
||
91 | * @param string $realm Realm's name being requested |
||
92 | * @param array $options Options |
||
93 | * |
||
94 | * @return Illuminate\Support\Collection api response |
||
95 | */ |
||
96 | public function getRealmLeaderboard($realm, array $options = []) |
||
100 | |||
101 | /** |
||
102 | * Get region leaderboards. |
||
103 | * |
||
104 | * The region leaderboard has the exact same data format as the realm leaderboards except there is no realm field. |
||
105 | * It is simply the top 100 results gathered for each map for all of the available realm leaderboards in a region. |
||
106 | * |
||
107 | * @param array $options Options |
||
108 | * |
||
109 | * @return Illuminate\Support\Collection api response |
||
110 | */ |
||
111 | public function getRegionLeaderboard(array $options = []) |
||
115 | |||
116 | /** |
||
117 | * Get character information. |
||
118 | * |
||
119 | * The Character Profile API is the primary way to access character information. This Character Profile API can be |
||
120 | * used to fetch a single character at a time through an HTTP GET request to a URL describing the character profile |
||
121 | * resource. By default, a basic dataset will be returned and with each request and zero or more additional fields |
||
122 | * can be retrieved. To access this API, craft a resource URL pointing to the character who's information is to be |
||
123 | * retrieved |
||
124 | * |
||
125 | * @param string $realm Character's realm. Can be provided as the proper realm name or the normalized realm name |
||
126 | * @param string $characterName Name of the character you want to retrieve |
||
127 | * @param array $options Options |
||
128 | * |
||
129 | * @return Illuminate\Support\Collection api response |
||
130 | */ |
||
131 | public function getCharacter($realm, $characterName, array $options = []) |
||
135 | |||
136 | /** |
||
137 | * Get guild profile. |
||
138 | * |
||
139 | * The guild profile API is the primary way to access guild information. This guild profile API can be used to fetch |
||
140 | * a single guild at a time through an HTTP GET request to a url describing the guild profile resource. By default, |
||
141 | * a basic dataset will be returned and with each request and zero or more additional fields can be retrieved. |
||
142 | * |
||
143 | * There are no required query string parameters when accessing this resource, although the fields query string |
||
144 | * parameter can optionally be passed to indicate that one or more of the optional datasets is to be retrieved. |
||
145 | * Those additional fields are listed in the method titled "Optional Fields". |
||
146 | * |
||
147 | * @param string $realm Realm the guild lives on |
||
148 | * @param string $guildName Name of the guild being retrieved |
||
149 | * @param array $options Options |
||
150 | * |
||
151 | * @return Illuminate\Support\Collection api response |
||
152 | */ |
||
153 | public function getGuild($realm, $guildName, array $options = []) |
||
157 | |||
158 | /** |
||
159 | * Get guild members. |
||
160 | * |
||
161 | * This provides a list of characters currently in the guild Roster. |
||
162 | * This is a wrapper function for the getGuild data function for easier access. |
||
163 | * |
||
164 | * @param string $realm Realm the guild lives on |
||
165 | * @param string $guildName Name of the guild being retrieved |
||
166 | * @param array $options Options |
||
167 | * |
||
168 | * @return Illuminate\Support\Collection api response |
||
169 | */ |
||
170 | public function getGuildMembers($realm, $guildName, array $options = []) |
||
194 | |||
195 | /** |
||
196 | * Get item information by id. |
||
197 | * |
||
198 | * The item API provides detailed item information. This includes item set information if this item is part of a set. |
||
199 | * |
||
200 | * @param int $itemId Id of the item being retrieved |
||
201 | * @param array $options Options |
||
202 | * |
||
203 | * @return Illuminate\Support\Collection api response |
||
204 | */ |
||
205 | public function getItem($itemId, array $options = []) |
||
209 | |||
210 | /** |
||
211 | * Get set information by id. |
||
212 | * |
||
213 | * The item API provides detailed item information. This includes item set information if this item is part of a set. |
||
214 | * |
||
215 | * @param int $setId Id of the set being requested |
||
216 | * @param array $options Options |
||
217 | * |
||
218 | * @return Illuminate\Support\Collection api response |
||
219 | */ |
||
220 | public function getItemSet($setId, array $options = []) |
||
224 | |||
225 | /** |
||
226 | * Get mount master list. |
||
227 | * |
||
228 | * A list of all supported mounts |
||
229 | * |
||
230 | * @param array $options Options |
||
231 | * |
||
232 | * @return Illuminate\Support\Collection api response |
||
233 | */ |
||
234 | public function getMountMasterList(array $options = []) |
||
238 | |||
239 | /** |
||
240 | * Get pet lists. |
||
241 | * |
||
242 | * A list of all supported battle and vanity pets |
||
243 | * |
||
244 | * @param array $options Options |
||
245 | * |
||
246 | * @return Illuminate\Support\Collection api response |
||
247 | */ |
||
248 | public function getPetList(array $options = []) |
||
252 | |||
253 | /** |
||
254 | * Get pet ability information by id. |
||
255 | * |
||
256 | * This provides data about a individual battle pet ability ID. We do not provide the tooltip for the ability yet. |
||
257 | * We are working on a better way to provide this since it depends on your pet's species, level and quality rolls. |
||
258 | * |
||
259 | * @param int $abilityId Id of the ability you want to retrieve |
||
260 | * @param array $options Options |
||
261 | * |
||
262 | * @return Illuminate\Support\Collection api response |
||
263 | */ |
||
264 | public function getPetAbility($abilityId, array $options = []) |
||
268 | |||
269 | /** |
||
270 | * Get pet species information by id. |
||
271 | * |
||
272 | * This provides the data about an individual pet species. The species IDs can be found your character profile |
||
273 | * using the options pets field. Each species also has data about what it's 6 abilities are. |
||
274 | * |
||
275 | * @param int $speciesId The species you want to retrieve |
||
276 | * @param array $options Options |
||
277 | * |
||
278 | * @return Illuminate\Support\Collection api response |
||
279 | */ |
||
280 | public function getPetSpecies($speciesId, array $options = []) |
||
284 | |||
285 | /** |
||
286 | * Get pet stats by species id. |
||
287 | * |
||
288 | * Retrieve detailed information about a given species of pet |
||
289 | * |
||
290 | * @param int $speciesId Pet's species id. This can be found by querying a users' list of pets via the Character Profile API |
||
291 | * @param array $options Options |
||
292 | * |
||
293 | * @return Illuminate\Support\Collection api response |
||
294 | */ |
||
295 | public function getPetStats($speciesId, array $options = []) |
||
315 | |||
316 | /** |
||
317 | * Get leaderboards. |
||
318 | * |
||
319 | * The Leaderboard API endpoint provides leaderboard information for the 2v2, 3v3, 5v5 and Rated Battleground |
||
320 | * leaderboards. |
||
321 | * |
||
322 | * @param int $bracket Type of leaderboard you want to retrieve. Example: 2v2, 3v3, 5v5, and rbg |
||
323 | * @param array $options Options |
||
324 | * |
||
325 | * @return Illuminate\Support\Collection api response |
||
326 | */ |
||
327 | public function getLeaderboards($bracket, array $options = []) |
||
331 | |||
332 | /** |
||
333 | * Get quest information by id. |
||
334 | * |
||
335 | * Retrieve metadata for a given quest. |
||
336 | * |
||
337 | * @param int $questId Id of the quest you want to retrieve |
||
338 | * @param array $options Options |
||
339 | * |
||
340 | * @return Illuminate\Support\Collection api response |
||
341 | */ |
||
342 | public function getQuest($questId, array $options = []) |
||
346 | |||
347 | /** |
||
348 | * Get realm status. |
||
349 | * |
||
350 | * The realm status API allows developers to retrieve realm status information. This information is limited to |
||
351 | * whether or not the realm is up, the type and state of the realm, the current population, and the status of the |
||
352 | * two world PvP zones |
||
353 | * |
||
354 | * @param array $options Options |
||
355 | * |
||
356 | * @return Illuminate\Support\Collection api response |
||
357 | */ |
||
358 | public function getRealmStatus(array $options = []) |
||
362 | |||
363 | /** |
||
364 | * Get recipe information by id. |
||
365 | * |
||
366 | * The recipe API provides basic recipe information |
||
367 | * |
||
368 | * @param int $recipeId Id for the desired recipe |
||
369 | * @param array $options Options |
||
370 | * |
||
371 | * @return Illuminate\Support\Collection api response |
||
372 | */ |
||
373 | public function getRecipe($recipeId, array $options = []) |
||
377 | |||
378 | /** |
||
379 | * Get spell information by id. |
||
380 | * |
||
381 | * The spell API provides some information about spells |
||
382 | * |
||
383 | * @param int $spellId Id of the desired spell |
||
384 | * @param array $options Options |
||
385 | * |
||
386 | * @return Illuminate\Support\Collection api response |
||
387 | */ |
||
388 | public function getSpell($spellId, array $options = []) |
||
392 | |||
393 | /** |
||
394 | * Get zone master list. |
||
395 | * |
||
396 | * A list of all supported zones and their bosses. A 'zone' in this context should be considered a dungeon, or a |
||
397 | * raid, not a zone as in a world zone. A 'boss' in this context should be considered a boss encounter, which may |
||
398 | * include more than one NPC. |
||
399 | * |
||
400 | * @param array $options Options |
||
401 | * |
||
402 | * @return Illuminate\Support\Collection api response |
||
403 | */ |
||
404 | public function getZonesMasterList(array $options = []) |
||
408 | |||
409 | /** |
||
410 | * Get zone information by id. |
||
411 | * |
||
412 | * The Zone API provides some information about zones. |
||
413 | * |
||
414 | * @param int $zoneId Id of the zone you want to retrieve |
||
415 | * @param array $options Options |
||
416 | * |
||
417 | * @return Illuminate\Support\Collection api response |
||
418 | */ |
||
419 | public function getZone($zoneId, array $options = []) |
||
423 | |||
424 | /** |
||
425 | * Get data battlegroups. |
||
426 | * |
||
427 | * The battlegroups data API provides the list of battlegroups for this region. Please note the trailing '/' on this URL |
||
428 | * |
||
429 | * @param array $options Options |
||
430 | * |
||
431 | * @return Illuminate\Support\Collection api response |
||
432 | */ |
||
433 | public function getDataBattlegroups(array $options = []) |
||
437 | |||
438 | /** |
||
439 | * Get data character races. |
||
440 | * |
||
441 | * The character races data API provides a list of each race and their associated faction, name, unique ID, and skin |
||
442 | * |
||
443 | * @param array $options Options |
||
444 | * |
||
445 | * @return Illuminate\Support\Collection api response |
||
446 | */ |
||
447 | public function getDataCharacterRaces(array $options = []) |
||
451 | |||
452 | /** |
||
453 | * Get data character classes. |
||
454 | * |
||
455 | * The character classes data API provides a list of character classes |
||
456 | * |
||
457 | * @param array $options Options |
||
458 | * |
||
459 | * @return Illuminate\Support\Collection api response |
||
460 | */ |
||
461 | public function getDataCharacterClasses(array $options = []) |
||
465 | |||
466 | /** |
||
467 | * Get data character achievements. |
||
468 | * |
||
469 | * The character achievements data API provides a list of all of the achievements that characters can earn as well |
||
470 | * as the category structure and hierarchy |
||
471 | * |
||
472 | * @param array $options Options |
||
473 | * |
||
474 | * @return Illuminate\Support\Collection api response |
||
475 | */ |
||
476 | public function getDataCharacterAchievements(array $options = []) |
||
480 | |||
481 | /** |
||
482 | * Get data guild rewards. |
||
483 | * |
||
484 | * The guild rewards data API provides a list of all guild rewards |
||
485 | * |
||
486 | * @param array $options Options |
||
487 | * |
||
488 | * @return Illuminate\Support\Collection api response |
||
489 | */ |
||
490 | public function getDataGuildRewards(array $options = []) |
||
494 | |||
495 | /** |
||
496 | * Get data guild perks. |
||
497 | * |
||
498 | * The guild perks data API provides a list of all guild perks |
||
499 | * |
||
500 | * @param array $options Options |
||
501 | * |
||
502 | * @return Illuminate\Support\Collection api response |
||
503 | */ |
||
504 | public function getDataGuildPerks(array $options = []) |
||
508 | |||
509 | /** |
||
510 | * Get data guild achievements. |
||
511 | * |
||
512 | * The guild achievements data API provides a list of all of the achievements that guilds can earn as well as the |
||
513 | * category structure and hierarchy |
||
514 | * |
||
515 | * @param array $options Options |
||
516 | * |
||
517 | * @return Illuminate\Support\Collection api response |
||
518 | */ |
||
519 | public function getDataGuildAchievements(array $options = []) |
||
523 | |||
524 | /** |
||
525 | * Get data item classes. |
||
526 | * |
||
527 | * The item classes data API provides a list of item classes |
||
528 | * |
||
529 | * @param array $options Options |
||
530 | * |
||
531 | * @return Illuminate\Support\Collection api response |
||
532 | */ |
||
533 | public function getDataItemClasses(array $options = []) |
||
537 | |||
538 | /** |
||
539 | * Get data talents. |
||
540 | * |
||
541 | * The talents data API provides a list of talents, specs and glyphs for each class |
||
542 | * |
||
543 | * @param array $options Options |
||
544 | * |
||
545 | * @return Illuminate\Support\Collection api response |
||
546 | */ |
||
547 | public function getDataTalents(array $options = []) |
||
551 | |||
552 | /** |
||
553 | * Get data pet types. |
||
554 | * |
||
555 | * The different bat pet types (including what they are strong and weak against) |
||
556 | * |
||
557 | * @param array $options Options |
||
558 | * |
||
559 | * @return null|\Xklusive\BattlenetApi\Collection api response |
||
560 | */ |
||
561 | public function getDataPetTypes(array $options = []) |
||
565 | |||
566 | /** |
||
567 | * Get profile characters. |
||
568 | * |
||
569 | * This provides data about the current logged in OAuth user's WoW profile |
||
570 | * |
||
571 | * @param array $options Options |
||
572 | * |
||
573 | * @param string $bnetToken Access token of the current logged in user. |
||
574 | * @return Illuminate\Support\Collection api response |
||
575 | */ |
||
576 | public function getProfileCharacters(array $options = [], $bnetToken = null) |
||
582 | } |
||
583 |
It seems like the method you are trying to call exists only in some of the possible types.
Let’s take a look at an example:
Available Fixes
Add an additional type-check:
Only allow a single type to be passed if the variable comes from a parameter: