gitea/src/b6e17249-5afc-4bc0-a4aa-8d2.../code.power

28 lines
614 B
Plaintext

/**
* List repositories watched by the authenticated user.
*
* @param int $page Page number of results to return (1-based).
* @param int $limit Page size of results.
*
* @return array|null
* @since 3.2.0
**/
public function list(
int $page = 1,
int $limit = 10
): ?array
{
// Build the request path.
$path = '/user/subscriptions';
// Build the URL
$url = $this->uri->get($path);
$url->setVar('page', $page);
$url->setVar('limit', $limit);
// Send the get request.
return $this->response->get(
$this->http->get($url)
);
}