How to use github v3 contents api to fetch a file's contents from a particular branch http://developer.github.com/v3/repos/contents/ i tried these options https://api.github.com/repos/'org_name'/'repo_name'/contents/'file_path' https://api.github.com/repos/'org_name'/'repo_name'/contents/'file_path'/?ref=branch_name or quite a few options , but it fetches the file contents from the masters branch only.
but i need to fetch the contents from a branch other than master. I know i am missing something very basic , but not a figure out what. thanks in advance
That's strange because it seems to work for me. Here is the URL for fetching the index.html file in the gh-pages branch from the tracing-framework repo from Google's GitHub organization:
https://api.github.com/repos/google/tracing-framework/contents/index.html?ref=gh-pages
The index.html file doesn't exist in master.
Can you give the exact URL you are trying?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With