Browse Source

prepare broadcast options for profile/story

renovate/org.robolectric-robolectric-4.x
Austin Huang 4 years ago
parent
commit
8edac65015
No known key found for this signature in database GPG Key ID: 84C23AA04587A91F
  1. 2
      app/src/main/java/awais/instagrabber/models/enums/BroadcastItemType.kt
  2. 16
      app/src/main/java/awais/instagrabber/repositories/requests/directmessages/ProfileBroadcastOptions.kt
  3. 16
      app/src/main/java/awais/instagrabber/repositories/requests/directmessages/StoryBroadcastOptions.kt

2
app/src/main/java/awais/instagrabber/models/enums/BroadcastItemType.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
} }

16
app/src/main/java/awais/instagrabber/repositories/requests/directmessages/ProfileBroadcastOptions.kt

@ -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)
}

16
app/src/main/java/awais/instagrabber/repositories/requests/directmessages/StoryBroadcastOptions.kt

@ -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,
)
}
Loading…
Cancel
Save