progwml6 / javacurseapi Goto Github PK
View Code? Open in Web Editor NEWJava implementation of the CurseApp API's
License: Apache License 2.0
Java implementation of the CurseApp API's
License: Apache License 2.0
Only applicable if retrofit will be selected as REST backend:
Project is java 8 now. Rewrite JSON (de)serialization code to be more robust and safe.
Make it faster:
That should make detection faster than waiting websocket implementation to detect failure.
Things to research:
see https://github.com/progwml6/JavaCurseAPI/tree/soap-experimentation for research into this
along with https://github.com/progwml6/JavaCurseAPI/blob/soap-experimentation/src/main/java/com/feed_the_beast/javacurselib/examples/app_v1/SoapLogin.java
The associated websocket API's are deprecated.
This is a JS change set for this deprecation: njibhu/cursejs@2988e35
For the V2 version of the library, we want to make this more efficient, and event based for easier implementation, expansion, etc.
Some preliminary experimentation done in: master...jikuja:retrofit
But how to use retrofit? What is cleanest solution or most future-proof solution?
By default retrofit uses Call interface(https://square.github.io/retrofit/2.x/retrofit/retrofit2/Call.html) which can be executed asynchronously with enqueue(Callback<T> callback)
or synchronously with execute()
. Retrofit also provides service call adapters(https://github.com/square/retrofit/tree/master/retrofit-adapters) for supporting other return values from service calls than Call.
I wrote my experimentation with adapter converting Calls to java 8 CompletableFutures. I experimented both BodyCallAdapter(type 2 in my branch) and ResponseCallAdapter(type in in my branch) by using both synchronous and asynchronous requests. Any feedback: which one is nicer/cleaner/easier to use? (usage examples are in CurseApp.java) or should Call interface be used?
Ps. I will add similar CompletableFuture interface into Websocket.sendMessage() later. Value returned by request will be CONVERSATION_MESSAGE_RESPONSE...
The requests should be held in a queue that releases them as it can
100ms between requests has been known to work for other projects.
I'd like to get that lower if possible
If this doesn't happen some requests will continue to get blocked by the api's throttling system
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.