Skip to content

Instantly share code, notes, and snippets.

@ferPrieto
Created June 30, 2020 01:02
Embed
What would you like to do?
This class represents all of the different Instagram Errors as example
sealed class InstagramErrorType : InstagramErrorContent {
data class DeclinePost(
override val photoVideoUrl: String,
override val tags: List<String>,
override val errorCode: ErrorCode,
val textContent: String,
val location: String
) : InstagramErrorType()
data class TooLongVideoPost(
override val photoVideoUrl: String,
override val tags: List<String>,
override val errorCode: ErrorCode,
val textContent: String,
val location: String
) : InstagramErrorType()
data class TimeoutStory(
override val photoVideoUrl: String,
override val tags: List<String>,
override val errorCode: ErrorCode,
val texts: List<String>
) : InstagramErrorType()
data class TooShortIGTvPost(
override val photoVideoUrl: String,
override val tags: List<String>,
override val errorCode: ErrorCode,
val textContent: String
) : InstagramErrorType()
data class TimeOutIGTvPost(
override val photoVideoUrl: String,
override val tags: List<String>,
override val errorCode: ErrorCode,
val textContent: String
) : InstagramErrorType()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment