Home Reference Source
import {PluginMeta} from '@fnndsc/chrisstoreapi'
public class | source

PluginMeta

Extends:

ResourceItemResource → PluginMeta

Plugin meta item resource object representing a plugin meta.

Constructor Summary

Public Constructor
public

constructor(url: string, auth: Object)

Constructor

Method Summary

Public Methods
public

delete(timeout: number): Object

Make a DELETE request to delete this plugin meta item resource through the REST API.

public

getCollaborators(params: Object, timeout: number): Object

Fetch the list of plugin meta collaborators associated to this plugin meta.

public

getPlugins(params: Object, timeout: number): Object

Fetch a list of plugins associated to this plugin meta from the REST API.

public

put(data: Object, timeout: number): Object

Make a PUT request to modify this plugin meta item resource through the REST API.

Inherited Summary

From class Resource
public get

Return true if the resource object contains any data.

public
public
public
public
public

Make a deep copy clone of this object resource.

From class ItemResource
public get

Get the item's data object (REST API descriptors).

public
public

get(timeout: number): Object

Fetch this item resource from the REST API.

public

Get an array of parameter names that can be used as properties of the data object in PUT requests.

private

_delete(timeout: number): Object

Internal helper method to make a DELETE request to this item resource through the REST API.

private

_getResource(linkRelation: string, ResourceClass: Object, searchParams: Object, timeout: number): Object

Internal method to fetch a related resource from the REST API that is referenced by a link relation within the item object.

private

_put(data: Object, uploadFileObj: Object, timeout: number): Object

Internal helper method to make a PUT request to this item resource through the REST API.

Public Constructors

public constructor(url: string, auth: Object) source

Constructor

Override:

ItemResource#constructor

Params:

NameTypeAttributeDescription
url string

url of the resource

auth Object
  • optional
  • default: null

authentication object

auth.token string
  • optional

authentication token

Public Methods

public delete(timeout: number): Object source

Make a DELETE request to delete this plugin meta item resource through the REST API.

Params:

NameTypeAttributeDescription
timeout number
  • optional
  • default: 30000

request timeout

Return:

Object

JS Promise

public getCollaborators(params: Object, timeout: number): Object source

Fetch the list of plugin meta collaborators associated to this plugin meta.

Params:

NameTypeAttributeDescription
params Object
  • optional
  • default: null

page parameters object

params.limit number
  • optional

page limit

params.offset number
  • optional

page offset

timeout number
  • optional
  • default: 30000

request timeout

Return:

Object

JS Promise, resolves to a PluginCollaboratorList object

public getPlugins(params: Object, timeout: number): Object source

Fetch a list of plugins associated to this plugin meta from the REST API.

Params:

NameTypeAttributeDescription
params Object
  • optional
  • default: null

page parameters object

params.limit number
  • optional

page limit

params.offset number
  • optional

page offset

timeout number
  • optional
  • default: 30000

request timeout

Return:

Object

JS Promise, resolves to a PluginMetaPluginList object

public put(data: Object, timeout: number): Object source

Make a PUT request to modify this plugin meta item resource through the REST API.

Params:

NameTypeAttributeDescription
data Object

request JSON data object

data.public_repo string

public repo

data.new_owner string
  • optional

new additional owner for this plugin meta

timeout number
  • optional
  • default: 30000

request timeout

Return:

Object

JS Promise, resolves to this object