Home Reference Source
import ClientUtil from 'chris-utils'
public class | source

ClientUtil

An instance of this class represents Client utility service

Static Method Summary

Static Public Methods
public static

async createService(url: String, userName: String, password: String): Promise<ClientUtil>

Create a service object of this class

Constructor Summary

Public Constructor
public

constructor(chrisClient: Client)

Constructor

Member Summary

Public Members
public

Method Summary

Public Methods
public

async createDownloadFeed(feedId: number, newFeedName: string): Promise<Feed>

Create a downloading feed given an existing feed id

public

async createUploadFeed(files: Array, feedName: String): Promise<Feed>

Create a new Feed with the given files

public

getClient(): Client

Get an instance of Chris Client

Static Public Methods

public static async createService(url: String, userName: String, password: String): Promise<ClientUtil> source

Create a service object of this class

Params:

NameTypeAttributeDescription
url String

CUBE's url

userName String

User's username in CUBE

password String

User's password

Return:

Promise<ClientUtil>

JS Promise, resolves to an object of this class

Public Constructors

public constructor(chrisClient: Client) source

Constructor

Params:

NameTypeAttributeDescription
chrisClient Client

A Chris Client Object

Public Members

public chrisClient: * source

Public Methods

public async createDownloadFeed(feedId: number, newFeedName: string): Promise<Feed> source

Create a downloading feed given an existing feed id

Params:

NameTypeAttributeDescription
feedId number
newFeedName string

Return:

Promise<Feed>

JS Promise, resolves to a Feed object

public async createUploadFeed(files: Array, feedName: String): Promise<Feed> source

Create a new Feed with the given files

Params:

NameTypeAttributeDescription
files Array

An array of files object

feedName String

name of the 'pl-dircopy' instance in CUBE

Return:

Promise<Feed>

JS Promise, resolves to a Feed object

public getClient(): Client source

Get an instance of Chris Client

Return:

Client

A ChRIS client object