AmityPostRepository

Functions

Link copied to clipboard
fun approvePost(postId: String): Completable

approves a post

Link copied to clipboard
fun createCustomPost(target: AmityPost.Target, customDataType: String, data: JsonObject, metadata: JsonObject? = null, mentionUserIds: Set<String>? = null): Single<AmityPost>

create a custom post

Link copied to clipboard
fun createFilePost(target: AmityPost.Target, files: Set<AmityFile>, text: String = "", metadata: JsonObject? = null, mentionUserIds: Set<String>? = null): Single<AmityPost>

create a file post

Link copied to clipboard
fun createImagePost(target: AmityPost.Target, images: Set<AmityImage>, text: String = "", metadata: JsonObject? = null, mentionUserIds: Set<String>? = null): Single<AmityPost>

create an image post

Link copied to clipboard
fun createLiveStreamPost(target: AmityPost.Target, streamId: String, text: String = "", metadata: JsonObject? = null, mentionUserIds: Set<String>? = null): Single<AmityPost>

create a live stream post

Link copied to clipboard
fun createPollPost(target: AmityPost.Target, pollId: String, text: String = "", metadata: JsonObject? = null, mentionUserIds: Set<String>? = null): Single<AmityPost>

create a poll post

Link copied to clipboard

Initiates a function chain to create a post.

Link copied to clipboard
fun createTextPost(target: AmityPost.Target, text: String, metadata: JsonObject? = null, mentionUserIds: Set<String>? = null): Single<AmityPost>

create a text post

Link copied to clipboard
fun createVideoPost(target: AmityPost.Target, videos: Set<AmityVideo>, text: String = "", metadata: JsonObject? = null, mentionUserIds: Set<String>? = null): Single<AmityPost>

create a video post

Link copied to clipboard
fun declinePost(postId: String): Completable

declines a post

Link copied to clipboard
fun editCustomPost(postId: String, data: JsonObject, metadata: JsonObject? = null, mentionUserIds: Set<String>? = null): Completable

edit a custom post

Link copied to clipboard

Initiates a function chain to edit a post.

Link copied to clipboard
fun flagPost(postId: String): Completable

flags a post

Link copied to clipboard
Link copied to clipboard
fun getPost(postId: String): Flowable<AmityPost>

Gets a LiveObject of post

Link copied to clipboard
fun getPostByIds(postIds: Set<String>): Flowable<List<AmityPost>>

Gets a LiveCollection of posts

Link copied to clipboard

Initiates a function chain to query for post.

Link copied to clipboard
Link copied to clipboard
fun hardDeletePost(postId: String): Completable

hard-deletes a post

Link copied to clipboard
fun isPostFlaggedByMe(postId: String): Single<Boolean>
Link copied to clipboard
Link copied to clipboard
fun softDeletePost(postId: String): Completable

soft-deletes a post

Link copied to clipboard
fun unflagPost(postId: String): Completable

unflags a post

Link copied to clipboard
fun updateCustomPost(postId: String, data: JsonObject, metadata: JsonObject? = null, mentionUserIds: Set<String>? = null): Completable

update a custom post

Link copied to clipboard

Initiates a function chain to update a post.