Class: Projects

Projects


new Projects()

Methods


all()

Get a list of visible projects for authenticated user.

Returns:
Type
Promise

create(project)

Creates a new project owned by the authenticated user.

Parameters:
Name Type Description
project object

project information

Properties
Name Type Description
name string

The name of the new project. Equals path if not provided.

path string

Repository name for new project. Generated based on name if not provided (generated lowercased with dashes).

Returns:

project information

Type
Promise

createForUser(project, userId)

Creates a new project owned by the specified user.

Parameters:
Name Type Description
project object

project information

Properties
Name Type Description
name string

The name of the new project. Equals path if not provided.

path string

Repository name for new project. Generated based on name if not provided (generated lowercased with dashes).

userId number

The user ID of the project owner

Returns:

project information

Type
Promise

group(groupId)

List a group's projects

Parameters:
Name Type Description
groupId number
Returns:
Type
Promise

query(projectId)

Get a specific project.

Parameters:
Name Type Description
projectId number | string

The ID or URL-encoded path of the project

Returns:
Type
Promise

remove(projectId)

delete a given project.

Parameters:
Name Type Description
projectId number | string

The ID or URL-encoded path of the project

Returns:
Type
Promise

star(projectId)

Stars a given project.

Parameters:
Name Type Description
projectId number | string

The ID or URL-encoded path of the project

Returns:
Type
Promise