package com.gh.gamecenter.common.retrofit

import com.gh.gamecenter.common.entity.OssEntity
import io.reactivex.Single
import okhttp3.MultipartBody
import okhttp3.RequestBody
import okhttp3.ResponseBody
import retrofit2.http.*

interface ApiService {
    /**
     * 分享统计
     */
    @POST("shares")
    fun postShareResult(@Body body: RequestBody): Single<ResponseBody>

    /**
     * 图片上传
     */
    @Multipart
    @POST("images")
    fun uploadImage(@Part imgs: MultipartBody.Part, @Query("type") type: String): Single<ResponseBody>

    /**
     * 获取阿里云上传配置
     */
    @GET("sts/oss?type=user")
    fun getOssUpdateConfig(): Single<OssEntity>

    @GET("sts/oss")
    fun getOssUpdateConfig(@Query("type") type: String?): Single<OssEntity>
}