ApiInterface

ApiInterface

Source Code

@FormUrlEncoded
@POST
fun requestIdentifyService(@Url url: String, 
                           @FieldMap body: HashMap<String, Any>): Call<JsonObject>

request ที่เขียนมาเพื่อ rewuest Identidy แต่อาจจะสามารถไปใช้งานอื่นๆได้ถ้าฟังก์ชันนี้รองรับ

Parameters

NameDescriptionType
urlidentify url ที่ต้องการยิง requestString
bodybody ที่ต้องการจะแนบไปกับการยิง Request เช่น paramsHashMap< String, Any >
@GET
fun requestGet(@Url url: String): Single<JsonObject>

Parameters

NameDescriptionType
urlurl ที่ต้องการยิง requestString
@POST(POST_URL_TAG)
@Headers(JSON_HEADERS)
fun requestPost(@Path(POST_URL_STR,encoded = true) postUrl: String = "" , 
                @Header(AUTHENTICATION) authentication: String = ""): Single<JsonObject>

@POST(POST_URL_TAG)
fun requestPost(@Path(POST_URL_STR,encoded = true) postUrl: String = "", 
                @HeaderMap header: HashMap<String,String> = hashMapOf()): Single<JsonObject>

Parameters

NameDescriptionTypeDefault
postUrlpost url ที่ต้องการยิง requestString“”
authenticationString ที่ต้องการ Authen จะแนบไปกับการยิง RequestString“”
headerheader ที่ต้องการจะแนบไปกับการยิง RequestHashMap< String,String >hashMapOf()
@POST(POST_URL_TAG)
@Headers(JSON_HEADERS)
fun requestPostBody(@Path(POST_URL_STR,encoded = true) postUrl: String = "" , 
                    @Body body: HashMap<String, Any> , 
                    @Header(AUTHENTICATION) authentication: String = ""): Single<JsonObject>

                        
@POST(POST_URL_TAG)
fun requestPostBody(@Path(POST_URL_STR,encoded = true) postUrl: String = "" , 
                    @Body body: HashMap<String, Any> , 
                    @HeaderMap header: HashMap<String,String> = hashMapOf()): Single<JsonObject>

Parameters

NameDescriptionTypeDefault
postUrlpost url ที่ต้องการยิง requestString“”
bodybody ที่ต้องการจะแนบไปกับการยิง Request เช่น paramsHashMap< String, Any >
authenticationString ที่ต้องการ Authen จะแนบไปกับการยิง RequestString“”
headerheader ที่ต้องการจะแนบไปกับการยิง RequestHashMap< String,String >hashMapOf()
@Multipart
@POST(POST_URL_TAG)
@Headers(JSON_HEADERS)
fun requestPostPartMap(@Path(POST_URL_STR,encoded = true) postUrl: String = "" , 
                        @PartMap body: HashMap<String, RequestBody> , 
                        @Header(AUTHENTICATION) authentication: String = ""): Single<JsonObject>

@Multipart
@POST(POST_URL_TAG)
@Headers(JSON_HEADERS)
fun requestPostPartMap(@Path(POST_URL_STR,encoded = true) postUrl: String = "" , 
                        @PartMap body: HashMap<String, RequestBody>): Single<JsonObject>

@Multipart
@POST(POST_URL_TAG)
fun requestPostPartMap(@Path(POST_URL_STR,encoded = true) postUrl: String = "" , 
                        @PartMap body: HashMap<String, RequestBody> , 
                        @HeaderMap header: HashMap<String,String> = hashMapOf()): Single<JsonObject>    

Parameters

NameDescriptionTypeDefault
postUrlpost url ที่ต้องการยิง requestString“”
bodybody ที่ต้องการจะแนบไปกับการยิง Request เช่น paramsHashMap< String, RequestBody >
authenticationString ที่ต้องการ Authen จะแนบไปกับการยิง RequestString“”
headerheader ที่ต้องการจะแนบไปกับการยิง RequestHashMap< String,String >hashMapOf()
@Multipart
@POST(POST_URL_TAG)
fun uploadFile(@Path(POST_URL_STR,encoded = true) postUrl: String , 
                @Part file: Array<MultipartBody.Part?> , 
                @HeaderMap header: HashMap<String,String> = hashMapOf()): Single<JsonObject>

Parameters

NameDescriptionTypeDefault
postUrlpost url ที่ต้องการยิง requestString“”
filelist ของ file ที่ต้องการจะแนบไปกับการยิง Request เช่น file syncArray< MultipartBody.Part? >
headerheader ที่ต้องการจะแนบไปกับการยิง RequestHashMap< String,String >hashMapOf()
@Multipart
@POST(POST_URL_TAG)
fun uploadFileWithBody(@Path(POST_URL_STR,encoded = true) postUrl: String, 
                       @PartMap body: HashMap<String, RequestBody> , 
                       @Part file: Array<MultipartBody.Part> , 
                       @Header(AUTHENTICATION) authentication: String = ""): Single<JsonObject>

@Multipart
@POST(POST_URL_TAG)
fun uploadFileWithBody(@Path(POST_URL_STR,encoded = true) postUrl: String, 
                       @PartMap body: HashMap<String, RequestBody> , 
                       @Part file: MultipartBody.Part , 
                       @Header(AUTHENTICATION) authentication: String = ""): Single<JsonObject>

@Multipart
@POST(POST_URL_TAG)
fun uploadFileWithBody(@Path(POST_URL_STR,encoded = true) postUrl: String, 
                       @PartMap body: HashMap<String, RequestBody> , 
                       @Part file: Array<MultipartBody.Part> , 
                       @HeaderMap header: HashMap<String,String> = hashMapOf()): Single<JsonObject>

@Multipart
@POST(POST_URL_TAG)
fun uploadFileWithBody(@Path(POST_URL_STR,encoded = true) postUrl: String, 
                       @PartMap body: HashMap<String, RequestBody> ,
                       @Part file: MultipartBody.Part , 
                       @HeaderMap header: HashMap<String,String> = hashMapOf()): Single<JsonObject>

Parameters

NameDescriptionTypeDefault
postUrlpost url ที่ต้องการยิง requestString“”
bodybody ที่ต้องการจะแนบไปกับการยิง Request เช่น paramsHashMap< String, RequestBody >
filelist ของ file ที่ต้องการจะแนบไปกับการยิง Request เช่น file syncArray< MultipartBody.Part? >
filefile ที่ต้องการจะแนบไปกับการยิง Request เช่น file syncMultipartBody.Part
authenticationString ที่ต้องการ Authen จะแนบไปกับการยิง RequestString“”
headerheader ที่ต้องการจะแนบไปกับการยิง RequestHashMap< String,String >hashMapOf()
@Multipart
@POST(POST_URL_TAG)
fun requestPostWithAuthen(@Path(POST_URL_STR,encoded = true) postUrl: String = "" , 
                          @PartMap body: HashMap<String, RequestBody> , 
                          @Header(AUTHENTICATION) authentication: String = ""): Single<JsonObject>

Parameters

NameDescriptionTypeDefault
postUrlpost url ที่ต้องการยิง requestString“”
bodybody ที่ต้องการจะแนบไปกับการยิง Request เช่น paramsHashMap< String, RequestBody >
authenticationString ที่ต้องการ Authen จะแนบไปกับการยิง RequestString“”