Options
All
  • Public
  • Public/Protected
  • All
Menu

Class KiiServerCodeEntry

Hierarchy

  • KiiServerCodeEntry

Index

Methods

  • Execute this server code entry.
    If argument is an empty object or not type of Object, callbacks.failure or reject callback of promise will be called.

    example
    // Instantiate with the endpoint.
    let entry = Kii.serverCodeEntry("main");

    // Set the custom parameters.
    let arg = {"username":"name_of_my_friend", "password":"password_for_my_friend"};

    // Example of executing the Server Code
    entry.execute(arg).then(params => {
    let entry = params[0];
    let argument = params[1];
    let execResult = params[2];
    // do something
    }).catch(error => {
    // do something with the error response
    });

    Parameters

    • argument: any

      pass to the entry of script in the cloud. If null is specified, no argument pass to the script.

    Returns Promise<[KiiServerCodeEntry, any, KiiServerCodeExecResult]>

    return promise object.

    • fulfill callback function: function(params). params is Array instance.
      • params[0] is the KiiServerCodeEntry instance which this method was called on.
      • params[1] is the passed argument object.
      • params[2] is a KiiServerCodeExecResult instance.
    • reject callback function: function(error). error is an Error instance.
      • error.target is the KiiServerCodeEntry instance which this method was called on.
      • error.message
      • error.argument is passed argument object.

  • getEntryName(): string

Generated using TypeDoc