xhsun / gw2wrapper Goto Github PK
View Code? Open in Web Editor NEWGuild Wars 2 API Wrapper for Android and Java
License: Apache License 2.0
Guild Wars 2 API Wrapper for Android and Java
License: Apache License 2.0
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)
This issue depend on #46 to be completed first.
I want to setup a CI pipeline for unit test and deploy to maven.
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
There is a wrong URL in ur getCurrentDailyAchievements(). It queries https://api.guildwars2.com/v2/achievement/daily instead of https://api.guildwars2.com/v2/achievements/daily (u missed a "s")
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.
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.
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.
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.
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.
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.
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
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.