Skip to content

Commit

Permalink
Merge pull request #16 from Looskie/master
Browse files Browse the repository at this point in the history
Fix: Types for CurrentResponse
  • Loading branch information
shimphillip committed Jul 21, 2021
2 parents 11e1183 + 5edc3ff commit da4d85b
Show file tree
Hide file tree
Showing 4 changed files with 55 additions and 45 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
#### 1.2.9 (2021-07-17)

- Updated types with CurrentResponse

#### 1.2.8 (2021-07-16)

- Fix bug where it returns the forecast of the geocoords instead of the actual weather.
Expand Down
8 changes: 5 additions & 3 deletions dist/types/CurrentReponse.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,13 @@ declare const data: {
base: string;
main: {
temp: number;
pressure: number;
humidity: number;
feels_like: number;
temp_min: number;
temp_max: number;
pressure: number;
humidity: number;
};
visibility: number;
wind: {
speed: number;
deg: number;
Expand All @@ -28,11 +30,11 @@ declare const data: {
sys: {
type: number;
id: number;
message: number;
country: string;
sunrise: number;
sunset: number;
};
timezone: number;
id: number;
name: string;
cod: number;
Expand Down
44 changes: 23 additions & 21 deletions dist/types/CurrentReponse.js
Original file line number Diff line number Diff line change
@@ -1,44 +1,46 @@
"use strict";
// 20200516233806
// https://samples.openweathermap.org/data/2.5/weather?q=London,uk&appid=439d4b804bc8187953eb36d2a8c26a02
// https://openweathermap.org/data/2.5/weather?q=London,uk&appid=439d4b804bc8187953eb36d2a8c26a02
Object.defineProperty(exports, "__esModule", { value: true });
var data = {
coord: {
lon: -0.13,
lat: 51.51
lon: -0.1257,
lat: 51.5085
},
weather: [
{
id: 300,
main: 'Drizzle',
description: 'light intensity drizzle',
icon: '09d'
id: 800,
main: 'Clear',
description: 'clear sky',
icon: '01d'
}
],
base: 'stations',
main: {
temp: 280.32,
pressure: 1012,
humidity: 81,
temp_min: 279.15,
temp_max: 281.15
temp: 23.6,
feels_like: 23.69,
temp_min: 18.92,
temp_max: 25.98,
pressure: 1028,
humidity: 64
},
visibility: 10000,
wind: {
speed: 4.1,
deg: 80
speed: 4.12,
deg: 100
},
clouds: {
all: 90
all: 0
},
dt: 1485789600,
dt: 1626552114,
sys: {
type: 1,
id: 5091,
message: 0.0103,
type: 2,
id: 268730,
country: 'GB',
sunrise: 1485762037,
sunset: 1485794875
sunrise: 1626494599,
sunset: 1626552575
},
timezone: 3600,
id: 2643743,
name: 'London',
cod: 200
Expand Down
44 changes: 23 additions & 21 deletions src/types/CurrentReponse.ts
Original file line number Diff line number Diff line change
@@ -1,43 +1,45 @@
// 20200516233806
// https://samples.openweathermap.org/data/2.5/weather?q=London,uk&appid=439d4b804bc8187953eb36d2a8c26a02
// https://openweathermap.org/data/2.5/weather?q=London,uk&appid=439d4b804bc8187953eb36d2a8c26a02

const data = {
coord: {
lon: -0.13,
lat: 51.51
lon: -0.1257,
lat: 51.5085
},
weather: [
{
id: 300,
main: 'Drizzle',
description: 'light intensity drizzle',
icon: '09d'
id: 800,
main: 'Clear',
description: 'clear sky',
icon: '01d'
}
],
base: 'stations',
main: {
temp: 280.32,
pressure: 1012,
humidity: 81,
temp_min: 279.15,
temp_max: 281.15
temp: 23.6,
feels_like: 23.69,
temp_min: 18.92,
temp_max: 25.98,
pressure: 1028,
humidity: 64
},
visibility: 10000,
wind: {
speed: 4.1,
deg: 80
speed: 4.12,
deg: 100
},
clouds: {
all: 90
all: 0
},
dt: 1485789600,
dt: 1626552114,
sys: {
type: 1,
id: 5091,
message: 0.0103,
type: 2,
id: 268730,
country: 'GB',
sunrise: 1485762037,
sunset: 1485794875
sunrise: 1626494599,
sunset: 1626552575
},
timezone: 3600,
id: 2643743,
name: 'London',
cod: 200
Expand Down

0 comments on commit da4d85b

Please sign in to comment.