Files
api/services/nginx/app/modules/bird/bird_c.php
T
Jeppe Bundgaard 5a59562e35 Add Bird API integration with voice call and flash call support
- Implement Bird API client (`bird.php`) for handling HTTP requests to Bird services.
- Add routes for voice and flash call management (`birdVoiceFlashCallsRoute.php`, `birdNumbersRoute.php`).
- Introduce test cases for voice calls, flash calls, and numbers (`VoiceCallsApiTest.php`, `NumbersAndFlashCallsApiTest.php`).
- Include configuration management classes and APIs for enabling the Bird module and managing API keys (`bird_c.php`).
- Provide OpenAPI specifications for flash call endpoints (`bird-flash-calls.md`).
2026-02-19 12:19:36 +01:00

50 lines
1.2 KiB
PHP

<?php
namespace bird;
require_once WD . '/traits/module_config_t.php';
require_once WD . '/modules/bird/config/bird_enabled_c.php';
require_once WD . '/modules/bird/config/bird_api_key_c.php';
require_once WD . '/modules/bird/config/bird_server_url_c.php';
use bird\config\bird_enabled_c;
use bird\config\bird_api_key_c;
use bird\config\bird_server_url_c;
use traits\module_config_t;
class bird_c
{
use module_config_t;
/**
* Whether the Bird module is enabled
* @var bird_enabled_c
*/
public bird_enabled_c $enabled;
/**
* API key/token for Bird API (secret)
* @var bird_api_key_c
*/
public bird_api_key_c $api_key;
/**
* Base server URL for Bird API
* @var bird_server_url_c
*/
public bird_server_url_c $server_url;
public function __construct()
{
$this->setupConfig('bird');
$this->allowUpdate([
bird_enabled_c::class,
bird_api_key_c::class,
bird_server_url_c::class,
]);
$this->enabled = new bird_enabled_c();
$this->api_key = new bird_api_key_c();
$this->server_url = new bird_server_url_c();
}
}