/// <summary> /// Report a user as spam, offensive, etc. /// </summary> /// This call allows a user to complain about another user's profile content /// (photo, bio, name) as containing spam, offensive material, etc. /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='userHandle'> /// User handle 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 IUserReports operations, string userHandle, PostReportRequest postReportRequest, string authorization, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.PostReportWithHttpMessagesAsync(userHandle, postReportRequest, authorization, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Report a user as spam, offensive, etc. /// </summary> /// This call allows a user to complain about another user's profile content /// (photo, bio, name) as containing spam, offensive material, etc. /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='userHandle'> /// User handle 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 IUserReports operations, string userHandle, PostReportRequest postReportRequest, string authorization) { return(Task.Factory.StartNew(s => ((IUserReports)s).PostReportAsync(userHandle, postReportRequest, authorization), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }