-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
67 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Fykosak\FKSDBDownloaderCore\Requests; | ||
|
||
class ParticipantsRequest implements Request | ||
{ | ||
private int $eventId; | ||
|
||
public function __construct(int $eventId) | ||
{ | ||
$this->eventId = $eventId; | ||
} | ||
|
||
public function getMethod(): string | ||
{ | ||
return 'events/' . $this->eventId . '/participants'; | ||
} | ||
|
||
public function getParams(): array | ||
{ | ||
return [ | ||
'eventId' => $this->eventId, | ||
]; | ||
} | ||
|
||
public function getCacheKey(): string | ||
{ | ||
return sprintf('participant-list.%d', $this->eventId); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Fykosak\FKSDBDownloaderCore\Requests; | ||
|
||
class TeamsRequest implements Request | ||
{ | ||
private int $eventId; | ||
|
||
public function __construct(int $eventId) | ||
{ | ||
$this->eventId = $eventId; | ||
} | ||
|
||
public function getMethod(): string | ||
{ | ||
return 'events/' . $this->eventId . '/teams'; | ||
} | ||
|
||
public function getParams(): array | ||
{ | ||
return [ | ||
'eventId' => $this->eventId, | ||
]; | ||
} | ||
|
||
public function getCacheKey(): string | ||
{ | ||
return sprintf('team-list.%d', $this->eventId); | ||
} | ||
} |