wishthis/vendor/knplabs/github-api/lib/Github/Api/Miscellaneous/Licenses.php
2022-01-21 09:23:52 +01:00

34 lines
681 B
PHP

<?php
namespace Github\Api\Miscellaneous;
use Github\Api\AbstractApi;
class Licenses extends AbstractApi
{
/**
* Lists all the licenses available on GitHub.
*
* @link https://developer.github.com/v3/licenses/
*
* @return array
*/
public function all()
{
return $this->get('/licenses');
}
/**
* Get an individual license by its license key.
*
* @link https://developer.github.com/v3/licenses/#get-an-individual-license
*
* @param string $license
*
* @return array
*/
public function show($license)
{
return $this->get('/licenses/'.rawurlencode($license));
}
}