@freeclimb/sdk - the NodeJS client package for the FreeClimb API
FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request.
This SDK is automatically generated by the OpenAPI Generator project:
- API version: 1.0.0
- Package version:
- Build package: org.openapitools.codegen.languages.TypeScriptClientCodegen For more information, please visit https://www.freeclimb.com/support/
npm install @freeclimb/sdk@3.0.3
or
yarn add @freeclimb/sdk@3.0.3import freeclimb from '@freeclimb/sdk';
const configuration = freeclimb.createConfiguration({
accountId: 'YOUR_ACCOUND_ID',
apiKey: 'YOUR_API_KEY'
});
const apiInstance = new freeclimb.DefaultApi(configuration);
apiInstance.listApplications().then(applications => console.log('got applications', applications))For more details on how to use the individual methods on the sdk - go here
The Performance Command Language (PerCL) defines a set of instructions, written in JSON format, that express telephony actions to be performed in response to an event on the FreeClimb platform. FreeClimb communicates with the application server when events associated with the application occur, so the webserver can instruct FreeClimb how to handle such events using PerCL scripts. PerCL commands are a part of the model schema and can be serialized into JSON like so:
import { Say, Play, GetDigits, PerclScript } from '@freeclimb/sdk'
const say = new Say({ text: 'Hello, World' })
const play = new Play({ file: "Example File" })
const getDigits = new GetDigits({ actionUrl: "Example Action URL", prompts: [say, play] })
const perclScript = new PerclScript({ commands: [getDigits] })
console.log(perclScript.toJSON())