GithubHelp home page GithubHelp logo

gw2wrapper's People

Contributors

levvy055 avatar xhsun avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

gw2wrapper's Issues

SynchronousRequest.getSkinInfo throws an IllegalStateException when skin has overrides dye_slots

Hi, I have been getting an IllegalStateException on specific skin ids (618 and 807 for example) when using SynchronousRequest.getSkinInfo().

com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was BEGIN_ARRAY at line 35 column 27 path $[0].details.dye_slots.overrides. at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:224) at com.google.gson.internal.bind.TypeAdapterRuntimeTypeWrapper.read(TypeAdapterRuntimeTypeWrapper.java:41) at com.google.gson.internal.bind.MapTypeAdapterFactory$Adapter.read(MapTypeAdapterFactory.java:187) at com.google.gson.internal.bind.MapTypeAdapterFactory$Adapter.read(MapTypeAdapterFactory.java:145) at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$1.read(ReflectiveTypeAdapterFactory.java:129) at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:220) at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$1.read(ReflectiveTypeAdapterFactory.java:129) at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:220) at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$1.read(ReflectiveTypeAdapterFactory.java:129) at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:220) at com.google.gson.internal.bind.TypeAdapterRuntimeTypeWrapper.read(TypeAdapterRuntimeTypeWrapper.java:41) at com.google.gson.internal.bind.CollectionTypeAdapterFactory$Adapter.read(CollectionTypeAdapterFactory.java:82) at com.google.gson.internal.bind.CollectionTypeAdapterFactory$Adapter.read(CollectionTypeAdapterFactory.java:61) at retrofit2.converter.gson.GsonResponseBodyConverter.convert(GsonResponseBodyConverter.java:37) at retrofit2.converter.gson.GsonResponseBodyConverter.convert(GsonResponseBodyConverter.java:25) at retrofit2.ServiceMethod.toResponse(ServiceMethod.java:119) at retrofit2.OkHttpCall.parseResponse(OkHttpCall.java:218) at retrofit2.OkHttpCall.execute(OkHttpCall.java:180) at me.xhsun.guildwars2wrapper.SynchronousRequest.getSkinInfo(SynchronousRequest.java:3218)

Setup CI Pipeline

This issue depend on #46 to be completed first.

I want to setup a CI pipeline for unit test and deploy to maven.

IllegalStateException

Hey, since PoF I'm getting this Exception, when requesting the AccountInformation

com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected a string but was BEGIN_ARRAY at line 16 column 14 path $.access at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:224) at retrofit2.converter.gson.GsonResponseBodyConverter.convert(GsonResponseBodyConverter.java:37) at retrofit2.converter.gson.GsonResponseBodyConverter.convert(GsonResponseBodyConverter.java:25) at retrofit2.ServiceMethod.toResponse(ServiceMethod.java:119) at retrofit2.OkHttpCall.parseResponse(OkHttpCall.java:218) at retrofit2.OkHttpCall.execute(OkHttpCall.java:180) at me.xhsun.guildwars2wrapper.SynchronousRequest.getAccountInfo(SynchronousRequest.java:201)

Think you just have to Change the Access property from Access to List at Account.java, testing it and will update if it works this way.

Jep, just change Line 27 to List and line 61 List and it will work

Refactor Sync and Async Request Class

This issue is related to #42.

The AsynchronousRequest and SynchronousRequest classes are each around 3000 lines long, which means that they are a pain to work with and a pain to maintain. Thus I want to break them down to more manageable sizes.

Instead of split the requests by sync or async, I want to split them by the API endpoints. For example, all requests corresponds to /v2/account/* will be grouped together.

Reorgnize Model Enums

Due to laziness, some enums have everything crammed into it even if it doesn't really make sense (e.g., me.xhsun.guildwars2wrapper.model.v2.util.comm.Type) and some enums are reused in other models even it doesn't really make sense to do so. I want to go over the models and fix laziness like the ones mentioned.

Refactor Error Response Handling

This issue is related to #42.

The current method of error response handling does the job, but I don't like how a method in ErrorCode enum is responsible for parsing the error response and creating appropriate exception, and Request class also contains logic for handling error response. I want to offload those responsibilities to a new class and/or to the exception itself.

Create Java Console Demo

I want to create a Java console demo project to show people how to implement and use this library.

This issue should be worked on after the refactor is completed.

Refactor Request Classes

Right now the Request class have a bunch utility methods for its base classes. I'm okay with the idea of those methods, but I think they could be better executed. So for this issue I want to explore if there is a better way for me to do input validation and error response handling.

Create Unit Tests

This issue depend on the refactors to be completed first.

There is no actual unit tests for this library, what it have right now is a weird fix of demo and unit test. I don't really like that anymore, thus I want to create some proper unit tests.

Create Android Demo

I want to create a demo to show people how to use this library in Android.

This issue should be worked on after the refactor is completed

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.