Session.Desktop.Definition
Summary
This method returns a definition of the session. This definition holds all the parameters that define the session to be created. Once the session defined, a call to the getSession() method actually creates and returns the session. DesktopSessions are used to connect applications to the data platform via the Refinitiv Workspace desktop application.
Methods
Definition(appKey: string)
Allows you to create and define the session
Parameters:
Property | Is Optional | Default Value | Type | Description |
---|---|---|---|---|
appKey | No | - | string | appKey could be passed as a single parameter without DesktopSessionParams object creation in case the rest of optional parameters are omitted. |
Returned value: a new instance of SessionDefinition.
Definition(params: DesktopSessionParams)
Allows you to create and define the session
Parameters:
Property | Is Optional | Default Value | Type | Description |
---|---|---|---|---|
appKey | No | - | string | Refinitiv Workspace Application key necessary to authenticate the specific application with the session |
scope | Yes | trapi | - | string |
port | Yes | 9000 | - | number |
Returned value: a new instance of SessionDefinition.
Example of usage
import { Session } from '@refinitiv-data/data';
const desktopSession: Session = Session.Desktop.Definition('appKey').getSession();
await desktopSession.open();