forked from KnpLabs/php-github-api
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAuthorizations.php
More file actions
43 lines (35 loc) · 916 Bytes
/
Copy pathAuthorizations.php
File metadata and controls
43 lines (35 loc) · 916 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<?php
namespace Github\Api;
use Github\Api\AbstractApi;
/**
* Creating, deleting and listing authorizations
*
* @link http://developer.github.com/v3/oauth/
*/
class Authorizations extends AbstractApi
{
public function all()
{
return $this->get('authorizations');
}
public function show($number)
{
return $this->get('authorizations/'.rawurlencode($number));
}
public function create(array $params)
{
return $this->post('authorizations', $params);
}
public function update($id, array $params)
{
return $this->patch('authorizations/'.rawurlencode($id), $params);
}
public function remove($id)
{
return $this->delete('authorizations/'.rawurlencode($id));
}
public function check($id, $token)
{
return $this->get('authorizations/'.rawurlencode($id).'/tokens/'.rawurlencode($token));
}
}