tanuki v0.2.1 Tanuki.Projects

Summary

Functions

POST /projects

POST /projects/user/:uid

POST /projects/:id/fork/:forked_from_id

POST /projects/:id/fork/:forked_from_id

DELETE /projects/:id

GET /projects/:id/events

GET /projects/:id

POST /projects/fork/:id

GET /projects/all

PUT /projects/:id

GET /projects/owned

GET /projects/search/:query

POST /projects/:id/share

GET /projects/starred

POST /projects/:id/uploads

Functions

create(client, params)

POST /projects

Creates a new project owned by the authenticated user.

Parameters:

  • name (required) - new project name
  • path (optional) - custom repository name for new project. By default generated based on name
  • namespace_id (optional) - namespace for the new project (defaults to user)
  • description (optional) - short project description
  • issues_enabled (optional)
  • merge_requests_enabled (optional)
  • builds_enabled (optional)
  • wiki_enabled (optional)
  • snippets_enabled (optional)
  • public (optional) - if true same as setting visibility_level = 20
  • visibility_level (optional)
  • import_url (optional)
create_for_user(user_id, client, params)

POST /projects/user/:uid

Creates a new project owned by the specified user. Available only for admins.

Parameters:

  • name (required) - new project name
  • path (optional) - custom repository name for new project. By default generated based on name
  • namespace_id (optional) - namespace for the new project (defaults to user)
  • description (optional) - short project description
  • issues_enabled (optional)
  • merge_requests_enabled (optional)
  • builds_enabled (optional)
  • wiki_enabled (optional)
  • snippets_enabled (optional)
  • public (optional) - if true same as setting visibility_level = 20
  • visibility_level (optional)
  • import_url (optional)
create_fork_relation(id, client)

POST /projects/:id/fork/:forked_from_id

Delete an existing forked from relationship

create_fork_relation(id, fork_from, client)

POST /projects/:id/fork/:forked_from_id

Create a forked from/to relation between existing projects.

delete(id, client)

DELETE /projects/:id

Removes a project including all associated resources (issues, merge requests etc.)

events(id, client)

GET /projects/:id/events

Get the events for the specified project. Sorted from newest to latest

id - can be either the integer id or NAMESPACE/PROJECT_NAME

find(id, client)

GET /projects/:id

Get a specific project, identified by project ID or NAMESPACE/PROJECT_NAME, which is owned by the authenticated user. If using namespaced projects call make sure that the NAMESPACE/PROJECT_NAME is URL-encoded, eg. /api/v3/projects/diaspora%2Fdiaspora (where / is represented by %2F).

fork(id, client)

POST /projects/fork/:id

Forks a project into the user namespace of the authenticated user.

list(client, params \\ [])

GET /projects

Get a list of projects accessible by the authenticated user.

Parameters:

  • archived (optional) - if passed, limit by archived status
  • order_by (optional) - Return requests ordered by id, name, path, created_at, updated_at or last_activity_at fields. Default is created_at
  • sort (optional) - Return requests sorted in asc or desc order. Default is desc
  • search (optional) - Return list of authorized projects according to a search criteria
list_all(client, params \\ [])

GET /projects/all

Get a list of all GitLab projects (admin only).

Parameters:

  • archived (optional) - if passed, limit by archived status
  • order_by (optional) - Return requests ordered by id, name, path, created_at, updated_at or last_activity_at fields. Default is created_at
  • sort (optional) - Return requests sorted in asc or desc order. Default is desc
  • search (optional) - Return list of authorized projects according to a search criteria
modify(id, client, params)

PUT /projects/:id

Updates an existing project

Parameters:

  • name (required) - new project name
  • path (optional) - custom repository name for new project. By default generated based on name
  • namespace_id (optional) - namespace for the new project (defaults to user)
  • description (optional) - short project description
  • issues_enabled (optional)
  • merge_requests_enabled (optional)
  • builds_enabled (optional)
  • wiki_enabled (optional)
  • snippets_enabled (optional)
  • public (optional) - if true same as setting visibility_level = 20
  • visibility_level (optional)
owned(client, params \\ [])

GET /projects/owned

Get a list of projects which are owned by the authenticated user.

Parameters:

  • archived (optional) - if passed, limit by archived status
  • order_by (optional) - Return requests ordered by id, name, path, created_at, updated_at or last_activity_at fields. Default is created_at
  • sort (optional) - Return requests sorted in asc or desc order. Default is desc
  • search (optional) - Return list of authorized projects according to a search criteria
search(query, client, params \\ [])

GET /projects/search/:query

Search for projects by name which are accessible to the authenticated user.

Parameters:

  • per_page (optional) - number of projects to return per page
  • page (optional) - the page to retrieve
  • order_by (optional) - Return requests ordered by id, name, created_at or last_activity_at fields
  • sort (optional) - Return requests sorted in asc or desc order
share(id, client, params)

POST /projects/:id/share

Allow to share project with group.

Parameters:

  • group_id (required) - The ID of a group
  • group_access (required) - Level of permissions for sharing
starred(client, params \\ [])

GET /projects/starred

Get a list of projects which are starred by the authenticated user.

Parameters:

  • archived (optional) - if passed, limit by archived status
  • order_by (optional) - Return requests ordered by id, name, path, created_at, updated_at or last_activity_at fields. Default is created_at
  • sort (optional) - Return requests sorted in asc or desc order. Default is desc
  • search (optional) - Return list of authorized projects according to a search criteria
upload(id, client, params)

POST /projects/:id/uploads

Uploads a file to the specified project to be used in an issue or merge request description, or a comment. Parameters:

  • file (required) - the file to be uploaded