@curium.rocks/openweathermap-client
Advanced tools
Comparing version 0.1.1-alpha.3 to 0.1.1-alpha.4
@@ -9,2 +9,3 @@ import { CityWeather } from "./models/cityWeather"; | ||
import { OwmClient } from "./owmClient"; | ||
export { CurrentRequest, CityWeather, CurrentWeatherApi, MultiCityResponse, PollutionApi, AirPollutionResponse, AirPollutionRequest, OwmClient }; | ||
import { OneCallApi } from "./oneCallApi"; | ||
export { CurrentRequest, CityWeather, CurrentWeatherApi, MultiCityResponse, PollutionApi, AirPollutionResponse, AirPollutionRequest, OwmClient, OneCallApi }; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.OwmClient = exports.PollutionApi = exports.CurrentWeatherApi = void 0; | ||
exports.OneCallApi = exports.OwmClient = exports.PollutionApi = exports.CurrentWeatherApi = void 0; | ||
var currentWeatherApi_1 = require("./currentWeatherApi"); | ||
@@ -10,2 +10,4 @@ Object.defineProperty(exports, "CurrentWeatherApi", { enumerable: true, get: function () { return currentWeatherApi_1.CurrentWeatherApi; } }); | ||
Object.defineProperty(exports, "OwmClient", { enumerable: true, get: function () { return owmClient_1.OwmClient; } }); | ||
var oneCallApi_1 = require("./oneCallApi"); | ||
Object.defineProperty(exports, "OneCallApi", { enumerable: true, get: function () { return oneCallApi_1.OneCallApi; } }); | ||
//# sourceMappingURL=lib.js.map |
import { AxiosInstance } from "axios"; | ||
import { PollutionApi } from "./pollutionApi"; | ||
import { CurrentWeatherApi } from "./currentWeatherApi"; | ||
import { OneCallApi } from "./oneCallApi"; | ||
/** | ||
@@ -11,2 +12,3 @@ * General OwmClient that contains all of the sub API clients | ||
readonly current: CurrentWeatherApi; | ||
readonly onecall: OneCallApi; | ||
/** | ||
@@ -13,0 +15,0 @@ * |
@@ -6,2 +6,3 @@ "use strict"; | ||
var currentWeatherApi_1 = require("./currentWeatherApi"); | ||
var oneCallApi_1 = require("./oneCallApi"); | ||
/** | ||
@@ -19,2 +20,3 @@ * General OwmClient that contains all of the sub API clients | ||
this.current = new currentWeatherApi_1.CurrentWeatherApi(httpClient); | ||
this.onecall = new oneCallApi_1.OneCallApi(httpClient); | ||
} | ||
@@ -21,0 +23,0 @@ return OwmClient; |
{ | ||
"name": "@curium.rocks/openweathermap-client", | ||
"version": "0.1.1-alpha.3", | ||
"version": "0.1.1-alpha.4", | ||
"description": "A typescript client for the OpenWeatherMap APIs", | ||
@@ -5,0 +5,0 @@ "main": "build/src/lib.js", |
# openweathermap-client | ||
A typescript OpenWeatherMap client | ||
A typescript OpenWeatherMap client, [API docs located here](https://openweathermap.org/api). | ||
## Example | ||
APIs supported. | ||
- OneCall | ||
- Pollution | ||
- CurrentWeather | ||
## Example(s) | ||
```typescript | ||
@@ -68,2 +73,9 @@ import axios from "axios"; | ||
console.log('The pollution levels for the past day: ', historicalPollution); | ||
const allInOne = await owmClient.onecall.getDate({ | ||
lat: 41.76106, | ||
lon: -85.94055, | ||
appid: apiToken | ||
}); | ||
console.log('The combined summary data is: ', allInOne); | ||
``` |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
42442
60
853
80