Home Manual Reference Source
public class | source

OwnedResourceProxy

Extends:

SimpleResourceProxy → OwnedResourceProxy

Used for proxying resource => organisation

Constructor Summary

Public Constructor
public

constructor(api: Maps4News, parent: ResourceBase, Target: constructor)

OwnedResourceProxy Constructor

Method Summary

Public Methods
public

async attach(items: ResourceBase)

Attach items to the organisation

public

async attachAll()

Attach parent resource to all organisations

public

async detach(items: ResourceBase)

Detach items from the organisation

public

async detachAll()

Detach parent resource to all organisations

public

async sync(items: ResourceBase)

Sync items to the organisation

Inherited Summary

From class SimpleResourceProxy
public get

Target to wrap results in

public get

Get api instance

public get

Proxy target url

public

List target resource

public
this method was deprecated.

List target resource

public

Get the resource lister

public

Build a new instance of the target

Public Constructors

public constructor(api: Maps4News, parent: ResourceBase, Target: constructor) source

OwnedResourceProxy Constructor

Override:

SimpleResourceProxy#constructor

Params:

NameTypeAttributeDescription
api Maps4News

api instance

parent ResourceBase

parent instance

Target constructor

target constructor

Public Methods

public async attach(items: ResourceBase) source

Attach items to the organisation

Params:

NameTypeAttributeDescription
items ResourceBase

List of items to attach

Throw:

TypeError

ApiError

public async attachAll() source

Attach parent resource to all organisations

Throw:

ApiError

public async detach(items: ResourceBase) source

Detach items from the organisation

Params:

NameTypeAttributeDescription
items ResourceBase

List of items to unlink

Throw:

TypeError

ApiError

public async detachAll() source

Detach parent resource to all organisations

Throw:

ApiError

public async sync(items: ResourceBase) source

Sync items to the organisation

Params:

NameTypeAttributeDescription
items ResourceBase

List of items to sync

Throw:

TypeError

ApiError