Bixby Developer Center

References

JavaScript API Reference

This section describes Bixby's JavaScript API available for implementing actions.

Caution

If you're using Version 2 of the JavaScript Runtime System, read the JavaScript Runtime Version 2 Guide for important information on how Version 1 JavaScript examples differ.

The following modules are not supported in Version 2:

  • dates
  • soap

Read Replacing the dates Module and Replacing the soap Module for guidance.

Using the Modules

To use the functions in a module with JavaScript Runtime Version 1, use the require statement to import them:

var http = require('http')
Caution

Earlier versions of the Bixby JavaScript API allowed you to call functions without explicitly importing them via require. This implicit import is being deprecated, and warnings will be emitted if you do not explicitly require modules.

In JavaScript Runtime Version 2, use the standard import command to import an API module:

import http from 'http'

Supported Modules

The API is organized into a set of Node.js-style modules.

  • base64
    Provides simple Base64 encoding and decoding.
  • config
    Provides access to a capsule's configuration.
  • console
    Provides logging methods for use in the Debug Console.
  • dates
    Provides date-time functions.
  • fail
    Provides a method for handling runtime exceptions.
  • http
    Provides helper methods for HTTP requests.
  • md5
    Provides an implementation of the MD5 message digest algorithm. (Warning: This module is being deprecated.)
  • secret
    Provides access to a capsule's secrets store.
  • soap
    Provides SOAP web services methods.
  • textLib
    Provides various text-related functions, especially related to fuzzy matching.
  • transaction
    Provides method to retrieve concepts from archive.
  • types
    Provides functions for typed value conversion.