2020-08-29 08:01:42 +00:00
|
|
|
package awais.instagrabber.repositories;
|
|
|
|
|
|
|
|
import java.util.Map;
|
|
|
|
|
2020-12-17 20:13:41 +00:00
|
|
|
import awais.instagrabber.repositories.responses.StoryStickerResponse;
|
2020-08-29 08:01:42 +00:00
|
|
|
import retrofit2.Call;
|
2020-12-17 20:13:41 +00:00
|
|
|
import retrofit2.http.FieldMap;
|
|
|
|
import retrofit2.http.FormUrlEncoded;
|
2020-08-29 08:01:42 +00:00
|
|
|
import retrofit2.http.GET;
|
2020-12-17 20:13:41 +00:00
|
|
|
import retrofit2.http.POST;
|
2021-01-07 12:36:33 +00:00
|
|
|
import retrofit2.http.Path;
|
2020-08-29 08:01:42 +00:00
|
|
|
import retrofit2.http.QueryMap;
|
|
|
|
import retrofit2.http.Url;
|
|
|
|
|
|
|
|
public interface StoriesRepository {
|
2020-12-25 21:40:17 +00:00
|
|
|
@GET("/api/v1/media/{mediaId}/info/")
|
2021-01-08 12:49:48 +00:00
|
|
|
Call<String> fetch(@Path("mediaId") final long mediaId);
|
2020-12-25 21:40:17 +00:00
|
|
|
// this one is the same as MediaRepository.fetch BUT you need to make sure it's a story
|
2020-08-29 08:01:42 +00:00
|
|
|
|
2020-12-29 22:33:44 +00:00
|
|
|
@GET("/api/v1/feed/reels_tray/")
|
|
|
|
Call<String> getFeedStories();
|
2020-12-20 18:35:16 +00:00
|
|
|
|
|
|
|
@GET("/api/v1/highlights/{uid}/highlights_tray/")
|
2021-01-07 12:36:33 +00:00
|
|
|
Call<String> fetchHighlights(@Path("uid") final long uid);
|
2020-08-29 08:01:42 +00:00
|
|
|
|
2020-12-29 20:19:00 +00:00
|
|
|
@GET("/api/v1/archive/reel/day_shells/")
|
|
|
|
Call<String> fetchArchive(@QueryMap Map<String, String> queryParams);
|
|
|
|
|
2020-08-29 08:01:42 +00:00
|
|
|
@GET
|
2021-01-11 21:37:34 +00:00
|
|
|
Call<String> getUserStory(@Url String url);
|
2020-12-17 20:13:41 +00:00
|
|
|
|
|
|
|
@FormUrlEncoded
|
|
|
|
@POST("/api/v1/media/{storyId}/{stickerId}/{action}/")
|
2021-01-11 21:37:34 +00:00
|
|
|
Call<StoryStickerResponse> respondToSticker(@Path("storyId") String storyId,
|
2020-12-17 20:13:41 +00:00
|
|
|
@Path("stickerId") String stickerId,
|
|
|
|
@Path("action") String action,
|
|
|
|
// story_poll_vote, story_question_response, story_slider_vote, story_quiz_answer
|
|
|
|
@FieldMap Map<String, String> form);
|
2021-03-04 17:33:59 +00:00
|
|
|
|
|
|
|
@FormUrlEncoded
|
|
|
|
@POST("/api/v2/media/seen/")
|
|
|
|
Call<String> seen(@QueryMap Map<String, String> queryParams, @FieldMap Map<String, String> form);
|
2020-08-29 08:01:42 +00:00
|
|
|
}
|