Skip to content

Commit 8f7c11c

Browse files
committed
Remove gfs_0p25 from endpoints
1 parent 5af4977 commit 8f7c11c

File tree

4 files changed

+16
-22
lines changed

4 files changed

+16
-22
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "blueskyapi"
3-
version = "0.1.0"
3+
version = "0.1.1"
44
description = "Client for blueskyapi.io"
55
authors = ["blueskyapi.io <contact@blueskyapi.io>"]
66
license = "MIT"

src/blueskyapi/client.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ def latest_forecast(
7979
:param columns: Which variables to fetch (see `this page for available variables <https://blueskyapi.io/docs/data>`_).
8080
"""
8181
response = self._get(
82-
"/forecasts/gfs_0p25/latest",
82+
"/forecasts/latest",
8383
params=dict(
8484
lat=lat,
8585
lon=lon,
@@ -110,7 +110,7 @@ def forecast_history(
110110
:param columns: Which variables to fetch (see `this page for available variables <https://blueskyapi.io/docs/data>`_).
111111
"""
112112
response = self._get(
113-
"/forecasts/gfs_0p25/history",
113+
"/forecasts/history",
114114
params=dict(
115115
lat=lat,
116116
lon=lon,

tests/blueskyapi/client_test.py

Lines changed: 12 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -54,16 +54,14 @@ def describe_with_api_key():
5454
@responses.activate
5555
def when_valid():
5656
client = blueskyapi.Client(api_key="the-key")
57-
add_api_response(
58-
"/forecasts/gfs_0p25/latest?lat=53.5&lon=13.5", api_key="the-key"
59-
)
57+
add_api_response("/forecasts/latest?lat=53.5&lon=13.5", api_key="the-key")
6058
client.latest_forecast(53.5, 13.5)
6159

6260
@responses.activate
6361
def when_invalid():
6462
client = blueskyapi.Client(api_key="the-key")
6563
add_api_response(
66-
"/forecasts/gfs_0p25/latest?lat=53.5&lon=13.5",
64+
"/forecasts/latest?lat=53.5&lon=13.5",
6765
api_key="the-key",
6866
result={"detail": "Invalid API key"},
6967
status=401,
@@ -75,21 +73,21 @@ def when_invalid():
7573
def describe_latest_forecast():
7674
@responses.activate
7775
def test_defaults(client):
78-
add_api_response("/forecasts/gfs_0p25/latest?lat=53.5&lon=13.5")
76+
add_api_response("/forecasts/latest?lat=53.5&lon=13.5")
7977
client.latest_forecast(53.5, 13.5)
8078

8179
def describe_forecast_distances():
8280
@responses.activate
8381
def with_array(client):
8482
add_api_response(
85-
"/forecasts/gfs_0p25/latest?lat=53.5&lon=13.5&forecast_distances=0,24"
83+
"/forecasts/latest?lat=53.5&lon=13.5&forecast_distances=0,24"
8684
)
8785
client.latest_forecast(53.5, 13.5, forecast_distances=[0, 24])
8886

8987
@responses.activate
9088
def with_string(client):
9189
add_api_response(
92-
"/forecasts/gfs_0p25/latest?lat=53.5&lon=13.5&forecast_distances=0,24"
90+
"/forecasts/latest?lat=53.5&lon=13.5&forecast_distances=0,24"
9391
)
9492
client.latest_forecast(53.5, 13.5, forecast_distances="0,24")
9593

@@ -101,16 +99,12 @@ def with_invalid_value(client):
10199
def describe_columns():
102100
@responses.activate
103101
def with_array(client):
104-
add_api_response(
105-
"/forecasts/gfs_0p25/latest?lat=53.5&lon=13.5&columns=col_a,col_b"
106-
)
102+
add_api_response("/forecasts/latest?lat=53.5&lon=13.5&columns=col_a,col_b")
107103
client.latest_forecast(53.5, 13.5, columns=["col_a", "col_b"])
108104

109105
@responses.activate
110106
def with_string(client):
111-
add_api_response(
112-
"/forecasts/gfs_0p25/latest?lat=53.5&lon=13.5&columns=col_a,col_b"
113-
)
107+
add_api_response("/forecasts/latest?lat=53.5&lon=13.5&columns=col_a,col_b")
114108
client.latest_forecast(53.5, 13.5, columns="col_a,col_b")
115109

116110
@responses.activate
@@ -121,7 +115,7 @@ def with_invalid_value(client):
121115
@responses.activate
122116
def test_over_rate_limit(client):
123117
add_api_response(
124-
"/forecasts/gfs_0p25/latest?lat=53.5&lon=13.5",
118+
"/forecasts/latest?lat=53.5&lon=13.5",
125119
result={"the": "error"},
126120
status=429,
127121
)
@@ -131,7 +125,7 @@ def test_over_rate_limit(client):
131125
@responses.activate
132126
def test_result(client):
133127
add_api_response(
134-
"/forecasts/gfs_0p25/latest?lat=53.5&lon=13.5",
128+
"/forecasts/latest?lat=53.5&lon=13.5",
135129
result=[{"forecast_moment": "2021-12-27T18:00:00Z", "some_column": 5}],
136130
)
137131
result = client.latest_forecast(53.5, 13.5)
@@ -165,7 +159,7 @@ def describe_min_forecast_moments():
165159
@responses.activate
166160
def with_datetime(client):
167161
add_api_response(
168-
"/forecasts/gfs_0p25/history"
162+
"/forecasts/history"
169163
"?lat=53.5&lon=13.5"
170164
"&min_forecast_moment=2021-12-27T18:00:00"
171165
"&max_forecast_moment=2021-12-28T00:00:00"
@@ -180,7 +174,7 @@ def with_datetime(client):
180174
@responses.activate
181175
def with_string(client):
182176
add_api_response(
183-
"/forecasts/gfs_0p25/history"
177+
"/forecasts/history"
184178
"?lat=53.5&lon=13.5"
185179
"&min_forecast_moment=2021-12-27T18:00:00"
186180
"&max_forecast_moment=2021-12-28T00:00:00"
@@ -201,7 +195,7 @@ def describe_max_forecast_moments():
201195
@responses.activate
202196
def with_none(client):
203197
add_api_response(
204-
"/forecasts/gfs_0p25/history"
198+
"/forecasts/history"
205199
"?lat=53.5&lon=13.5"
206200
"&min_forecast_moment=2021-12-27T18:00:00"
207201
)

tests/cassettes/describe_latest_forecast/test_integration.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ interactions:
1111
User-Agent:
1212
- python-requests/2.26.0
1313
method: GET
14-
uri: https://api.blueskyapi.io/forecasts/gfs_0p25/latest?lat=53.5&lon=13.5
14+
uri: https://api.blueskyapi.io/forecasts/latest?lat=53.5&lon=13.5
1515
response:
1616
body:
1717
string: !!binary |

0 commit comments

Comments
 (0)