Skip to content

An (unofficial!) wrapper around the kachelmannwetter.com API.

Notifications You must be signed in to change notification settings

maxboettinger/kachelmann-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

kachelmann-api

Version Downloads/week License

An (unofficial!) wrapper around the kachelmannwetter.com API.

⚠️ Please be aware that you'll need an paid API Key in order to make any requests. Also, depending on your subscription, some endpoints might not work.

📚 Detailed information about the API can be found in the official Documentation.

Installation

npm install kachelmann-api

Usage

Import the module and initialize a new KachelmannAPI instance with your API-Key.

import KachelmannAPI from "kachelmann-api";

const API = new KachelmannAPI("YOUR_API_KEY");

Endpoints:

With your authenticated KachelmannAPI instance, you can make these requests.

As described above, some endpoints might not be implemented in this module yet, check their official Documentation for more information.

.getCurrentWeather()

Used to access the current weather for a given location. Expects argument of type ReqParameters.

const data = await API.getCurrentWeather({
  lat: "50.123",
  lon: "10.123",
  units: "metric",
});

Response: View in official Documentation

.get3DayForecast()

Used to access the current weather for a given location. Expects argument of type ReqParameters.

const data = await API.get3DayForecast({
  lat: "50.123",
  lon: "10.123",
  units: "metric",
});

Response: View in official Documentation

.get14DayTrend()

Used to access the current weather for a given location. Expects argument of type ReqParameters.

const data = await API.get14DayTrend({
  lat: "50.123",
  lon: "10.123",
  units: "metric",
});

Response: View in official Documentation

.getWeatherSymbol()

Used to access the current weather for a given location. Expects argument of type ReqParameters.

const data = await API.getWeatherSymbol("thunderstorm");

Response: View in official Documentation

Types:

ReqParameters

type ReqParameters = {
  lat: string; // latitude
  lon: string; // longitude
  units: string; // metric OR imperial
};

To-Do

  • Implement Standard Parameters and Advanced Parameters endpoints

Contribute

Feel free to open Pull Requests or Issues to fix bugs or propose new features.

About

An (unofficial!) wrapper around the kachelmannwetter.com API.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published