Make RequestManger instance non private
spacemanspiff2007 opened this issue · 6 comments
Hi,
I'd like to use your library but instead of requests I'd like to use aiohttp.
Edit:
It's not quite as simple as I have thought since the functions would have to be async functions which have to be awaited.
Maybe adding an option to pass the data after the http request to the DarkSky
instance would be an easy and clean solution?
Otherwise a check with
if asyncio.iscoroutinefunction(self.__request_manager.make_request):
data = await self.__request_manager.make_request(url, **params)
else:
data = self.__request_manager.make_request(url, **params)
could be a solution if the self.__request_manager is made non-private.
Hi @spacemanspiff2007
I think it will be better if we add a new wrapper for asynchronous style. I will work on it
Thank you!
@spacemanspiff2007 i pushed changes #17
But i need to create async tests before merge. I don't have time for this today. So you can use develop branch for you project until i merge it on master. I had to remove the forecast updating method. I will add in the next release
It will be great if you can cover a new asynchronous wrapper with tests
Thanks for help @spacemanspiff2007
Thank you for doing this with me!