module Freeclimb

#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.

The version of the OpenAPI document: 1.0.0

Generated by: openapi-generator.tech OpenAPI Generator version: 4.3.0-SNAPSHOT

#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.

The version of the OpenAPI document: 1.0.0

Generated by: openapi-generator.tech OpenAPI Generator version: 4.3.0-SNAPSHOT

#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.

The version of the OpenAPI document: 1.0.0

Generated by: openapi-generator.tech OpenAPI Generator version: 4.3.0-SNAPSHOT

Constants

VERSION

Public Class Methods

configure() { |default| ... } click to toggle source

Customize default settings for the SDK using block.

Freeclimb.configure do |config|
  config.username = "xxx"
  config.password = "xxx"
end

If no block given, return the default Configuration object.

# File lib/freeclimb.rb, line 136
def configure
  if block_given?
    yield(Configuration.default)
  else
    Configuration.default
  end
end
percl_list_to_hash(percl_list) click to toggle source
# File lib/freeclimb.rb, line 145
def self.percl_list_to_hash(percl_list)
  percl_list_hash = []
  percl_list.each_with_index do | command, index |
    class_name = command.class.name.split('::').last
    percl_hash = Hash.new
    if command.respond_to?(:prompts) && command.prompts != nil && command.prompts.any?
      percl_hash[class_name] = to_hash_with_prompts(command)
    else
      percl_hash[class_name] = command.to_hash
    end
    percl_list_hash.push(percl_hash)
  end
  percl_list_hash
end
percl_to_json(percl_script) click to toggle source
# File lib/freeclimb.rb, line 168
def self.percl_to_json(percl_script)
  percl_list_to_hash(percl_script.commands).to_json
end
to_hash_with_prompts(command) click to toggle source
# File lib/freeclimb.rb, line 160
def self.to_hash_with_prompts(command)
  prompts_hash = percl_list_to_hash(command.prompts)
  command.prompts = nil
  hash = command.to_hash
  hash[:prompts] = prompts_hash
  hash
end