2021-06-06 10:29:21 +00:00
|
|
|
package awais.instagrabber.repositories
|
2020-08-29 08:01:42 +00:00
|
|
|
|
2021-06-29 15:06:03 +00:00
|
|
|
import awais.instagrabber.repositories.responses.stories.ArchiveResponse
|
2021-06-29 02:34:02 +00:00
|
|
|
import awais.instagrabber.repositories.responses.stories.ReelsTrayResponse
|
|
|
|
import awais.instagrabber.repositories.responses.stories.StoryStickerResponse
|
2021-06-06 10:29:21 +00:00
|
|
|
import retrofit2.http.*
|
2020-08-29 08:01:42 +00:00
|
|
|
|
2021-06-11 23:37:22 +00:00
|
|
|
interface StoriesService {
|
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
|
2021-06-06 10:29:21 +00:00
|
|
|
@GET("/api/v1/media/{mediaId}/info/")
|
|
|
|
suspend fun fetch(@Path("mediaId") mediaId: Long): String
|
2020-08-29 08:01:42 +00:00
|
|
|
|
2020-12-29 22:33:44 +00:00
|
|
|
@GET("/api/v1/feed/reels_tray/")
|
2021-06-29 15:07:38 +00:00
|
|
|
suspend fun getFeedStories(): ReelsTrayResponse?
|
2020-12-20 18:35:16 +00:00
|
|
|
|
|
|
|
@GET("/api/v1/highlights/{uid}/highlights_tray/")
|
2021-06-29 15:07:38 +00:00
|
|
|
suspend fun fetchHighlights(@Path("uid") uid: Long): ReelsTrayResponse?
|
2020-08-29 08:01:42 +00:00
|
|
|
|
2020-12-29 20:19:00 +00:00
|
|
|
@GET("/api/v1/archive/reel/day_shells/")
|
2021-06-29 15:06:03 +00:00
|
|
|
suspend fun fetchArchive(@QueryMap queryParams: Map<String, String>): ArchiveResponse?
|
2020-12-29 20:19:00 +00:00
|
|
|
|
2020-08-29 08:01:42 +00:00
|
|
|
@GET
|
2021-06-06 10:29:21 +00:00
|
|
|
suspend fun getUserStory(@Url url: String): String
|
2020-12-17 20:13:41 +00:00
|
|
|
|
|
|
|
@FormUrlEncoded
|
|
|
|
@POST("/api/v1/media/{storyId}/{stickerId}/{action}/")
|
2021-06-06 10:29:21 +00:00
|
|
|
suspend fun respondToSticker(
|
|
|
|
@Path("storyId") storyId: String,
|
|
|
|
@Path("stickerId") stickerId: String,
|
|
|
|
@Path("action") action: String, // story_poll_vote, story_question_response, story_slider_vote, story_quiz_answer
|
|
|
|
@FieldMap form: Map<String, String>,
|
|
|
|
): StoryStickerResponse
|
2021-03-04 17:33:59 +00:00
|
|
|
|
|
|
|
@FormUrlEncoded
|
|
|
|
@POST("/api/v2/media/seen/")
|
2021-06-06 10:29:21 +00:00
|
|
|
suspend fun seen(
|
|
|
|
@QueryMap queryParams: Map<String, String>,
|
|
|
|
@FieldMap form: Map<String, String>,
|
|
|
|
): String
|
|
|
|
}
|