I am trying to retrieve some blob information using github rest api. Being exactly http://develop.github.com/p/object.html the blob/show/:user/:repo/:tree_sha/:path
I get problems when requesting a file that is in a sub folder.
for example:
http://github.com/api/v2/xml/blob/show/ user / repository / *tree_shar* /folder/subfolder/file.htm
doesnt work.
how should the :path look?
Your request looks just fine and you were using the
:pathvariable correctly. But you used the wrong SHA. The SHA you used is from a commit. You need to use a tree SHA. You also need to make sure to use a tree SHA where the fileLinkedin/Summary.htmexists. The correct SHA is:b0215ec2989369ad39f81e11ecdd29ddf2be83c8And the full request:
https://github.com/api/v2/xml/blob/show/alexanderbeletsky/blog.beletsky.net/b0215ec2989369ad39f81e11ecdd29ddf2be83c8/Linkedin/Summary.htm
Edit: I totally forgot to tell how to get the tree SHA: First I checked out your repo from github:
git clone https://github.com/alexanderbeletsky/blog.beletsky.net.gitThen I checked the most recent commit of
Linkedin/Summary.htm:And there it was:
tree b0215ec2989369ad39f81e11ecdd29ddf2be83c8