megoru / wg-easy-wrapper Goto Github PK
View Code? Open in Web Editor NEWwg-easy wrapper
Home Page: https://megoru.ru
License: MIT License
wg-easy wrapper
Home Page: https://megoru.ru
License: MIT License
I am not a Java guy, what you've written looks very professional but alas I cannot make heads or tails of how you do it.
If I send a POST request to a running instance of wg-easy what do I need to include to generate a new session?
Can I use the webgui password? Do I need to generate some new password? Do I need to change settings in my dockercompose file to expose the API when not logged in?
Thanks in advance!
2023-05-05T08:43:00.382Z ERROR 1 --- [ scheduling-1] o.s.s.s.TaskUtils$LoggingErrorHandler : Unexpected error occurred in scheduled task
com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected a string but was BEGIN_OBJECT at line 2 column 13 path $.error
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:270) ~[gson-2.9.1.jar!/:na]
at com.google.gson.Gson.fromJson(Gson.java:1058) ~[gson-2.9.1.jar!/:na]
at com.google.gson.Gson.fromJson(Gson.java:1016) ~[gson-2.9.1.jar!/:na]
at com.google.gson.Gson.fromJson(Gson.java:959) ~[gson-2.9.1.jar!/:na]
at com.google.gson.Gson.fromJson(Gson.java:927) ~[gson-2.9.1.jar!/:na]
at org.megoru.impl.WgEasyAPIImpl.execute(WgEasyAPIImpl.java:503) ~[wg-easy-wrapper-v2.7.jar!/:na]
at org.megoru.impl.WgEasyAPIImpl.get(WgEasyAPIImpl.java:315) ~[wg-easy-wrapper-v2.7.jar!/:na]
at org.megoru.impl.WgEasyAPIImpl.getSession(WgEasyAPIImpl.java:285) ~[wg-easy-wrapper-v2.7.jar!/:na]
at main.config.BotStartConfig.updateAPI(BotStartConfig.java:78) ~[classes!/:0.0.1-SNAPSHOT]
at jdk.internal.reflect.GeneratedMethodAccessor64.invoke(Unknown Source) ~[na:na]
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na]
at java.base/java.lang.reflect.Method.invoke(Method.java:568) ~[na:na]
at org.springframework.scheduling.support.ScheduledMethodRunnable.run(ScheduledMethodRunnable.java:84) ~[spring-context-6.0.7.jar!/:6.0.7]
at org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:54) ~[spring-context-6.0.7.jar!/:6.0.7]
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539) ~[na:na]
at java.base/java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305) ~[na:na]
at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305) ~[na:na]
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) ~[na:na]
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) ~[na:na]
at java.base/java.lang.Thread.run(Thread.java:833) ~[na:na]
Caused by: java.lang.IllegalStateException: Expected a string but was BEGIN_OBJECT at line 2 column 13 path $.error
at com.google.gson.stream.JsonReader.nextString(JsonReader.java:835) ~[gson-2.9.1.jar!/:na]
at com.google.gson.internal.bind.TypeAdapters$15.read(TypeAdapters.java:394) ~[gson-2.9.1.jar!/:na]
at com.google.gson.internal.bind.TypeAdapters$15.read(TypeAdapters.java:382) ~[gson-2.9.1.jar!/:na]
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$1.read(ReflectiveTypeAdapterFactory.java:161) ~[gson-2.9.1.jar!/:na]
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:266) ~[gson-2.9.1.jar!/:na]
... 19 common frames omitted
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.