husnjak / IGDB-API-JVM

Wrapper for IGDBs API written in Kotlin should work for all JVM based languages, tested in Kotlin & Java
MIT License
39 stars 11 forks source link

RequestException #22

Closed gitadam0 closed 1 year ago

gitadam0 commented 1 year ago

hello brother I think I follow all the steps but I just cant get it to work

I enter the CLIENT_ID and ACCESS_TOKEN but ill always catch RequestException and i get this the run console : Skipped 34 frames! The application may be doing too much work on its main thread.

CODE : """ IGDBWrapper wrapper = IGDBWrapper.INSTANCE; wrapper.setCredentials("CLIENT_ID", "ACCESS_TOKEN") APICalypse apicalypse = new APICalypse().fields("*").sort("release_dates.date", Sort.DESCENDING); try{ List games = ProtoRequestKt.games(wrapper, apicalypse); } catch(RequestException e) { // Do something or error } """

gpcalmeida commented 1 year ago

Are you running this code on main thread? This can be the problem. You can try to attach this request to a different dispatcher using Coroutines

gitadam0 commented 1 year ago

Are you running this code on main thread? This can be the problem. You can try to attach this request to a different dispatcher using Coroutines

yes bro that was the problem, thanks its fixed now