MCPcopy Index your code
hub / github.com/Tamicer/Novate

github.com/Tamicer/Novate @1.5.5.5

Chat with this repo
repository ↗ · DeepWiki ↗ · release 1.5.5.5 ↗ · + Follow
875 symbols 2,062 edges 73 files 269 documented · 31%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Novate

a safety client by Https for Android, (Android线程安全http请求库)

CI Status Version License Platform

Summary

  • Join based API, reduce API redundancy
  • Offline caching
  • Support a variety of ways to access the network (a get, put, post, delete)
  • Support file download and upload
  • Unified support request header to join
  • The unity of the support to return the result
  • Support custom extensions API
  • Support the unified request access to the network flow control

dependencies

Download the laster JAR:( com.tamic.novate:novate:-1.0.0.aar)

compile(name: 'com.tamic.novate-1.0.0', ext: 'aar')

or Gradle:   - root:

     repositories {
        maven { url "https://jitpack.io" }
        jcenter()
    }
  • app:
     dependencies {
      .....
        compile 'com.tamic.novate:novate:1.0.0'
     }
    

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

Retrofit requires at minimum Java 7 or Android 2.3.


中文文档

基于Retrofit和RxJava封装的链式请求库,为何起名 Novate?

Novate的英文原意是用新事物代替 我的目的是用新的东西来代替Retrofit的有些不易操作的地方,因此起名新奇的东西,所以结合了原来的Http用法习惯,又加入了Retrofit的特性,因此起名 :Novate

功能

  • 加入基础API,减少Api冗余
  • 支持离线缓存
  • 支持多种方式访问网络(get,put,post ,delete)
  • 支持文件下载和上传
  • 支持请求头统一加入
  • 支持对返回结果的统一处理
  • 支持自定义的扩展API
  • 支持统一请求访问网络的流程控制

请求网络无需关心是否在主线程和非UI线程,操作UI直接可在回调处理, 保留了HttpClient的编码习惯,又加入了Builder模式编程!

用法

    Novate novate = new Novate.Builder(this)
            .baseUrl(baseUrl)
            .build();

Get

    novate.executeGet("pathUrl", parameters, new Novate.ResponseCallBack<NovateResponse<MyModel>>() {

        .....

    });

Post

    novate.executePost("pathUrl", parameters, new Novate.ResponseCallBack<NovateResponse<MyModel>>() {

       .............

    });

UpLoad

RequestBody requestFile =
                RequestBody.create(MediaType.parse("image/jpg"), new File(you file path));

  novate.upload(url, requestFile, new BaseSubscriber<ResponseBody>{

    '''''''''''''''
  });

DownLoad

  novate.download(downUrl, new DownLoadCallBack() {

     ''''''''''''
  });

Custom Api

如果默认的BaseApiService无法满足你的需求时,novate同样支持你自己的ApiService。

MyAPI

 public interface MyAPI {

   @GET("url")
  Observable<MyBean> getdata(@QueryMap Map<String, String> maps);

 }

Execute

 MyAPI myAPI = novate.create(MyAPI.class);

 novate.call(myAPI.getdata(parameters),
            new BaseSubscriber<MyBean>{
            '''''''
            });

}

更多介绍:http://www.jianshu.com/p/d7734390895e

Extension points exported contracts — how you extend this code

IGenericsConvert (Interface)
IGenericsConvert Created by Tamic on 2017-05-02. ink :https://github.com/Tamicer/Novate [6 implementers]
novate/src/main/java/com/tamic/novate/callback/IGenericsConvert.java
MyAPI (Interface)
Created by Tamic on 2016-07-07.
exemple/src/main/java/com/tamic/excemple/MyAPI.java
CookieCache (Interface)
Created by Tamic on 2016-12-08. A CookieCache handles the volatile cookie session storage. [2 implementers]
novate/src/main/java/com/tamic/novate/cache/CookieCache.java
CookiePersistor (Interface)
Created by Tamic on 2016-12-08. A CookiePersistor handles the persistent cookie storage. [2 implementers]
novate/src/main/java/com/tamic/novate/cookie/CookiePersistor.java
ClearableCookieJar (Interface)
Created by Tamic on 2016-12-08. This interface extends CookieJar and adds methods to clear the cookies. [2 implementers]
novate/src/main/java/com/tamic/novate/cookie/ClearableCookieJar.java
ResponseCallBack (Interface)
ResponseCallBack Support your custom data model 兼容1.3.3.2以下版本 更高以上版本已过时 [1 implementers]
novate/src/main/java/com/tamic/novate/Novate.java

Core symbols most depended-on inside this repo

add
called by 56
novate/src/main/java/com/tamic/novate/RxActionManager.java
d
called by 55
novate/src/main/java/com/tamic/novate/util/LogWraper.java
handleErrTransformer
called by 42
novate/src/main/java/com/tamic/novate/Novate.java
e
called by 35
novate/src/main/java/com/tamic/novate/util/LogWraper.java
printStackTrace
called by 33
novate/src/main/java/com/tamic/novate/util/LogWraper.java
setMessage
called by 28
novate/src/main/java/com/tamic/novate/Throwable.java
build
called by 25
novate/src/main/java/com/tamic/novate/Novate.java
toString
called by 22
novate/src/main/java/com/tamic/novate/request/NovateRequest.java

Shape

Method 779
Class 85
Interface 8
Enum 3

Languages

Java100%

Modules by API surface

novate/src/main/java/com/tamic/novate/Novate.java97 symbols
exemple/src/main/java/com/tamic/excemple/model/MovieModel.java92 symbols
exemple/src/main/java/com/tamic/excemple/model/wetherModel.java42 symbols
novate/src/main/java/com/tamic/novate/util/FileUtil.java39 symbols
novate/src/main/java/com/tamic/novate/request/NovateRequest.java35 symbols
exemple/src/main/java/com/tamic/excemple/model/SouguBean.java33 symbols
exemple/src/main/java/com/tamic/excemple/model/ResultModel.java28 symbols
exemple/src/main/java/com/tamic/excemple/model/IpResult.java28 symbols
exemple/src/main/java/com/tamic/excemple/ExampleActivity.java24 symbols
exemple/src/main/java/com/tamic/excemple/model/ListData.java22 symbols
novate/src/main/java/com/tamic/novate/callback/ResponseCallback.java20 symbols
exemple/src/main/java/com/tamic/excemple/model/CityModel.java20 symbols

For agents

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

⬇ download graph artifact

Ask about this repo answers extend the page