You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

24 lines
630 B

6 years ago
<?php
namespace Github\Api\Organization;
use Github\Api\Project\AbstractProjectApi;
use Github\Exception\MissingArgumentException;
class Projects extends AbstractProjectApi
{
public function all($organization, array $params = [])
{
return $this->get('/orgs/'.rawurlencode($organization).'/projects', array_merge(['page' => 1], $params));
}
public function create($organization, array $params)
{
if (!isset($params['name'])) {
throw new MissingArgumentException(['name']);
}
return $this->post('/orgs/'.rawurlencode($organization).'/projects', $params);
}
}