Options
All
  • Public
  • Public/Protected
  • All
Menu

Index

Enumerations

Interfaces

Functions

Functions

newClient

  • Client api for ROMA connectors.

    example
    
    import * as roma from 'roma';
    
    // warn
    // When the script calls connector, if variable input parameters are used, the connector component may be missing when packaging
    
    let client = roma.newClient("romaAppName");
    let appId = "abc123456";
    let appKey = "base64example==";
    let resp = client.sendRest("romaAPIName", {"X-HW-ID": appId, "X-HW-APPKEY": appKey, "$body": {}});
    
    console.log(resp);
    
    let client2 = roma.newClient("romaAppID", roma.NameType.AppId);
    let appId2 = "abc123456";
    let appKey2 = "base64example==";
    let resp2 = client2.sendRestByURL("POST", "/testapi", {"X-HW-ID": appId, "X-HW-APPKEY": appKey, "$body": {}});
    
    

    Parameters

    • name: string

      ROMA connector instance name

    • Optional type: NameType

      ROMA connector instance name type

    Returns ROMAClient