吉利安卓应用市场API

吉利安卓应用市场API_第1张图片

吉利安卓应用市场API_第2张图片

BaseURL

com\ecarx\appstore\global\http\HttpUtil.smali

# static fields
.field private static final BASE_URL:Ljava/lang/String; = "http://api.xchanger.cn/api/v1/"

API

smali\com\ecarx\appstore\global\http\Api.smali

Line 135: .method public abstract getAppBanner()Lio/reactivex/Observable;
Line 151: .method public abstract getAppCategories()Lio/reactivex/Observable;
Line 167: .method public abstract getAppVersion()Lio/reactivex/Observable;
Line 276: .method public abstract getFlowInfo()Lio/reactivex/Observable;
Line 292: .method public abstract getHotInSearch()Lio/reactivex/Observable;
Line 308: .method public abstract getSpecials()Lretrofit2/Call;

 以getAPPBanner为例

接口地址应该为

http://api.xchanger.cn/api/v1/banner/index

吉利安卓应用市场API_第3张图片

但是返回的是个网页,这里需要添加请求头(需要抓包分析)

   move-result-object v0 //move-result-object(返回对象)指令获取返回结果

    const-string/jumbo v2, "X-APP-ID" //声明的引用是获取字符串常量池的数据

    .line 37
//(如果方法是私有的,则使用invoke-direct ,否则invoke-virtual )用于调用protected或public函数// >表示从属关系 addHeader是okhttp3里面Request的函数
    invoke-virtual {v0, v2, v1}, Lokhttp3/Request$Builder;->addHeader(Ljava/lang/String;Ljava/lang/String;)Lokhttp3/Request$Builder;


    Okhttp代码
    public Builder addHeader(String name, String value) {
      headers.add(name, value);
      return this;
    }

 

 吉利安卓应用市场API_第4张图片

 

获取商品分类接口

http://api.xchanger.cn/api/v1/product/catalog

.method public abstract getAppCategories()Lio/reactivex/Observable;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "()",
            "Lio/reactivex/Observable",
            "<",
            "Lcom/ecarx/appstore/global/entity/ApkCategoriesEntity;",
            ">;"
        }
    .end annotation

    .annotation runtime Lretrofit2/http/GET;
        value = "product/catalog"//Retrofit的Interface定义
    .end annotation
.end method

 

你可能感兴趣的:(车机)