English 中文(简体)
通过 php api 从 Github 从 Github 获得下载
原标题:Get Downloads from github via php api

我试图在 rel=“no follow'>https://github.com/ornicar/php-gitub-api 的帮助下,从Github上下载所有下载。

此工程中没有下载对象, 所以我创建了我自己的 :

类类 Github_ Api_ 下載延展 Github_ Api{

public function getDownloads($repo, $username){
     $string =   repos/ .urlencode($username). / .urlencode($repo). /downloads ;
     $response = $this->get($string);

    die(print_r($response));
    return $response;
时 时

时 时

当我运行这个,我只得到

Server Error HTTP 401: Unauthorized

  1. it should be possible to get this without authentication too, because if i use the url in the browser, it s working
  2. my authentication is working, because all the actions (e.g. create new repo,etc..) are working fine

有人能帮我吗?

最佳回答

我之前在找这个, 于是我写了自己的小功能, 张贴在我的博客上。希望这有帮助。

""http://hypnorabbit.com/github-api-v3-php-quick-download/"rel="nofollow" 检查一下

问题回答

暂无回答




相关问题
GitHub SAML SSO ( cloud enterprise)

I wanted to integrate GitHub saml sso for the project. I have a custom IDP and from the SP initiated saml flow, like getting to the https://github.com/orgs/ORG-NAME/sso and then sso getting successful,...

How do I clone a github project to run locally?

I am trying to follow this railscast tutorial for authlogic - and it points to the source here - I have git installed - how do I replicate the source onto my localhost so that I can follow the ...

git push heroku master permission denied on VISTA

(Using Vista)I m trying to clone an app from my GitHub Repository and push it into Heroku. Okay, so I ve tried to create an SSH key so many times with this: `ssh-keygen -t rsa` It seems to go ...

SSH Public key denied on "git clone" command

I am trying to clone a git repo that I forked in my GitHub Repository.It s a rails app. I want to clone it on my local git so that I can push it onto heroku. I generated a set of rsa keys and copied ...

heroku using git branch is confusing!

Ok, so I have a big github project that i m not supposed to merge my little Stacia branch into. However, it seems like Heroku only takes pushing MASTER seriously. It looks like I pushed my branch, but ...

热门标签