Skip to content

Commit

Permalink
fix series results
Browse files Browse the repository at this point in the history
  • Loading branch information
cevro committed May 25, 2024
1 parent c52a8fb commit 596e9a1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 13 deletions.
9 changes: 3 additions & 6 deletions src/Requests/SeriesResultsRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,31 +8,28 @@ class SeriesResultsRequest implements Request
{
private int $contestId;
private int $year;
private int $series;

public function __construct(int $contestId, int $year, int $series)
public function __construct(int $contestId, int $year)
{
$this->contestId = $contestId;
$this->year = $year;
$this->series = $series;
}

public function getMethod(): string
{
return 'GetSeriesResults';
return sprintf('contests/%d/years/%d/results', $this->contestId, $this->year);
}

public function getParams(): array
{
return [
'contestId' => $this->contestId,
'year' => $this->year,
'series' => $this->series,
];
}

public function getCacheKey(): string
{
return sprintf('series.results.%s.%s.%s', $this->contestId, $this->year, $this->series);
return sprintf('series.results.%s.%s', $this->contestId, $this->year);
}
}
12 changes: 5 additions & 7 deletions tools/downloader.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,10 @@
require_once __DIR__ . '/pass.php';

$downloader = new FKSDBDownloader(FKSDB_WSDL, FKSDB_USER, FKSDB_PASS, FKSDB_API);
$newDownloader = new Downloader([
'fksdb' => [
'url' => FKSDB_API,
'username' => FKSDB_USER,
'password' => FKSDB_PASS,
],
]);
$newDownloader = new Downloader(
FKSDB_API,
FKSDB_USER,
FKSDB_PASS,
);

return $newDownloader;

0 comments on commit 596e9a1

Please sign in to comment.