Api.kt 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. package com.vpn.fastestvpnservice.retrofit
  2. import com.vpn.fastestvpnservice.beans.DataResponse
  3. import com.vpn.fastestvpnservice.beans.UserResponse
  4. import retrofit2.Call
  5. import retrofit2.http.Field
  6. import retrofit2.http.FormUrlEncoded
  7. import retrofit2.http.GET
  8. import retrofit2.http.POST
  9. interface Api {
  10. @FormUrlEncoded
  11. @POST("authenticate")
  12. fun login(
  13. @Field("email") email: String?, @Field("password") password: String?,
  14. @Field("platform") platform: String?, @Field("version") version: String?,
  15. @Field("app_version") app_version: String?
  16. ): Call<Any?>
  17. @FormUrlEncoded
  18. @POST("fcm")
  19. fun sendFcmToken(
  20. @Field("device") device: String?, @Field("token") token: String?
  21. ): Call<Any>
  22. @FormUrlEncoded
  23. @POST("signup")
  24. fun signup(
  25. @Field("email") email: String?, @Field("password") password: String?, @Field("name") name: String?
  26. ): Call<Any?>
  27. @POST("logout")
  28. fun logout(): Call<Any>
  29. @POST("me/delete")
  30. fun deleteAccount(): Call<Any>
  31. @FormUrlEncoded
  32. @POST("favourites")
  33. fun setFavUnfav(
  34. @Field("server_id") serverId: String?
  35. ): Call<Any>
  36. @GET("http://ip-api.com/json")
  37. fun getIp(): Call<Any>
  38. @GET("servers")
  39. fun serverDataApi(): Call<Any>
  40. @GET("notifications")
  41. fun getNotifications(): Call<Any>
  42. @FormUrlEncoded
  43. @POST("validate")
  44. fun validatePassword(
  45. @Field("email") email: String?, @Field("password") password: String?,
  46. @Field("platform") platform: String?, @Field("version") version: String?
  47. ): Call<Any>?
  48. @GET("products")
  49. fun getProducts(): Call<Any>
  50. @FormUrlEncoded
  51. @POST("create-subscription")
  52. fun createSubscription(
  53. @Field("transaction_id") transaction_id: String?, @Field("receipt_data") receipt_data: String?,
  54. @Field("productId") productId: String?
  55. ): Call<Any>
  56. }