I want to read the contents of the file in a repository using the Git API through Java. I am currently able to pull the tree information as specified here https://developer.github.com/v3/git/trees/#get-a-tree But when i use the URL provided in the "tree" object it gives me a response like this on the browser.
{
"sha": "0f182a0349c4925c57f4ffbd5802b536a3e2588b",
"size": 45,
"url": "https://api.github.com/repos/akshayvish/DeleteDuplicates/git/blobs/5e648f5a970ef631c93910282706a231f054689a",
"content": "Ki5jbGFzcwoKIyBQYWNrYWdlIEZpbGVzICMKKi5qYXIKKi53YXIKKi5lYXIK\n",
"encoding": "base64"
}
This JSON doesn't provide me any information about the contents of the file. It is supposed to be pointing to a README.md file. I am using GSON library in my JAVA app to GET data from the GitHub API. I was expecting the whole text of the file as a blob or something within the JSON response instead of just a SHA and some other URL. The URL throws up this JSON again so I don't know how this URL is supposed to be of any help. I know it's designed with a lot of intelligence, but I am just stuck with no info on how to proceed beyond this.
Thanks for any help