/// <summary> /// Report a reply as spam, offensive, etc. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='replyHandle'> /// Reply handle for the reply being reported on /// </param> /// <param name='postReportRequest'> /// Post report request /// </param> /// <param name='authorization'> /// Format is: "Scheme CredentialsList". Possible values are: /// /// - Anon AK=AppKey /// /// - SocialPlus TK=SessionToken /// /// - Facebook AK=AppKey|TK=AccessToken /// /// - Google AK=AppKey|TK=AccessToken /// /// - Twitter AK=AppKey|RT=RequestToken|TK=AccessToken /// /// - Microsoft AK=AppKey|TK=AccessToken /// /// - AADS2S AK=AppKey|[UH=UserHandle]|TK=AADToken /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <object> PostReportAsync(this IReplyReports operations, string replyHandle, PostReportRequest postReportRequest, string authorization, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.PostReportWithHttpMessagesAsync(replyHandle, postReportRequest, authorization, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Report a reply as spam, offensive, etc. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='replyHandle'> /// Reply handle for the reply being reported on /// </param> /// <param name='postReportRequest'> /// Post report request /// </param> /// <param name='authorization'> /// Format is: "Scheme CredentialsList". Possible values are: /// /// - Anon AK=AppKey /// /// - SocialPlus TK=SessionToken /// /// - Facebook AK=AppKey|TK=AccessToken /// /// - Google AK=AppKey|TK=AccessToken /// /// - Twitter AK=AppKey|RT=RequestToken|TK=AccessToken /// /// - Microsoft AK=AppKey|TK=AccessToken /// /// - AADS2S AK=AppKey|[UH=UserHandle]|TK=AADToken /// </param> public static object PostReport(this IReplyReports operations, string replyHandle, PostReportRequest postReportRequest, string authorization) { return(Task.Factory.StartNew(s => ((IReplyReports)s).PostReportAsync(replyHandle, postReportRequest, authorization), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }