Skip to content

Commit 190d5fe

Browse files
SholoflyRudolf Offereins
andauthored
:bug Fix trackables url and add to test script (#18)
Co-authored-by: Rudolf Offereins <rudolf.offereins@netivity.nl>
1 parent b30359a commit 190d5fe

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

geocachingapi/geocachingapi.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ async def _update_trackables(self, data: Dict[str, Any] = None) -> None:
171171
"currentGeocacheCode",
172172
"currentGeocacheName"
173173
])
174-
data = await self._request("GET", f"/{GEOCACHING_API_VERSION}/trackables?fields={fields}&type=3")
174+
data = await self._request("GET", f"/trackables?fields={fields}&type=3")
175175
self._status.update_trackables_from_dict(data)
176176
_LOGGER.debug(f'Trackables updated.')
177177

tests/test.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22
import asyncio
33
import logging
44
from geocachingapi import GeocachingApi, GeocachingStatus
5-
from geocachingapi.models import GeocachingApiEnvironment
5+
from geocachingapi.models import GeocachingApiEnvironment, GeocachingSettings
66
from my_token import TOKEN
77
logging.basicConfig(level=logging.DEBUG)
88
mylogger = logging.getLogger()
99

1010
async def test():
1111
"""Function to test GeocachingAPI integration"""
1212
status:GeocachingStatus = None
13-
api = GeocachingApi(token=TOKEN, environment=GeocachingApiEnvironment.Staging)
13+
api = GeocachingApi(token=TOKEN, environment=GeocachingApiEnvironment.Staging, settings = GeocachingSettings(fetch_trackables=True))
1414
status = await api.update()
1515
print(status.user.reference_code)
1616
await api.close()

0 commit comments

Comments
 (0)