Manual Reference Source
import Service from 'gsf-js-client-sdk/dist/Service.js'
public class | source

Service

The Service class is used to inspect and create tasks for a service.

Constructor Summary

Public Constructor
public

constructor(client: Client, serviceName: string)

Member Summary

Public Members
public

The service name.

Private Members
private

_client: *

Method Summary

Public Methods
public

info(): Promise<ServiceInfo, error>

Retrieves the service information.

public

task(taskName: string): Task

Returns a task object.

public

Retrieves the array of task info objects available on the service.

version 1.1.0
public

tasks(): Promise<Task[], error>

Retrieves the array of task objects available on the service.

Public Constructors

public constructor(client: Client, serviceName: string) source

Params:

NameTypeAttributeDescription
client Client

The GSF client object.

serviceName string

The name of the service.

Public Members

public name: string source

The service name.

Private Members

private _client: * source

Public Methods

public info(): Promise<ServiceInfo, error> source

Retrieves the service information.

Return:

Promise<ServiceInfo, error>

Returns a Promise to the ServiceInfo object.

public task(taskName: string): Task source

Returns a task object.

Params:

NameTypeAttributeDescription
taskName string

The name of the task.

Return:

Task

Returns the task object.

public taskInfoList(): Promise<TaskInfo[], error> version 1.1.0 source

Retrieves the array of task info objects available on the service.

Return:

Promise<TaskInfo[], error>

Returns a Promise to an array of TaskInfo objects.

public tasks(): Promise<Task[], error> source

Retrieves the array of task objects available on the service.

Return:

Promise<Task[], error>

Returns a Promise to an array of Task objects.