Skip to content

@appleparan/kma-mcp-server


@appleparan/kma-mcp-server / clients/uv / UVClient

Class: UVClient

Defined in: src/clients/uv.ts:15

Extends

Constructors

Constructor

new UVClient(config): UVClient

Defined in: src/clients/uv.ts:16

Parameters

config

KMAClientConfig

Returns

UVClient

Overrides

BaseKMAClient.constructor

Properties

authKey

protected authKey: string

Defined in: src/clients/base.ts:43

Inherited from

BaseKMAClient.authKey


client

protected client: AxiosInstance

Defined in: src/clients/base.ts:42

Inherited from

BaseKMAClient.client

Methods

formatDateTime()

protected formatDateTime(date, includeTime): string

Defined in: src/clients/base.ts:96

Format datetime to KMA API format (YYYYMMDDHHmm or YYYYMMDD)

Parameters

date

Date

includeTime

boolean = true

Returns

string

Inherited from

BaseKMAClient.formatDateTime


getDailyData()

getDailyData(tm, stn): Promise\<UVObservation[]>

Defined in: src/clients/uv.ts:58

Get daily UV observation data for a single day

Parameters

tm

Date in YYYYMMDD format or Date object

string | Date

stn

Station ID (0 for all stations)

string | number

Returns

Promise\<UVObservation[]>


getDailyPeriod()

getDailyPeriod(tm1, tm2, stn): Promise\<UVObservation[]>

Defined in: src/clients/uv.ts:72

Get daily UV observation data for a date range

Parameters

tm1

Start date in YYYYMMDD format or Date object

string | Date

tm2

End date in YYYYMMDD format or Date object

string | Date

stn

Station ID (0 for all stations)

string | number

Returns

Promise\<UVObservation[]>


getHourlyData()

getHourlyData(tm, stn): Promise\<UVObservation[]>

Defined in: src/clients/uv.ts:25

Get hourly UV observation data for a single time

Parameters

tm

Time in YYYYMMDDHHmm format or Date object

string | Date

stn

Station ID (0 for all stations)

string | number

Returns

Promise\<UVObservation[]>


getHourlyPeriod()

getHourlyPeriod(tm1, tm2, stn): Promise\<UVObservation[]>

Defined in: src/clients/uv.ts:39

Get hourly UV observation data for a time period

Parameters

tm1

Start time in YYYYMMDDHHmm format or Date object

string | Date

tm2

End time in YYYYMMDDHHmm format or Date object

string | Date

stn

Station ID (0 for all stations)

string | number

Returns

Promise\<UVObservation[]>


makeRequest()

protected makeRequest\<T>(endpoint, params): Promise\<T[]>

Defined in: src/clients/base.ts:56

Type Parameters

T

T = unknown

Parameters

endpoint

string

params

Record\<string, unknown>

Returns

Promise\<T[]>

Inherited from

BaseKMAClient.makeRequest