4
0
Fork 0
api-powers/src/be0cae8b-4b78-4f59-b97b-9e3.../code.power

48 lines
1003 B
Plaintext

/**
* List the translations
*
* @return object|null The response object or null if an error occurs.
* @since 2.0.1
*/
public function list(): ?object
{
return $this->response->get(
$this->http->get(
$this->uri->get('translations.json')
)
);
}
/**
* List the translations checksums
*
* @return object|null The response object or null if an error occurs.
* @since 2.0.1
*/
public function checksum(): ?object
{
return $this->response->get(
$this->http->get(
$this->uri->get('checksum.json')
)
);
}
/**
* Get the translation's checksums
*
* @param string $translation The translation.
*
* @return string|null The response checksum or null if an error occurs.
* @since 2.0.1
*/
public function sha(string $translation = 'kjv'): ?string
{
return trim(
$this->response->get(
$this->http->get(
$this->uri->get($translation . '.sha')
)
)
);
}