Service to handle domain-related operations, such as retrieving and processing domains for connection.
GetDomains
This service provides a method to retrieve and process domains by connecting IPs that are not currently present in the room.
getDomains
The options for retrieving and connecting domains.
The list of domains to process.
An object mapping primary domains to alternative domains.
The API username for authentication.
The API key for authentication.
The API token for authentication.
Additional parameters for the operation.
The list of IP addresses already connected in the room.
A function to get updated parameters.
A function to connect IPs that are not currently present.
A promise that resolves when the operation is complete.
Throws an error if the domain retrieval or connection fails.
const options = { domains: ['example.com', 'example.org'], alt_domains: { 'example.com': 'alt-example.com' }, apiUserName: 'user123', apiKey: 'key123', apiToken: 'token123', parameters: { roomRecvIPs: ['192.168.1.1'], getUpdatedAllParams: () => updatedParameters, connectIps: connectIpsFunction, }};getDomainsService.getDomains(options); Copy
const options = { domains: ['example.com', 'example.org'], alt_domains: { 'example.com': 'alt-example.com' }, apiUserName: 'user123', apiKey: 'key123', apiToken: 'token123', parameters: { roomRecvIPs: ['192.168.1.1'], getUpdatedAllParams: () => updatedParameters, connectIps: connectIpsFunction, }};getDomainsService.getDomains(options);
Service to handle domain-related operations, such as retrieving and processing domains for connection.
Name
GetDomains
Description
This service provides a method to retrieve and process domains by connecting IPs that are not currently present in the room.
Method
getDomains
Async
Param: options
The options for retrieving and connecting domains.
Param: options.domains
The list of domains to process.
Param: options.alt_domains
An object mapping primary domains to alternative domains.
Param: options.apiUserName
The API username for authentication.
Param: options.apiKey
The API key for authentication.
Param: options.apiToken
The API token for authentication.
Param: options.parameters
Additional parameters for the operation.
Param: options.parameters.roomRecvIPs
The list of IP addresses already connected in the room.
Param: options.parameters.getUpdatedAllParams
A function to get updated parameters.
Param: options.parameters.connectIps
A function to connect IPs that are not currently present.
Returns
A promise that resolves when the operation is complete.
Throws
Throws an error if the domain retrieval or connection fails.
Example