Skip to content

Commit 51152e7

Browse files
timmauriceTim Maurice Bayer
andauthored
fix: correct openingTimes field deserialization (#736) (#802)
Co-authored-by: Tim Maurice Bayer <tim.bayer@dia.cx>
1 parent dbf90d7 commit 51152e7

4 files changed

Lines changed: 5 additions & 5 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ This package allows you to fetch data from tankerkoenig.de.
2020
```bash
2121
pip install aiotankerkoenig
2222
```
23+
2324
## Usage
2425

2526
```python
@@ -40,7 +41,6 @@ if __name__ == "__main__":
4041
asyncio.run(main())
4142
```
4243

43-
4444
## Changelog & Releases
4545

4646
This repository keeps a change log using [GitHub's releases][releases]

aiotankerkoenig/models.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ class Station:
9696
)
9797
state: str | None = None
9898
opening_times: list[OpeningTime] | None = field(
99-
metadata=field_options(alias="opening_times"),
99+
metadata=field_options(alias="openingTimes"),
100100
default=None,
101101
)
102102
distance: float | None = field(metadata=field_options(alias="dist"), default=None)

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
2-
"name": "aioelectricitymaps",
2+
"name": "aiotankerkoenig",
33
"version": "0.0.0",
44
"private": true,
5-
"description": "Asynchronous Python client for Electricity Maps.",
5+
"description": "Asynchronous Python client for Tankerkoenig.de.",
66
"scripts": {
77
"prettier": "prettier --write **/*.{json,js,md,yml,yaml}"
88
},

tests/__snapshots__/test_aiotankerkoenig.ambr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,5 @@
1212
})
1313
# ---
1414
# name: test_station_details
15-
Station(id='abc123-0a4c-12cc-a9b9-a488a62454be', name='AVIA Tankstelle', house_number='115', place='Exampletown', post_code=26689, street='Mainstreet', lat=53.1, lng=7.8, brand='AVIA', diesel=1.669, e10=1.689, e5=1.749, is_open=True, overrides=[], whole_day=False, state=None, opening_times=None, distance=None)
15+
Station(id='abc123-0a4c-12cc-a9b9-a488a62454be', name='AVIA Tankstelle', house_number='115', place='Exampletown', post_code=26689, street='Mainstreet', lat=53.1, lng=7.8, brand='AVIA', diesel=1.669, e10=1.689, e5=1.749, is_open=True, overrides=[], whole_day=False, state=None, opening_times=[OpeningTime(end='21:00:00', start='06:00:00', text='Mo-Fr'), OpeningTime(end='20:00:00', start='08:00:00', text='Samstag, Sonntag, Feiertag')], distance=None)
1616
# ---

0 commit comments

Comments
 (0)