I need a simplest way to embed Bitbucket data into your own site. I would like to get raw contents of the most recent version of a file in a selected branch. Is it possible through the API?
If yes, is there a tutorial anywhere?
I have read Bitbucket API, bitbucket API v2 /repositories/{username}/{repo_slug}/ permissions problem, and REST APIs but have not found any definite explanation.
I would like:
Let's assume my repository name is game, branch is beta, and the file characters.txt. How do I access /repositories/novocien/game/ characters.txt of beta?
Any help most appreciated.
In the meantime of waiting for an answer I figured it out myself, though never have I expected to spend two weeks on that. I put a file with an example and an answer to my repository.
Feel free to comment it here. Or, if you are an Atlassian developer, answer when does /2.0/repositories/{username}/{repo_slug}/refs/branches/{name} answer with `type:"named branch"` and when with `type:"commit"`
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.