# Type Alias WithRadarApi

Interface for accessing the Radar API from plugins.

This provides typed, in-process programmatic access to the Radar API, similar to WithHistoryApi for the History API.

#### Example

    // Check if Radar API is available
    if (app.getRadarApi) {
      const radarApi = await app.getRadarApi();
      const radars = await radarApi.getRadars();
      app.debug(`Found ${radars.length} radars`);
    }

type WithRadarApi = {
getRadarApi?: () => Promise<RadarApi>;
}

#### Hierarchy

- WithRadarApi
  - ServerAPI

- Defined in radarapi.ts:781

##### Index

### Properties

getRadarApi?

## Properties

### `Optional` getRadarApi

getRadarApi?: () => Promise<RadarApi>

Returns a promise for the active Radar API implementation, or rejects if unavailable. The property is optional to support older servers that do not have radar API support.

#### Type Declaration

- - (): Promise<RadarApi>

  - #### Returns Promise<RadarApi>

    Promise that resolves to a RadarApi instance if available, or rejects with an error if not.

- Defined in radarapi.ts:788