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

40 lines
1.5 KiB
Kotlin
Raw Normal View History

package awais.instagrabber.repositories
2020-08-29 08:01:42 +00:00
import awais.instagrabber.repositories.responses.stories.ArchiveResponse
import awais.instagrabber.repositories.responses.stories.ReelsTrayResponse
import awais.instagrabber.repositories.responses.stories.StoryStickerResponse
import retrofit2.http.*
2020-08-29 08:01:42 +00:00
interface StoriesService {
// this one is the same as MediaRepository.fetch BUT you need to make sure it's a story
@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
@GET("/api/v1/archive/reel/day_shells/")
suspend fun fetchArchive(@QueryMap queryParams: Map<String, String>): ArchiveResponse?
2020-08-29 08:01:42 +00:00
@GET
suspend fun getUserStory(@Url url: String): String
@FormUrlEncoded
@POST("/api/v1/media/{storyId}/{stickerId}/{action}/")
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/")
suspend fun seen(
@QueryMap queryParams: Map<String, String>,
@FieldMap form: Map<String, String>,
): String
}