BarInsta/app/src/main/java/awais/instagrabber/repositories/StoriesRepository.kt

44 lines
1.6 KiB
Kotlin
Raw Normal View History

2020-08-29 08:01:42 +00:00
package awais.instagrabber.repositories;
import java.util.Map;
import awais.instagrabber.repositories.responses.StoryStickerResponse;
2020-08-29 08:01:42 +00:00
import retrofit2.Call;
import retrofit2.http.FieldMap;
import retrofit2.http.FormUrlEncoded;
2020-08-29 08:01:42 +00:00
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.Path;
2020-08-29 08:01:42 +00:00
import retrofit2.http.QueryMap;
import retrofit2.http.Url;
public interface StoriesRepository {
@GET("/api/v1/media/{mediaId}/info/")
Call<String> fetch(@Path("mediaId") final long mediaId);
// 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/")
Call<String> fetchHighlights(@Path("uid") final long uid);
2020-08-29 08:01:42 +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);
@FormUrlEncoded
@POST("/api/v1/media/{storyId}/{stickerId}/{action}/")
2021-01-11 21:37:34 +00:00
Call<StoryStickerResponse> respondToSticker(@Path("storyId") String storyId,
@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
}