Description Usage Arguments Details Value API versions Examples
Creates a function that can be used to issue requests to the specified
gitlab API instance with the specified user private token and (for gl_project_connection
)
only to a specified project.
1 2 3 4 5 | gl_connection(gitlab_url, private_token, api_version = "v4",
api_location = paste0("/api/", api_version, "/"))
gl_project_connection(gitlab_url, project, private_token,
api_version = "v4", api_location = paste0("/api/", api_version, "/"))
|
gitlab_url |
URL to the gitlab instance (e.g. |
private_token |
private_token with which to identify. You can generate one in the webinterface under
|
api_version |
Either "v3" or "v4" for one of the two gitlab API version. See Details section on API versions. |
api_location |
location of the gitlab API under the |
project |
id or name of project to issue requests to |
The returned function should serve as the primary way to access the gitlab
API in the following. It can take vector/character arguments in the same way
as the function gitlab
does, as well as the convenience functions
provided by this package or written by the user. If it is passed such that
function it calls it with the arguments provided in ...
and the gitlab
URL, api location and private_token provided when creating it via gl_connection
.
Note: currently gitlab API v4 is supported. Gitlab API v3 is no longer supported, but you can give it a try.
A function to access a specific gitlab API as a specific user, see details
"v4" is the standard API since Gitlab version 9.0 and only this version is officially supported by gitlabr since version 1.1.6. "v3" as a parameter value is not removed, since for many instances, gitlabr code will still work if you try.
1 2 3 4 5 6 | ## Not run:
my_gitlab <- gl_connection("http://gitlab.example.com", "123####89")
my_gitlab("projects")
my_gitlab(gl_get_file, "test-project", "README.md", ref = "dev")
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.