> For the complete documentation index, see [llms.txt](https://docs.notkuubik.dev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.notkuubik.dev/radio-info/integration.md).

# ⚙️ Integration

Exports to make it easier to integrate with your existing systems

## **Server exports**

### **`GetChannelsWithDefaultDescription`**

**Description:** Retrieves all channels that are with their default descriptions for a specified job.

**Parameters:**

* `job` (string): The job identifier.

**Returns:**

* A table containing all channels that have their default descriptions for the specified job.

**Usage:**

```lua
local job = 'police'
local channels = exports.kub_radioinfo:GetChannelsWithDefaultDescription(job)
if channels then
        for _, channel in ipairs(channels) do
            print('Channel:', channel)
        end
end
```

### **`GetChannelDescription`**

**Description:** Retrieves the description of a specified channel for a specified job.

**Parameters:**

* `channel` (number): The channel number.
* `job` (string): The job identifier.

**Returns:**

* The description of the specified channel for the specified job, or an `error` if the channel is not a number or the job is not provided.

**Usage:**

```lua
local description = exports.kub_radioinfo:GetChannelDescription(1, 'police')
if description then
    print('Channel Description:', description)
end
```

### **`GetChannelDefaultDescription`**

**Description:** Retrieves the default description of a specified channel for a specified job.

**Parameters:**

* `channel` (number): The channel number.
* `job` (string): The job identifier.

**Returns:**

* The default description of the specified channel for the specified job, or an `error` if the channel is not a number or the job is not provided.

**Usage:**

```lua
local defaultDescription = exports.kub_radioinfo:GetChannelDefaultDescription(1, 'police')
if defaultDescription then
    print('Default Channel Description:', defaultDescription)
end
```

### **`IsChannelDescriptionDefault`**

**Description:** Checks if the description of a specified channel for a specified job is the default description.

**Parameters:**

* `channel` (number): The channel number.
* `job` (string): The job identifier.

**Returns:**

* `true` if the channel description is the default description, `false` otherwise, or an `error` if the channel is not a number or the job is not provided.

**Usage:**

```lua
local isDefault = exports.kub_radioinfo:IsChannelDescriptionDefault(1, 'police')
print('Is Default Description:', isDefault)
```

### **`SetChannelDescription`**

**Description:** Sets the description of a specified channel.

**Parameters:**

* `channel` (number): The channel number.
* `channelDescription` (string): The new description for the channel.

**Returns:**

* `true` if the description was successfully set, or an `error` if the channel is not a number or the channel description is not provided.

**Usage:**

```lua
local success = exports.kub_radioinfo:SetChannelDescription(1, 'New Description')
print('Description Set:', success)
```
