Save Post
The LikeMinds iOS feed SDK provides "Save Post" feature. You can integrate it in your iOS app to enhance user experience by allowing them to bookmark and revisit their favorite posts at their convenience. Enable seamless content curation, empowering users to organize and access valuable information with ease.
Steps to save a post
- Create a SavePostRequest object using
SavePostRequest.builder()
class by passing all the required parameters. - Call
savePost()
function using the instance ofLMFeedClient
. - Process the response LMResponse<NoData> as per your requirement.
// object of SavePostRequest
let request = SavePostRequest.builder()
.postId(ENTER_POST_ID) // id of the post to be saved
.build()
LMFeedClient.shared.savePost(request) { response in
// response (LMResponse<NoData>)
if (response.success) {
// your function to process post saved action
processResponse()
} else {
// your function to process error message
processError(response.errorMessage)
}
}
Models
SavePostRequest
VARIABLE | TYPE | DESCRIPTION | OPTIONAL |
---|---|---|---|
postId | String | Unique id of the post saved. |