Sign Up

What is a Class?

A class in the API serves as a structured entity that holds both variables and functions. These functions are used in both endpoints and events to define specific functionalities.

Variable

A variable within the API is represented by a symbolic name or identifier, acting as a storage location in the API's memory. It allows for the storage and manipulation of data values that are referenced and utilized throughout the program's execution.

Variables can be assigned initial values, modified during the API's runtime, and their values can be read or updated at various points within the program. They play a vital role in managing temporary or permanent data required for calculations, decision-making, and other operations performed by the API.

Variables possess distinct scopes, implying that they can be employed at varying levels. For further information on this topic, consider reading more here.

Function

A function within the API is a self-contained block of code designed to execute a specific task or set of tasks. Functions can take input parameters (arguments) and return a result (output) upon execution. When a function is called or invoked, the statements inside it are executed, allowing for calculations, data manipulation, or other necessary operations.

Functions facilitate the division of large programs into smaller, more manageable units, contributing to a well-organized and maintainable class structure.

Statement

A statement represents a single line of functionality or a group of lines that constitutes a complete instruction or action to be executed by the API. Each statement corresponds to a specific action that the API must perform during function execution.

Statements can be as simple as assigning a value to a variable, conducting arithmetic calculations, or displaying output to users. They can also encompass more complex tasks such as conditional decision-making, looping actions, or invoking other functions to perform specific operations.

Statements are essential building blocks that define the logic and flow of the API, enabling the creation of diverse functionalities within the program.

Import Classes

In the current class, you have the option to import your own classes and utilize functions that were created earlier. This helps minimize the requirement for duplicate classes. Once a class is imported, you can access all of its functions by using the "Run function" statement or via a "Function Result".

Testing

To ensure the proper functioning of your functions, it is essential to create tests that validate their output and ensure the reliability of your classes.

Read more about creating tests for your class

Related Topics

Testing

To ensure the proper functioning of your functions, it is essential to create tests that validate their output and ensure the reliability of your classes. To create tests, switch your class to test mode by clicking the "Tests" button in the bottom toolbar. This will display an alternate workspace de...

Import Classes

In the current class, you have the option to import your own classes and utilize functions that were created earlier. This helps minimize the requirement for duplicate classes. Once a class is imported, you can access all of its functions by using the "Run function" statement.

Statements

In a function, various types of statements can be created to perform specific actions and control the flow of execution: Create Variable: Generates a new variable, which can be initialized from scratch, reference an existing variable or parameter, the result of a function, retrieve data from the dat...

Variables

A variable encompasses various data types, including: Text: A string of characters Number: Ranging between -2147483648 and 2147483647 Boolean: Representing true or false Currency: Similar to Number but specific to prices Email: Similar to Text but designed for email addresses Date: A representation ...

Variable Scopes

Global Variables: Accessible from any part of the workspace, including Endpoints and Events. Class Variables: Accessible from any function within the class they belong to, only available in Normal Mode. Test Variables: Accessible from any function within the class they belong to, only available in T...