Coder Social home page Coder Social logo

clash-api's Introduction

Welcome! ๐Ÿ‘‹

I'm a software engineer with high proficiency in C++, Java and TypeScript. I especially have great interest in graphics programming. I love good docs and neat user interface, so I always make at least decent ones, what's the point of an outstanding code if it can't be used?

  • ๐Ÿ–ฅ๏ธ I code in C, C++, C#, Rust, Java, Python, Kotlin, Typescript (+HTML/CSS).
  • ๐ŸŽž๏ธ I'm passionate about cinema. Memories of Murder, Butterfly Effect or The Lord of the Rings are among my favorite experiences.
  • ๐Ÿ’ฌ You can get in touch with me either at Lycoon#7542 on Discord or @LycoonMC on Twitter.

clash-api's People

Contributors

ixirsii avatar lycoon avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

clash-api's Issues

serialization error

When calling:

War currentWar = clashApi.getCurrentWar(myClan);

I get


kotlinx.serialization.MissingFieldException: Field 'members' is required for type with serial name 'com.lycoon.clashapi.models.war.WarClan', but it was missing at path: $.clan at path: $.clan
	at kotlinx.serialization.json.internal.StreamingJsonDecoder.decodeSerializableValue(StreamingJsonDecoder.kt:90)
	at kotlinx.serialization.json.Json.decodeFromString(Json.kt:95)
	at com.lycoon.clashapi.core.ClashAPI.getCurrentWar(ClashAPI.kt:427)
	at com.umpquatechnology.Main.clashCall(Main.java:103)
	at com.umpquatechnology.Main.main(Main.java:27)
Caused by: kotlinx.serialization.MissingFieldException: Field 'members' is required for type with serial name 'com.lycoon.clashapi.models.war.WarClan', but it was missing at path: $.clan
	at kotlinx.serialization.json.internal.StreamingJsonDecoder.decodeSerializableValue(StreamingJsonDecoder.kt:90)
	at kotlinx.serialization.encoding.AbstractDecoder.decodeSerializableValue(AbstractDecoder.kt:43)
	at kotlinx.serialization.encoding.AbstractDecoder.decodeNullableSerializableElement(AbstractDecoder.kt:79)
	at com.lycoon.clashapi.models.war.War$$serializer.deserialize(War.kt:5)
	at com.lycoon.clashapi.models.war.War$$serializer.deserialize(War.kt:5)
	at kotlinx.serialization.json.internal.StreamingJsonDecoder.decodeSerializableValue(StreamingJsonDecoder.kt:70)
	... 4 more
Caused by: kotlinx.serialization.MissingFieldException: Field 'members' is required for type with serial name 'com.lycoon.clashapi.models.war.WarClan', but it was missing
	at kotlinx.serialization.internal.PluginExceptionsKt.throwMissingFieldException(PluginExceptions.kt:20)
	at com.lycoon.clashapi.models.war.WarClan.<init>(WarClan.kt:6)
	at com.lycoon.clashapi.models.war.WarClan$$serializer.deserialize(WarClan.kt:6)
	at com.lycoon.clashapi.models.war.WarClan$$serializer.deserialize(WarClan.kt:6)
	at kotlinx.serialization.json.internal.StreamingJsonDecoder.decodeSerializableValue(StreamingJsonDecoder.kt:70)
	... 9 more

Doubt about league

I'm using your API to make a discord bot and I went to make a command to get informations of a league group, but when I put a tag of my clan to see my group, everything is null except the clan names, it could help me?

null

serialization error 2

Ran across another serialization error

kotlinx.serialization.MissingFieldException: Field 'attacks' is required for type with serial name 'com.lycoon.clashapi.models.war.WarMember', but it was missing at path: $.opponent.members[5] at path: $.opponent.members[5] at path: $.opponent.members[5] at path: $.opponent.members[5]
	at kotlinx.serialization.json.internal.StreamingJsonDecoder.decodeSerializableValue(StreamingJsonDecoder.kt:90)
	at kotlinx.serialization.json.Json.decodeFromString(Json.kt:95)
	at com.lycoon.clashapi.core.ClashAPI.getWarLeagueWar(ClashAPI.kt:419)
	at com.umpquatechnology.Main.clashCall(Main.java:115)
	at com.umpquatechnology.Main.main(Main.java:35)
Caused by: kotlinx.serialization.MissingFieldException: Field 'attacks' is required for type with serial name 'com.lycoon.clashapi.models.war.WarMember', but it was missing at path: $.opponent.members[5] at path: $.opponent.members[5] at path: $.opponent.members[5]
	at kotlinx.serialization.json.internal.StreamingJsonDecoder.decodeSerializableValue(StreamingJsonDecoder.kt:90)
	at kotlinx.serialization.encoding.AbstractDecoder.decodeSerializableValue(AbstractDecoder.kt:43)
	at kotlinx.serialization.encoding.AbstractDecoder.decodeNullableSerializableElement(AbstractDecoder.kt:79)
	at com.lycoon.clashapi.models.war.War$$serializer.deserialize(War.kt:5)
	at com.lycoon.clashapi.models.war.War$$serializer.deserialize(War.kt:5)
	at kotlinx.serialization.json.internal.StreamingJsonDecoder.decodeSerializableValue(StreamingJsonDecoder.kt:70)
	... 4 more
Caused by: kotlinx.serialization.MissingFieldException: Field 'attacks' is required for type with serial name 'com.lycoon.clashapi.models.war.WarMember', but it was missing at path: $.opponent.members[5] at path: $.opponent.members[5]
	at kotlinx.serialization.json.internal.StreamingJsonDecoder.decodeSerializableValue(StreamingJsonDecoder.kt:90)
	at kotlinx.serialization.encoding.AbstractDecoder.decodeSerializableValue(AbstractDecoder.kt:43)
	at kotlinx.serialization.encoding.AbstractDecoder.decodeNullableSerializableElement(AbstractDecoder.kt:79)
	at com.lycoon.clashapi.models.war.WarClan$$serializer.deserialize(WarClan.kt:6)
	at com.lycoon.clashapi.models.war.WarClan$$serializer.deserialize(WarClan.kt:6)
	at kotlinx.serialization.json.internal.StreamingJsonDecoder.decodeSerializableValue(StreamingJsonDecoder.kt:70)
	... 9 more
Caused by: kotlinx.serialization.MissingFieldException: Field 'attacks' is required for type with serial name 'com.lycoon.clashapi.models.war.WarMember', but it was missing at path: $.opponent.members[5]
	at kotlinx.serialization.json.internal.StreamingJsonDecoder.decodeSerializableValue(StreamingJsonDecoder.kt:90)
	at kotlinx.serialization.encoding.AbstractDecoder.decodeSerializableValue(AbstractDecoder.kt:43)
	at kotlinx.serialization.encoding.AbstractDecoder.decodeSerializableElement(AbstractDecoder.kt:70)
	at kotlinx.serialization.json.internal.StreamingJsonDecoder.decodeSerializableElement(StreamingJsonDecoder.kt:162)
	at kotlinx.serialization.encoding.CompositeDecoder$DefaultImpls.decodeSerializableElement$default(Decoding.kt:533)
	at kotlinx.serialization.internal.CollectionLikeSerializer.readElement(CollectionSerializers.kt:80)
	at kotlinx.serialization.internal.AbstractCollectionSerializer.readElement$default(CollectionSerializers.kt:51)
	at kotlinx.serialization.internal.AbstractCollectionSerializer.merge(CollectionSerializers.kt:36)
	at kotlinx.serialization.internal.AbstractCollectionSerializer.deserialize(CollectionSerializers.kt:43)
	at kotlinx.serialization.json.internal.StreamingJsonDecoder.decodeSerializableValue(StreamingJsonDecoder.kt:70)
	... 14 more
Caused by: kotlinx.serialization.MissingFieldException: Field 'attacks' is required for type with serial name 'com.lycoon.clashapi.models.war.WarMember', but it was missing
	at kotlinx.serialization.internal.PluginExceptionsKt.throwMissingFieldException(PluginExceptions.kt:20)
	at com.lycoon.clashapi.models.war.WarMember.<init>(WarMember.kt:5)
	at com.lycoon.clashapi.models.war.WarMember$$serializer.deserialize(WarMember.kt:5)
	at com.lycoon.clashapi.models.war.WarMember$$serializer.deserialize(WarMember.kt:5)
	at kotlinx.serialization.json.internal.StreamingJsonDecoder.decodeSerializableValue(StreamingJsonDecoder.kt:70)
	... 23 more

Upload to maven central

I'd like to use this as a project dependency, have you considered uploading to maven central?

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.