Skip to content

Commit 190d5fe

Browse files
SholoflyRudolf Offereins
and
Rudolf Offereins
authored
:bug Fix trackables url and add to test script (#18)
Co-authored-by: Rudolf Offereins <[email protected]>
1 parent b30359a commit 190d5fe

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

geocachingapi/geocachingapi.py

+1-1
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

+2-2
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)