andyshon

API endpoints

May 10th, 2020
142
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 6.08 KB | None | 0 0
  1.     @POST("api/auth/login")
  2.     Call<UserResponse> loginUser(@Body UserLoginRequest userLoginRequest);
  3.  
  4.     @POST("api/auth/register")
  5.     Call<UserResponse> registrationUser(@Body UserCreateAccRequest userCreateAccRequest);
  6.  
  7.     @POST("api/auth/facebook")
  8.     Call<UserResponse> registrationUserWithFacebook(@Body TokenFacebook token);
  9.  
  10.     @POST("api/auth/google")
  11.     Call<UserResponse> registrationUserWithGoolge(@Body TokenGoogle token);
  12.  
  13.     @GET("api/programs")
  14.     Call<MainResponse> getAllPrograms(@Header("Authorization") String token);
  15.  
  16.     @POST("api/auth/password/reset")
  17.     Call<ResponseBody> resetPassword(@Body RequestBody body);
  18.  
  19.     @POST("api/auth/password/redirect/{hash}")
  20.     Call<ResponseBody> createNewPassword(@Path("hash") String hash, @Body RequestBody body);
  21.  
  22.     @GET("api/me")
  23.     Call<UserResponse> getMyProfile(@Header("Authorization") String token);
  24.  
  25.     @Headers({"Content-Type: application/json"})
  26.     @PUT("api/me")
  27.     Call<UserResponse> updateMyProfile(@Header("Authorization") String token, @Body UserResponse newData);
  28.  
  29.     @GET("api/auth/refresh")
  30.     Call<ResponseBody> updateToken(@Header("Authorization") String token);
  31.  
  32.     @POST("api/meditations/{id}/report")
  33.     Call<ResponseBody> markDone(@Header("Authorization") String string, @Path("id") long sessionId, @Body RequestBody duration);
  34.  
  35.     @Multipart
  36.     @POST("api/me/avatar")
  37.     Call<ResponseBody> updateAvatar(@Header("Authorization") String token, @Part MultipartBody.Part part);
  38.  
  39.     @GET("api/notification/schedule")
  40.     Call<ReminderModel> getReminder(@Header("Authorization") String token);
  41.  
  42.     @POST("api/notification/schedule")
  43.     Call<ReminderModel> createReminder(@Header("Authorization") String string, @Body ReminderModel reminderModel);
  44.  
  45.     @PUT("api/notification/schedule")
  46.     Call<ReminderModel> updateReminder(@Header("Authorization") String string, @Body ReminderModel reminderModel);
  47.  
  48.     @GET("api/notification")
  49.     Call<ReminderRandomNotification> getRandomNotification(@Header("Authorization") String token);
  50.  
  51.     @GET("api/sessions/{id}/download")
  52.     Call<DownloadModel> downloadSessionsById(@Header("Authorization") String token, @Path("id") long sessionId);
  53.  
  54.     @GET("api/statistics")
  55.     Call<GetStatisticResponse> getStatistic(@Header("Authorization") String token);
  56.  
  57.     @Headers({"Content-Type: application/json"})
  58.     @POST("api/statistics/full-calendar")
  59.     Call<GetCalendarResponse> getStatisticCalendar(@Header("Authorization") String token, @Body RequestBody body);
  60.  
  61.     @GET("api/sessions/{id}/offline-play")
  62.     Call<OfflineResponce> getSessionOffline(@Header("Authorization") String token, @Path("id") long sessionId);
  63.  
  64.     @POST("api/sessions/offline-play/report")
  65.     Call<ResponseBody> sendOfflinePlay(@Header("Authorization") String token, @Body RequestBody body);
  66.  
  67.     @PUT("/api/me/password")
  68.     Call<ResponseBody> changePassword(@Header("Authorization") String token, @Body UserPassword newPassword);
  69.  
  70.  
  71.     @Headers({"Content-Type: application/json"})
  72.     @POST("api/invites/generate")
  73.     Call<InviteResponse> sendInviteVia(@Header("Authorization") String token, @Body RequestBody invite);
  74.  
  75.     @POST("api/programs/{id}/clicks")
  76.     Call<ResponseBody> clickOnPremiumProgram(@Header("Authorization") String token, @Path("id") long programId);
  77.  
  78.  
  79.  
  80.  
  81.     @Headers({"Content-Type: application/json"})
  82.     @POST("api/invites/link")
  83.     Call<ResponseBody> inviteLinkAfterRegistration(@Header("Authorization") String token, @Body ReferrerInvite invite);
  84.  
  85.     @Headers({"Content-Type: application/json"})
  86.     @PUT("api/me/premium-news/subscription")
  87.     Call<ResponseBody> putPremiumNews(@Header("Authorization") String token, @Body RequestBody invite);
  88.  
  89.     @Headers({"Content-Type: application/json"})
  90.     @PUT("api/me/newsletter/subscription")
  91.     Call<ResponseBody> putNewsLetter(@Header("Authorization") String token, @Body RequestBody invite);
  92.  
  93.     @GET("/api/payments/payment-plans")
  94.     Call<PriceResponse> getSubscriptionsPrice(@Header("Authorization") String token, @Query("country_code") String countryCode, @Query("coupon") String coupon);
  95.  
  96.     @POST("/api/payments/gift-codes/activate")
  97.     Call<ApplyGiftResponse> getGiftCodeStatus(@Header("Authorization") String token, @Body RequestBody code);
  98.  
  99.     @POST("/api/payments/gift-codes/create")
  100.     Call<GiftCoupon> getGiftCoupon(@Header("Authorization") String token, @Body RequestBody itemId);
  101.  
  102. //    @POST("api/payments/send-code")
  103. //    Call<ResponseBody> getPremiumCoupon(@Header("Authorization") String token, @Body RequestBody itemId);
  104.  
  105.     @POST("api/payments/subscriptions")
  106.     Call<ResponseBody> buyPremium(@Header("Authorization") String token, @Body RequestBody itemCard);
  107.  
  108.     @POST("/api/payments/subscriptions/cancel")
  109.     Call<ResponseBody> cancelSubscription(@Header("Authorization") String token);
  110.  
  111.     @POST("/api/payments/subscriptions/swap")
  112.     Call<ResponseBody> swapSubscription(@Header("Authorization") String token, @Body RequestBody planId);
  113.  
  114.     @POST("/api/payments/cards")
  115.     Call<CardInfo> addDefaultCard(@Header("Authorization") String token, @Body RequestBody tokenCard);
  116.  
  117.     @GET("/api/payments/cards")
  118.     Call<List<DefaultCards>> getDefaultCards(@Header("Authorization") String token);
  119.  
  120.     @PUT("/api/payments/cards/{id}")
  121.     Call<ResponseBody> updateDefaultCard(@Header("Authorization") String token, @Path("id") String cardId );
  122.  
  123.     @DELETE("/api/payments/cards/{id}")
  124.     Call<ResponseBody> deleteDefaultCard(@Header("Authorization") String token, @Path("id") String cardId );
  125.  
  126.     @GET("/api/payments/gift-codes-prices")
  127.     Call<PriceResponse> getGiftCodesPrices(@Header("Authorization") String token, @Query("country_code") String countryCode, @Query("coupon") String coupon);
  128.  
  129.     @POST("api/payments/gift-codes/{id}/send")
  130.     Call<ShareGiftResponse> shareGift(@Header("Authorization") String token, @Path("id") String giftId, @Body RequestBody request);
  131.  
  132.     @GET("/api/payments/charges")
  133.     Call<HistoryResponse> getHistory(@Header("Authorization") String token);
  134.  
  135.     @GET("/api/versions")
  136.     Call<VersionResponse> getAppVersions();
Add Comment
Please, Sign In to add comment