Api.kt 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  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. @FormUrlEncoded
  57. @POST("forgot-password")
  58. fun forgotPassword(
  59. @Field("email") email: String?
  60. ): Call<Any>
  61. @FormUrlEncoded
  62. @POST("update-password")
  63. fun changePassword(
  64. @Field("current_password") current_password: String?,
  65. @Field("new_password") new_password: String?,
  66. @Field("confirm_password") confirm_password: String?
  67. ): Call<Any>
  68. @FormUrlEncoded
  69. @POST("email-us")
  70. fun emailUs(
  71. @Field("message") message: String?,
  72. ): Call<Any>
  73. }