Help to use Github APIs

Hello

I am using https://github.com/diversen/simple-php-github-api to access github’s api.

I am able to access most of the API but the following.

The above API is a GET request that list all pull request

GET /repos/:owner/:repo/pulls

I am not able to get the above API work. I am not sure what the “:owner” means in it. I tried replacing it with my logged in username but it doesnot work. Shows me the following error

Array ( [message] => Not Found [documentation_url] => https://developer.github.com/v3 )

Can someone please help me understand what :owner means and what do I replace it with?
PS: I am using OAuth login mechanism.

Thanks

Using https://github.com/cpradio/sp-team-jarvis as an example

cpradio is the owner, sp-team-jarvis is the repo.

Does that help clarify what the owner/repo is for your given scenario?

hi

thanks for your reply.

yes its clear but still I am getting the same “not found” error message.

Can you remove your github id, secret, and scope and post your code here? Are you sure you have the id and secret set properly?

Hi cpradio

Before I share my code snippet, i’d like to know that when using the pull request api (logged in using oAuth) do I HAVE to be the owner of that github account or can I just be a member of the organization?

Unfortunately, I don’t know the answer. A quick way to test that is to create a repo with you as the owner and test with that. If your code works there, you may be on to something.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.