Skip to content

@appleparan/kma-mcp-server


@appleparan/kma-mcp-server / clients/nk / NKClient

Class: NKClient

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

Extends

Constructors

Constructor

new NKClient(config): NKClient

Defined in: src/clients/nk.ts:20

Parameters

config

KMAClientConfig

Returns

NKClient

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\<NKObservation[]>

Defined in: src/clients/nk.ts:62

Get daily North Korea meteorological 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\<NKObservation[]>


getDailyPeriod()

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

Defined in: src/clients/nk.ts:76

Get daily North Korea meteorological 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\<NKObservation[]>


getHourlyData()

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

Defined in: src/clients/nk.ts:29

Get hourly North Korea meteorological 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\<NKObservation[]>


getHourlyPeriod()

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

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

Get hourly North Korea meteorological 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\<NKObservation[]>


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