Skip to content

@appleparan/kma-mcp-server


@appleparan/kma-mcp-server / clients/snow / SnowClient

Class: SnowClient

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

Extends

Constructors

Constructor

new SnowClient(config): SnowClient

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

Parameters

config

KMAClientConfig

Returns

SnowClient

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

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

Get daily snow depth 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\<SnowObservation[]>


getDailyPeriod()

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

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

Get daily snow depth 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\<SnowObservation[]>


getHourlyData()

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

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

Get hourly snow depth 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\<SnowObservation[]>


getHourlyPeriod()

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

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

Get hourly snow depth 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\<SnowObservation[]>


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