This section details the arguments used to initialize a Scoopika Endpoint.

Arguments

Takes one arguments passed as an object with the following properties:

scoopika
Scoopika
required

An instance of the Scoopika class you previously initialized.

Reference to Scoopika

agents
string[] | function

Whether an array of agent Ids or Async Function:

  • You can provide an array containing agent IDs as strings (e.g., ["AGENT_ID-1", "AGENT_ID-2"]).
  • Alternatively, you can use an asynchronous function that returns an array of Agent instances created using the Agent class (refer to the Agent documentation for details). This function allows for more dynamic agent setup logic if needed.
boxes
string[] | function

Whether an array of box Ids or Async Function:

  • You can provide an array containing box IDs as strings (e.g., ["BOX_ID-1", "BOX_ID-2"]).
  • Alternatively, you can use an asynchronous function that returns an array of Box instances created using the Box class (refer to the Box documentation for details). This function allows for more dynamic box setup logic if needed.
caching
boolean
default: true

Enables or disables caching of agent and box data within the endpoint. This caching improves performance by reducing the need to load data from the Scoopika platform on every API request. However, it does not cache actual agent responses.

caching_limit
number
default: 1000000

Sets the cache expiration time in milliseconds. After this duration, cached agent and box data will be reloaded from the Scoopika platform to ensure you have the latest information.