Browse Source
prepare broadcast options for profile/story
renovate/org.robolectric-robolectric-4.x
Austin Huang
4 years ago
No known key found for this signature in database
GPG Key ID: 84C23AA04587A91F
3 changed files with
34 additions and
0 deletions
-
app/src/main/java/awais/instagrabber/models/enums/BroadcastItemType.kt
-
app/src/main/java/awais/instagrabber/repositories/requests/directmessages/ProfileBroadcastOptions.kt
-
app/src/main/java/awais/instagrabber/repositories/requests/directmessages/StoryBroadcastOptions.kt
|
@ -10,4 +10,6 @@ enum class BroadcastItemType(val value: String) { |
|
|
VOICE("share_voice"), |
|
|
VOICE("share_voice"), |
|
|
ANIMATED_MEDIA("animated_media"), |
|
|
ANIMATED_MEDIA("animated_media"), |
|
|
MEDIA_SHARE("media_share"), |
|
|
MEDIA_SHARE("media_share"), |
|
|
|
|
|
PROFILE("profile"), |
|
|
|
|
|
STORY("story_share"), // not reply |
|
|
} |
|
|
} |
|
@ -0,0 +1,16 @@ |
|
|
|
|
|
package awais.instagrabber.repositories.requests.directmessages |
|
|
|
|
|
|
|
|
|
|
|
import awais.instagrabber.models.enums.BroadcastItemType |
|
|
|
|
|
|
|
|
|
|
|
class ProfileBroadcastOptions( |
|
|
|
|
|
clientContext: String, |
|
|
|
|
|
threadIdsOrUserIds: ThreadIdsOrUserIds, |
|
|
|
|
|
val profileId: String |
|
|
|
|
|
) : BroadcastOptions( |
|
|
|
|
|
clientContext, |
|
|
|
|
|
threadIdsOrUserIds, |
|
|
|
|
|
BroadcastItemType.PROFILE |
|
|
|
|
|
) { |
|
|
|
|
|
override val formMap: Map<String, String> |
|
|
|
|
|
get() = mapOf("profile_user_id" to profileId) |
|
|
|
|
|
} |
|
@ -0,0 +1,16 @@ |
|
|
|
|
|
package awais.instagrabber.repositories.requests.directmessages |
|
|
|
|
|
|
|
|
|
|
|
import awais.instagrabber.models.enums.BroadcastItemType |
|
|
|
|
|
|
|
|
|
|
|
class StoryBroadcastOptions( |
|
|
|
|
|
clientContext: String, |
|
|
|
|
|
threadIdsOrUserIds: ThreadIdsOrUserIds, |
|
|
|
|
|
val mediaId: String, |
|
|
|
|
|
val reelId: String |
|
|
|
|
|
) : BroadcastOptions(clientContext, threadIdsOrUserIds, BroadcastItemType.STORY) { |
|
|
|
|
|
override val formMap: Map<String, String> |
|
|
|
|
|
get() = mapOf( |
|
|
|
|
|
"story_media_id" to mediaId, |
|
|
|
|
|
"reel_id" to reelId, |
|
|
|
|
|
) |
|
|
|
|
|
} |