Skip to content

Commit

Permalink
Added per_page parameter for list requests
Browse files Browse the repository at this point in the history
  • Loading branch information
schmidfelix committed Mar 10, 2021
1 parent 23aa537 commit bc6c3e3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions app/Support/Ploi.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public function __construct(string $token)

public function getServers()
{
$response = Http::withToken($this->token)->get(self::$BASE_URL . 'servers');
$response = Http::withToken($this->token)->get(self::$BASE_URL . 'servers?per_page=50');

return $response['data'];
}
Expand All @@ -34,7 +34,7 @@ public function getServerProviders()

public function getSites($server)
{
return Http::withToken($this->token)->get(self::$BASE_URL . "servers/{$server}/sites")['data'];
return Http::withToken($this->token)->get(self::$BASE_URL . "servers/{$server}/sites?per_page=50")['data'];
}

public function createSite($server, $rootDomain, $webDir, $systemUser): int
Expand Down Expand Up @@ -131,7 +131,7 @@ public function createServer($name, $plan, $region, $credential, $type, $databas

public function getDatabases($server)
{
return Http::withToken($this->token)->get(self::$BASE_URL . "servers/{$server}/databases")['data'];
return Http::withToken($this->token)->get(self::$BASE_URL . "servers/{$server}/databases?per_page=50")['data'];
}

public function createDatabase($server, $name, $user, $password)
Expand Down Expand Up @@ -160,7 +160,7 @@ public function disableTestDomain($server, $site)

public function getLogs($server, $site)
{
return Http::withToken($this->token)->get(self::$BASE_URL . "servers/{$server}/sites/{$site}/log")['data'];
return Http::withToken($this->token)->get(self::$BASE_URL . "servers/{$server}/sites/{$site}/log?per_page=50")['data'];
}

public function getLog($server, $site, $log)
Expand Down
Binary file modified builds/ploi
Binary file not shown.

0 comments on commit bc6c3e3

Please sign in to comment.