Amity Post Repository
class AmityPostRepository
Functions
Link copied to clipboard
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
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
Link copied to clipboard
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
hard-deletes a post
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
soft-deletes a post
Link copied to clipboard
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.