Skip to content

Commit 1603577

Browse files
committed
[FEATURE] Support includeFullSkills for SkillSets
Fixes: #10
1 parent 3ed3abc commit 1603577

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/Api/SkillSet.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
*/
2525

2626
use GuzzleHttp\Client;
27+
use GuzzleHttp\Exception\ClientException;
2728
use GuzzleHttp\Psr7\Request;
2829
use SkillDisplay\PHPToolKit\Configuration\Settings;
2930
use SkillDisplay\PHPToolKit\Entity\SkillSet as Entity;
@@ -48,13 +49,16 @@ public function __construct(
4849
$this->client = $client;
4950
}
5051

51-
public function getById(int $id): Entity
52+
public function getById(int $id, bool $includeFullSkills = false): Entity
5253
{
5354
if ($id <= 0) {
5455
throw new \Exception('ID of SkillSet has to be a positive integer.', 1600764811);
5556
}
5657

5758
$url = $this->settings->getAPIUrl() . '/api/v1/skillset/' . $id;
59+
if ($includeFullSkills) {
60+
$url .= '?includeFullSkills';
61+
}
5862
try {
5963
$result = $this->client->send(new Request(
6064
'GET',

0 commit comments

Comments
 (0)