/// <summary> /// Get comments for a topic /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='topicHandle'> /// Topic handle /// </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='cursor'> /// Current read cursor /// </param> /// <param name='limit'> /// Number of items to return /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <FeedResponseCommentView> GetTopicCommentsAsync(this ITopicComments operations, string topicHandle, string authorization, string cursor = default(string), int?limit = default(int?), CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.GetTopicCommentsWithHttpMessagesAsync(topicHandle, authorization, cursor, limit, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Create a new comment /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='topicHandle'> /// Topic handle /// </param> /// <param name='request'> /// Post comment 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 <PostCommentResponse> PostCommentAsync(this ITopicComments operations, string topicHandle, PostCommentRequest request, string authorization, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.PostCommentWithHttpMessagesAsync(topicHandle, request, authorization, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Get comments for a topic /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='topicHandle'> /// Topic handle /// </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='cursor'> /// Current read cursor /// </param> /// <param name='limit'> /// Number of items to return /// </param> public static FeedResponseCommentView GetTopicComments(this ITopicComments operations, string topicHandle, string authorization, string cursor = default(string), int?limit = default(int?)) { return(Task.Factory.StartNew(s => ((ITopicComments)s).GetTopicCommentsAsync(topicHandle, authorization, cursor, limit), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }
/// <summary> /// Create a new comment /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='topicHandle'> /// Topic handle /// </param> /// <param name='request'> /// Post comment 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 PostCommentResponse PostComment(this ITopicComments operations, string topicHandle, PostCommentRequest request, string authorization) { return(Task.Factory.StartNew(s => ((ITopicComments)s).PostCommentAsync(topicHandle, request, authorization), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }