Skip to content

Commit 87b4530

Browse files
Merge pull request #1 from kurier/projectId
Added support for projectId for riddle builder.
2 parents 7f4d076 + 9430a9c commit 87b4530

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

src/Builder/RiddleBuilderFrame.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,9 @@ protected abstract function validateQuestionItems(array $items): bool;
3535
*
3636
* @return array the serialized created Riddle
3737
*/
38-
public function build(bool $publishAfterCreation = true): array
38+
public function build(bool $publishAfterCreation = true, ?int $projectId = null): array
3939
{
40-
return $this->client->riddleBuilder()->buildRiddle($this->type, $this->build, $publishAfterCreation);
40+
return $this->client->riddleBuilder()->buildRiddle($this->type, $this->build, $publishAfterCreation, $projectId);
4141
}
4242

4343
public function setTitle(string $title): static

src/Service/RiddleBuilder.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,12 @@ class RiddleBuilder extends ApiService
1414
*
1515
* @return array the serialized created Riddle
1616
*/
17-
public function buildRiddle(string $type, array $build, bool $publishAfterCreation = true): array
17+
public function buildRiddle(string $type, array $build, bool $publishAfterCreation = true, ?int $projectId = null): array
1818
{
1919
return $this->client->getHTTPConnector()->getArrayContent('riddle-builder', [], [
2020
'type' => $type,
2121
'build' => $build,
22+
'projectId' => $projectId,
2223
'publish' => $publishAfterCreation,
2324
], method: 'POST');
2425
}

0 commit comments

Comments
 (0)