Questions about GitLab API
I built Octotree (https://chrome.google.com/webstore/detail/octotree/bkhaagjahfmjljalopjnoealnfndnagc/related), a browser extension that shows code tree for GitLab and GitHub. Octotree uses the GitLab API to retrieve repo contents. However, it has 2 limitations:
-
The API requires project ID. But there's no way to get project ID unless the user is logged in (in which case, Octotree gets the value of
#project_id
in the DOM). Thus, Octotree requires user to login into GitLab before the code tree shows. -
The API only returns contents of a single directory at a time. So Octotree can't make a single request to download all contents. For the majority of repos where there are just a few or few dozens of files, it's much faster when Octotree downloads everything and render the entire tree at once.
Is there a way to retrieve project ID without user logging in? And is there any chance GitLab will improve the API to support something like a recursive or load-all option?