alb2001 / dextools-python

A simple Python API wrapper for DEXTools
https://pypi.org/project/dextools-python/
MIT License
47 stars 9 forks source link

Updated the default base url and required auth header due to changes … #1

Closed bkyoung closed 11 months ago

bkyoung commented 11 months ago

…upstream. Mildly improved the constructors to allow overriding the base url if (for example) you use a paid plan

bkyoung commented 11 months ago

I noticed today that the dextools apis are in flux as they begin moving toward deprecating v1 and only supporting v2 endpoints by the end of the year. I needed to change the base url for the endpoints to get your library working again. While I was in there, I went ahead and made the class constructors able to accept a different base url if, for example, your api token is authorized to access non-free endpoints. It still defaults to the free base url, though.

alb2001 commented 11 months ago

Hi!

Thank you for your PR. I am aware of this. When I added the support for v2, I used the API address they gave me, and I thought it was the only one available. But no. The one I used is for partnership subscription types. There are different endpoints for each plan which I will add support for as well. I think I will use an argument in the constructor for the plan you are currently using. I am waiting for one of their team members to get back to me to see what's the best way to tackle this.

However I was not aware of the header. so I thank you for pointing me to that

alb2001 commented 11 months ago

Hi

I added support for all available plans. Thank you for your PR