我尝试混合使用Github文档:https://developer.github.com/v3/repos/#list-user-repositories
和Hybridauth用于获取hybridauth记录的用户的存储库列表。
我有类似的东西暂时没有返回。
/**
* load the user's repositories
*/
function getUserRepos()
{
$data = $this->api->api( "user/repos" );
$this->user->repos->full_name = @ $data->name;
return $this->user->repos;
}
编辑:这是做到这一点的好方法:
/**
* load the user's repositories
*/
function getUserRepos()
{
$data = $this->api->api( "user/repos" );
foreach($this->api->get("user/repos") as $repos){
return $repos;
}
}