add more get functions
This commit is contained in:
parent
311a8ad399
commit
0ce51d3306
18
src/Repo.php
18
src/Repo.php
@ -51,6 +51,12 @@ class Repo{
|
||||
return $all_issues;
|
||||
}
|
||||
|
||||
public function getIssue($id){
|
||||
$url="repos/{$this->user}/{$this->repo}/issues/{$id}";
|
||||
$data=$this->client->request($url);
|
||||
return new Issue($this,$data);
|
||||
}
|
||||
|
||||
public function getLabelByName($name){
|
||||
$url="repos/{$this->user}/{$this->repo}/labels";
|
||||
if(!isset($this->cache['lables'])){
|
||||
@ -96,9 +102,19 @@ class Repo{
|
||||
return $data;
|
||||
}
|
||||
|
||||
public function getUserTimes($username){
|
||||
public function getTimes(){
|
||||
$url="repos/{$this->user}/{$this->repo}/times";
|
||||
return $this->client->request($url,'GET');
|
||||
}
|
||||
|
||||
public function getTimesByUsername($username){
|
||||
$url="repos/{$this->user}/{$this->repo}/times/{$username}";
|
||||
return $this->client->request($url,'GET');
|
||||
}
|
||||
|
||||
public function getUsers(){
|
||||
$url="repos/{$this->user}/{$this->repo}/collaborators";
|
||||
return $this->client->request($url,'GET');
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user