tosunthex / CoinGecko

CoinGecko .Net Standard api wrapper
111 stars 46 forks source link

Exchanges with Invalid Image Uri "{missing_small.png}" #1

Closed GonzoKK closed 5 years ago

GonzoKK commented 5 years ago

Hi Thanks for this library! Its working very well.

Currently two exchanges CBX and VinEX have invalid Image uris and subsequently I get downstream exceptions "This operation is not supported for a relative URI". I'd prefer not to have to check each exchange (parse for IsAbsoluteUri) and then workaround.

Any thoughts on perhaps addressing at class level? eg changing Image from Uri to string

image

tosunthex commented 5 years ago

Hi @GonzoKK

Thanks for your Issue. I Checked CBX and VinEx but i didn't see any problem maybe Coin Gecko fixed the image problem. But I found another problem and fixed that. If you see any problem or error please inform me.

screenshot from 2019-02-15 21-15-38 screenshot from 2019-02-15 21-21-39

GonzoKK commented 5 years ago

Hi @tosunthex Yes CoinGecko fixed it.

I'm still flagging for Exchanges that could fail IsAbsoluteUri as my batch serialisation to LitEDB currently creates an exception if i include them.

var listBADExchanges = listExchanges.Where(x => !x.Url.IsAbsoluteUri || !x.Image.IsAbsoluteUri).ToList();

image

tosunthex commented 5 years ago

hi @GonzoKK

I added Exchanges_Images_Url_Count_Must_Equal_Total_Count test to ExchangesClientTest file and i cant catch this error.

GonzoKK commented 5 years ago

This error will only occur if/when CoinGecko add an exchange without an image for the exchange. Not sure how often this occurs...

Last time it happened it was fixed same day. (I brought it up on Discord)

tosunthex commented 5 years ago

Hi @GonzoKK I changed the Uri type to string it fixed the problem