MCPcopy Index your code
hub / github.com/apptik/jus

github.com/apptik/jus @v0.6.9

Chat with this repo
repository ↗ · DeepWiki ↗ · release v0.6.9 ↗ · + Follow
2,862 symbols 12,793 edges 334 files 556 documented · 19% 1 cross-repo links
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

jus

JavaDocs

Build Status Join the chat at https://gitter.im/apptik/jus StackExchange Stories in Ready

Jus is a flexible and easy HTTP/REST client library for Java and Android.

  • it is like Volley but much easier
  • it is like Retrofit but infinitely more flexible

Jus is inspired by the flexibility, modularity and transparency of Google's Volley Library and the extreme simplicity of declarative API mapping of Retrofit.

Like Volley the main thing where Requests are executed is the RequestQueue.

RequestQueue queue = Jus.newRequestQueue();

and then Requests can be added to the Queue:

queue.add(new Request<String>(
                        Request.Method.GET,
                        HttpUrl.parse(BeerService.fullUrl),
                        new Converters.StringResponseConverter())
                        .addResponseListener((r) -> out.println("RESPONSE: " + r))
                        .addErrorListener((e) -> out.println("ERROR: " + e))
        );

Anther option similarly to Retrofit is to map Java Interface to an API.

public interface BeerService {
    @GET("locquery/{user}/{q}")
    Request<String> getBeer(
            @Path("user") String user,
            @Path("q") String q);
}

Then create the Service Instance:

RetroProxy retroJus = new RetroProxy.Builder()
            .baseUrl(BeerService.baseUrl)
            .requestQueue(queue)
            .addConverterFactory(new BasicConverterFactory())
            .build();

    BeerService beerService = retroJus.create(BeerService.class);

And execute a request:

beerService.getBeer(BeerService.userString, "777")
                .addResponseListener((r) -> out.println("RESPONSE: " + r))
                .addErrorListener((e) -> out.println("ERROR: " + e.networkResponse));

Download

Find the latest JARs or grab via Maven:

<dependency>
  <groupId>io.apptik.comm</groupId>
  <artifactId>jus-XXX</artifactId>
  <version>0.6.9</version>
</dependency>

or Gradle:

compile 'io.apptik.comm:jus-XXX:0.6.9'

Downloads of the released versions are available in Sonatype's releases repository.

Snapshots of the development versions are available in Sonatype's snapshots repository.

Jus requires at minimum Java 7 or Android SDK 15.

Examples

Questions

StackOverflow with tag 'jus' or 'apptik'

Modules

  • jus for Java - main jus library for java Maven Central VersionEye
  • Reactive jus - RxJava support for jus Maven Central VersionEye
  • HTTP Stacks

    • OkHttp = OkHttp Client Stack for jus Maven Central VersionEye
    • OkHttp3 = OkHttp3 Client Stack for jus Maven Central VersionEye
    • ApacheHttp = ApacheHttp Client Stack for jus Maven Central VersionEye
    • Netty = Netty Client Stack for jus Maven Central VersionEye
  • Jus for Android

  • Data serializers support and custom requests for jus

Licence

Copyright (C) 2016 AppTik Project

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

     http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

Extension points exported contracts — how you extend this code

ImageListener (Interface)
Interface for the response handlers on image requests. The call flow is this: 1. Upon being attached to a request, onR [16 …
android/jus-android/src/main/java/io/apptik/comm/jus/ui/ImageLoader.java
Converter (Interface)
Convert objects to and from their representation as HTTP bodies. [46 implementers]
jus-java/src/main/java/io/apptik/comm/jus/Converter.java
MarkerInterceptorFactory (Interface)
(no doc) [19 implementers]
stack/jus-okhttp3/src/main/java/io/apptik/comm/jus/okhttp3/MarkerInterceptorFactory.java
Delegate (Interface)
(no doc) [8 implementers]
examples-android/src/main/java/io/apptik/comm/jus/examples/nav/JToggle.java
AnInterface (Interface)
(no doc) [4 implementers]
converter/jus-gson/src/test/java/io/apptik/comm/jus/Common.java
PhoneOrBuilder (Interface)
(no doc) [3 implementers]
converter/jus-protobuf/src/test/java/io/apptik/comm/jus/converter/PhoneProtos.java
BeerService (Interface)
(no doc)
examples-java/src/main/java/io/apptik/comm/jus/examples/BeerService.java
Instructables (Interface)
(no doc)
demo-android/src/main/java/io/apptik/jus/demoapp/api/Instructables.java

Core symbols most depended-on inside this repo

parse
called by 424
jus-java/src/main/java/io/apptik/comm/jus/http/HttpUrl.java
enqueue
called by 321
jus-java/src/main/java/io/apptik/comm/jus/Request.java
put
called by 257
jus-java/src/main/java/io/apptik/comm/jus/Cache.java
get
called by 240
jus-java/src/main/java/io/apptik/comm/jus/Cache.java
setBody
called by 197
jus-java/src/main/java/io/apptik/comm/jus/RequestBuilder.java
getFuture
called by 155
jus-java/src/main/java/io/apptik/comm/jus/Request.java
size
called by 155
jus-java/src/main/java/io/apptik/comm/jus/http/Headers.java
build
called by 144
jus-java/src/main/java/io/apptik/comm/jus/http/Headers.java

Shape

Method 2,381
Class 383
Interface 58
Function 32
Enum 8

Languages

Java99%
TypeScript1%

Modules by API surface

jus-java/src/test/java/io/apptik/comm/jus/http/HttpUrlTest.java147 symbols
retro-jus/src/test/java/io/apptik/comm/jus/retro/RequestBuilderTest.java116 symbols
jus-java/src/main/java/io/apptik/comm/jus/http/HttpUrl.java89 symbols
jus-java/src/main/java/io/apptik/comm/jus/Request.java68 symbols
examples-android/src/main/java/io/apptik/comm/jus/examples/nav/JToggle.java61 symbols
retro-jus/src/test/java/io/apptik/comm/jus/retro/RetroProxyTest.java56 symbols
converter/jus-protobuf/src/test/java/io/apptik/comm/jus/converter/PhoneProtos.java51 symbols
jus-java/src/main/java/io/apptik/comm/jus/RequestQueue.java43 symbols
retro-jus/src/test/java/io/apptik/comm/jus/retro/RequestTest.java37 symbols
retro-jus/src/main/java/io/apptik/comm/jus/retro/RequestBuilderAction.java37 symbols
stack/jus-okhttp3/src/test/java/io/apptik/comm/jus/okhttp3/SimpleRequestTest.java36 symbols
stack/jus-okhttp/src/test/java/io/apptik/comm/jus/okhttp/SimpleRequestTest.java36 symbols

Used by 1 indexed graphs manifest dependencies, hub-wide

For agents

$ claude mcp add jus \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact