/// <summary> /// Retrieve additional comments omitted from a base comment tree. /// When a comment tree is rendered, the most relevant comments are selected for display first. /// Remaining comments are stubbed out with "MoreComments" links. /// This API call is used to retrieve the additional comments represented by those stubs, up to 100 at a time. /// The two core parameters required are link and children. link is the fullname of the link whose comments are being fetched. /// children is a comma-delimited list of comment ID36s that need to be fetched. /// If id is passed, it should be the ID of the MoreComments object this call is replacing. This is needed only for the HTML UI's purposes and is optional otherwise. /// NOTE: you may only make one request at a time to this API endpoint. Higher concurrency will result in an error being returned. /// If limit_children is True, only return the children requested. /// </summary> /// <param name="linksAndCommentsMoreChildrenInput">A valid LinksAndCommentsMoreChildrenInput instance</param> /// <returns>The requested comments.</returns> public MoreChildren MoreChildren(LinksAndCommentsMoreChildrenInput linksAndCommentsMoreChildrenInput) { MultipleResponseContainer res = SendRequest <MultipleResponseContainer>("api/morechildren", linksAndCommentsMoreChildrenInput); MoreChildren moreChildren = new MoreChildren(); if (res != null && res.JSON != null && res.JSON.Data != null) { foreach (DynamicListingChild child in res.JSON.Data.Things) { switch (child.Kind) { case "t1": moreChildren.Comments.Add(JsonConvert.DeserializeObject <Comment>(JsonConvert.SerializeObject(child.Data))); break; case "more": moreChildren.MoreData.Add(JsonConvert.DeserializeObject <More>(JsonConvert.SerializeObject(child.Data))); break; } } } return(moreChildren); }
/// <summary> /// Retrieve additional comments omitted from a base comment tree. /// When a comment tree is rendered, the most relevant comments are selected for display first. /// Remaining comments are stubbed out with "MoreComments" links. /// This API call is used to retrieve the additional comments represented by those stubs, up to 100 at a time. /// The two core parameters required are link and children. link is the fullname of the link whose comments are being fetched. /// children is a comma-delimited list of comment ID36s that need to be fetched. /// If id is passed, it should be the ID of the MoreComments object this call is replacing. This is needed only for the HTML UI's purposes and is optional otherwise. /// NOTE: you may only make one request at a time to this API endpoint. Higher concurrency will result in an error being returned. /// If limit_children is True, only return the children requested. /// </summary> /// <param name="linksAndCommentsMoreChildrenInput">A valid LinksAndCommentsMoreChildrenInput instance</param> /// <returns>The requested comments.</returns> public Things.MoreChildren MoreChildren(LinksAndCommentsMoreChildrenInput linksAndCommentsMoreChildrenInput) { linksAndCommentsMoreChildrenInput.link_id = ParentFullname; return(Validate(Dispatch.LinksAndComments.MoreChildren(linksAndCommentsMoreChildrenInput))); }
/// <summary> /// Retrieve additional comments omitted from a base comment tree. /// When a comment tree is rendered, the most relevant comments are selected for display first. /// Remaining comments are stubbed out with "MoreComments" links. /// This API call is used to retrieve the additional comments represented by those stubs, up to 100 at a time. /// The two core parameters required are link and children. link is the fullname of the link whose comments are being fetched. /// children is a comma-delimited list of comment ID36s that need to be fetched. /// If id is passed, it should be the ID of the MoreComments object this call is replacing. This is needed only for the HTML UI's purposes and is optional otherwise. /// NOTE: you may only make one request at a time to this API endpoint. Higher concurrency will result in an error being returned. /// If limit_children is True, only return the children requested. /// </summary> /// <param name="linksAndCommentsMoreChildrenInput">A valid LinksAndCommentsMoreChildrenInput instance</param> /// <returns>The requested comments.</returns> public Things.MoreChildren MoreChildren(LinksAndCommentsMoreChildrenInput linksAndCommentsMoreChildrenInput) { return(Validate(Dispatch.LinksAndComments.MoreChildren(linksAndCommentsMoreChildrenInput))); }