ChinoAPIRepositories

ChinoAPIRepositories

new ChinoAPIRepositories(baseUrl, customerId, customerKey)

Create a caller for Repositories Chino APIs

Parameters:
Name Type Default Description
baseUrl string

The url endpoint for APIs

customerId string

The Chino customer id or bearer token

customerKey string | null null

The Chino customer key or null (not provided)

Source:

Methods

create(data) → {Promise.<objects.Repository, objects.ChinoException>}

Create a new repository

Parameters:
Name Type Description
data object
Source:
Returns:

A promise that return a Repository object if resolved, otherwise throw an ChinoException object if rejected or was not retrieved a success status

Type
Promise.<objects.Repository, objects.ChinoException>

delete(repositoryId, force) → {Promise.<objects.Success, objects.ChinoException>}

Deactivate (or delete) repository selected by its id

Parameters:
Name Type Default Description
repositoryId string
force boolean false

If true delete repository information otherwise only deactivate it. Default value is false (deactivate)

Source:
Returns:

A promise that return a Success object if resolved, otherwise throw an ChinoException object if rejected or was not retrieved a success status

Type
Promise.<objects.Success, objects.ChinoException>

details(repositoryId) → {Promise.<objects.Repository, objects.ChinoException>}

Return information about repository selected by its id

Parameters:
Name Type Description
repositoryId string
Source:
Returns:

A promise that return a Repository object if resolved, otherwise throw an ChinoException object if rejected or was not retrieved a success status

Type
Promise.<objects.Repository, objects.ChinoException>

list(offset, limit) → {Promise.<Array, objects.ChinoException>}

Return the list of existing repositories

Parameters:
Name Type Default Description
offset int 0
limit int 10
Source:
Returns:

A promise that return a list of Repository object if resolved, otherwise throw an ChinoException object if rejected or was not retrieved a success status

Type
Promise.<Array, objects.ChinoException>

update(repositoryId, data) → {Promise.<objects.Repository, objects.ChinoException>}

Update information about repository selected by its id with data as new repository information

Parameters:
Name Type Description
repositoryId string
data object
Source:
Returns:

A promise that return a Repository object if resolved, otherwise throw an ChinoException object if rejected or was not retrieved a success status

Type
Promise.<objects.Repository, objects.ChinoException>