Skip to content

@appleparan/kma-mcp-server


@appleparan/kma-mcp-server / clients/climate / ClimateClient

Class: ClimateClient

Defined in: src/clients/climate.ts:18

Extends

Constructors

Constructor

new ClimateClient(config): ClimateClient

Defined in: src/clients/climate.ts:19

Parameters

config

KMAClientConfig

Returns

ClimateClient

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


getAnnualNormals()

getAnnualNormals(stn): Promise\<ClimateNormal[]>

Defined in: src/clients/climate.ts:94

Get annual climate normal values

Parameters

stn

Station ID (0 for all stations)

string | number

Returns

Promise\<ClimateNormal[]>


getDailyNormals()

getDailyNormals(startMonth, startDay, endMonth, endDay, stn): Promise\<ClimateNormal[]>

Defined in: src/clients/climate.ts:31

Get daily climate normal values for a date range

Parameters

startMonth

number

Start month (1-12)

startDay

number

Start day (1-31)

endMonth

number

End month (1-12)

endDay

number

End day (1-31)

stn

Station ID (0 for all stations)

string | number

Returns

Promise\<ClimateNormal[]>


getMonthlyNormals()

getMonthlyNormals(startMonth, endMonth, stn): Promise\<ClimateNormal[]>

Defined in: src/clients/climate.ts:78

Get monthly climate normal values

Parameters

startMonth

number

Start month (1-12)

endMonth

number

End month (1-12)

stn

Station ID (0 for all stations)

string | number

Returns

Promise\<ClimateNormal[]>


getNormalsByPeriod()

getNormalsByPeriod(periodType, startMonth?, startDay?, endMonth?, endDay?, stn?): Promise\<ClimateNormal[]>

Defined in: src/clients/climate.ts:109

Get climate normals with flexible period specification

Parameters

periodType

Type of period ('daily', 'tenday', 'monthly', 'annual')

"daily" | "tenday" | "monthly" | "annual"

startMonth?

number

Start month (required for daily, tenday, monthly)

startDay?

number

Start day (required for daily) or period (1-3 for tenday)

endMonth?

number

End month (required for daily, tenday, monthly)

endDay?

number

End day (required for daily) or period (1-3 for tenday)

stn?

Station ID (0 for all stations)

string | number

Returns

Promise\<ClimateNormal[]>


getTenDayNormals()

getTenDayNormals(startMonth, startPeriod, endMonth, endPeriod, stn): Promise\<ClimateNormal[]>

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

Get 10-day (dekad) climate normal values Each month is divided into three periods: 1 (1-10), 2 (11-20), 3 (21-end)

Parameters

startMonth

number

Start month (1-12)

startPeriod

number

Start period (1-3)

endMonth

number

End month (1-12)

endPeriod

number

End period (1-3)

stn

Station ID (0 for all stations)

string | number

Returns

Promise\<ClimateNormal[]>


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