Method | Method detail |
---|---|
getVideoReportOptions() | Convenient getter method to report option data set, so users can choose and send with postReport setter method. |
submitVideoReport() | Convenient setter method to report a post data set. |
postContentReport() | Convenient setter method to report a comment data set. |
getContentReportOptions() | Convenient getter method to report comment list data set, so user can choose which comment he has to hide or show as reported. |
Requested parameter.
This getter method does not accept any parameter.
ReportData.sharedInstance.getVideoReportOptions( success: { VideoReportModel in
//VideoReportModel.data //Content metadata to use in further in report option list to bind with model and view
}, failure: { [weak self] error in
guard let weakSelf = self else { return }
// Action for Fail
})
// Requested parameter.
/*
Method will help to submit report
// Call to submit report on user
*/
userId: Loggedin userid
actingUserId: User is which has created post
assetId: postid
Reason: Selected reason which we have selected from reason api
ReportData.sharedInstance.submitVideoReport(userId:"7bae3c9cdc78",
actingUserId: "e872faa75753",
assetId: "231ba72f123c",
reason: "Scam") {result in
print(result)
} failure: {error, code in
print(error)
print(code)
// Do something with error and code
}
// Call to submit report on comment
Requested parameter.
userId: Loggedin userid
Reason : selected reason
Event: comment
actingUserId: User is which has created post
assetId: postid
postIs: Selected post video id
ReportData.sharedInstance.postContentReport(userId: "7bae3c9cdc78",
actingUserId: "e872faa75753",
reason: "spam or fraud",
event: "report",
type: "comment",
postId: "") {result in
print( result?.reason as Any)
} failure: {error, code in
print( error)
print(code)
}
Requested parameter.
This getter method does not accept any parameter.
// Call to get comment reports user methods
ReportData.sharedInstance.getContentReportOptions( success: { reports in
print(reports as Any) //reports //Content metadata to use in further in report option list to bind with model and view
}, failure: {error,code in
// Action for Fail
print(error)
print(code)
})