Skip to content

Instantly share code, notes, and snippets.

@ferPrieto
Created June 30, 2020 01:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ferPrieto/42f87762aee417e9b19d1257d6a0e63b to your computer and use it in GitHub Desktop.
Save ferPrieto/42f87762aee417e9b19d1257d6a0e63b to your computer and use it in GitHub Desktop.
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