package com.xwkj.jcjcgz.mvp.model.api.service;

import com.google.gson.JsonObject;

import java.util.Map;

import io.reactivex.Observable;
import okhttp3.RequestBody;
import retrofit2.http.Body;
import retrofit2.http.FieldMap;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.GET;
import retrofit2.http.Headers;
import retrofit2.http.POST;
import retrofit2.http.QueryMap;
import retrofit2.http.Url;

public interface ApiService {
    @Headers({"Content-Type: application/json", "Accept: application/json"})//需要添加头
    @POST
    Observable<JsonObject> getNetWork(@Url String url, @Body RequestBody map);

    //登录
    @FormUrlEncoded
    @POST("/blade-auth/oauth/token")
    Observable<JsonObject> login(@FieldMap Map<String, String> map);

    //获取应用列表
    @GET("/app-management/application/page")
    Observable<JsonObject> getAppList(@QueryMap Map<String, String> map);

    //获取应用详情
    @GET("/app-management/application/detail")
    Observable<JsonObject> getAppDetail(@QueryMap Map<String, String> map);
}
