Docs, README, and './examples/' lack clarity for Atlassian Cloud based interactions
I'm trying to use your wrapper to access my cloud account, and the documentation seems to be geared almost entirely towards server use. I think I may be missing something. I followed the instructions on this page (https://atlassian-python-api.readthedocs.io/#) regarding bitbucket cloud and ended up with this code:
bitbucket = Cloud(
username=os.getenv("BB_USERNAME"),
password=os.getenv("BB_APP_PASS"),
cloud=True
)
This bitbucket variable seems very limited. I'm trying to use this to pull the contents of some files from the source of a repository. I've gotten a particular repository with this code:
lsc_workspace = bitbucket.workspaces.get("laguna-studio-code")
solo_project = lsc_workspace.projects.get("SOLO")
solo_repo = solo_project.repositories.get("solo-web")
I can't seem to access the code from this point, and I have no idea how to get to the methods outlined at this link (https://atlassian-python-api.readthedocs.io/bitbucket.html) from this Cloud object. Any assistance would be appreciated! Thank you for your time :slight_smile:
You're using the new OO interface and the linked documentation is for the old functions if you create a bit bucket object. The old interface is probably outdated. The new OO interface doesn't implement all functions.
So do we not have the ability to view source files of a repo?
I see no founction accessing https://developer.atlassian.com/bitbucket/api/2/reference/resource/repositories/%7Bworkspace%7D/%7Brepo_slug%7D/src.
If the path matches a file, then the raw contents of the file are returned (unless the format=meta query parameter was provided, in which case a json document containing the file's meta data is returned). If the path matches a directory, then a paginated list of file and directory entries is returned (if the format=meta query parameter was provided, then the json document containing the directory's meta data is returned
It says here that it's possible to get the raw contents of a file if the path matches a file :D This is from the description for status code 200 on the link you provided.
Yes, but that endpoint isn't implemented.
Ahhhhh I see. :(