-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathClient.php
More file actions
40 lines (34 loc) · 960 Bytes
/
Client.php
File metadata and controls
40 lines (34 loc) · 960 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
<?php
namespace Scion\GitHub;
use Scion\GitHub\Receiver\AbstractReceiver;
/**
* Client API v3
* @link https://developer.github.com/v3/
* @package Scion\GitHub
*/
class Client extends AbstractApi {
/** Receiver constants */
const ACTIVITY = 'Activity';
const ENTERPRISE = 'Enterprise';
const GISTS = 'Gists';
const GIT_DATA = 'GitData';
const ISSUES = 'Issues';
const MISCELLANEOUS = 'Miscellaneous';
const ORGANIZATIONS = 'Organizations';
const PULL_REQUESTS = 'PullRequests';
const REPOSITORIES = 'Repositories';
const SEARCH = 'Search';
const USERS = 'Users';
/**
* Returns receiver object
* @param string $receiver
* @return null|AbstractReceiver
*/
public function getReceiver($receiver) {
$class = (string)$this->getString()->sprintf(':namespace\Receiver\:receiver', __NAMESPACE__, $receiver);
if (class_exists($class)) {
return new $class($this);
}
return null;
}
}