private static void GetCommentsByAnswerIds() { CommentsQuery p = new CommentsQuery { Site = NetworkSiteEnum.StackOverflow }; IBridgeResponseCollection<Comment> comments = client.GetAnswersComments(new long[] { }, p); Console.WriteLine(comments.First().CommentId); }
public void CommentsQueryConstructorTest() { string queryUri = "http://www.google.com/test"; string expected = "http://www.google.com/test?kind=comment"; CommentsQuery target = new CommentsQuery(queryUri); Assert.AreEqual(new Uri(expected), target.Uri); }
private static void GetComments() { CommentsQuery p = new CommentsQuery { Site = NetworkSiteEnum.StackOverflow }; IBridgeResponseCollection <Comment> comments = client.GetComments(p); Console.WriteLine(comments.First().CommentId); }
/// <summary> /// Returns the comments a single photo based on /// the default user, the albumid and the photoid /// </summary> /// <param name="albumId">The Id of the Album</param> /// <param name="photoId">The id of the photo</param> /// <returns></returns> public Feed <Comment> GetComments(string albumId, string photoId) { CommentsQuery q = PrepareQuery <CommentsQuery>(PicasaQuery.CreatePicasaUri(Utilities.DefaultUser, albumId, photoId)); return(PrepareFeed <Comment>(q)); }
/// <summary> /// Makes a request to API method /me/mentioned /// <para>Documentation can be found following the link below:</para> /// <para>https://api.stackexchange.com/docs/me-mentioned</para> /// </summary> /// <param name="parameters">The request parameters.</param> /// <returns>Returns the comments the authenticated user were mentioned in.</returns> public IBridgeResponseCollection <Comment> GetMyMentions(CommentsQuery parameters = null) { return(GetApiResultCollection <Comment, CommentsQuery>(ApiMethodEnum.MyMentions, parameters)); }
/// <summary> /// Makes a request to API method /me/comments/{toid} /// <para>Documentation can be found following the link below:</para> /// <para>https://api.stackexchange.com/docs/me-comments-to</para> /// </summary> /// <param name="toId">The user who's mentioned (being replied to). {toid} parameter.</param> /// <param name="parameters">The request parameters.</param> /// <returns>Returns the comments the authenticated user posted in reply to the single user identified by <paramref name="toId"/>.</returns> public IBridgeResponseCollection <Comment> GetMyCommentsInReplyTo(long toId, CommentsQuery parameters = null) { return(GetApiResultCollection <Comment, CommentsQuery>(ApiMethodEnum.MyCommentsTo, CreateNamedVector("{toid}", new[] { toId }), parameters)); }
public void CommentsQueryConstructorTest1() { CommentsQuery target = new CommentsQuery(); Assert.IsNotNull(target); }