/// <summary> /// Gets the wiki page. /// </summary> /// <param name="projectId">The project identifier.</param> /// <param name="parameters">The parameters.</param> /// <param name="pageName">Name of the page.</param> /// <param name="version">The version.</param> /// <returns></returns> public WikiPage GetWikiPage(string projectId, NameValueCollection parameters, string pageName, uint version = 0) { var url = UrlHelper.GetWikiPageUrl(this, projectId, parameters, pageName, version); return(WebApiHelper.ExecuteDownload <WikiPage>(this, url, "GetWikiPage", parameters)); }
/// <summary> /// Gets the redmine object based on id. /// </summary> /// <typeparam name="T">The type of objects to retrieve.</typeparam> /// <param name="id">The id of the object.</param> /// <param name="parameters">Optional filters and/or optional fetched data.</param> /// <returns> /// Returns the object of type T. /// </returns> /// <exception cref="System.InvalidOperationException"> /// An error occurred during deserialization. The original exception is available /// using the System.Exception.InnerException property. /// </exception> /// <code> /// <example> /// string issueId = "927"; /// NameValueCollection parameters = null; /// Issue issue = redmineManager.GetObject<Issue>(issueId, parameters); /// </example> /// </code> public T GetObject <T>(string id, NameValueCollection parameters) where T : class, new() { var url = UrlHelper.GetGetUrl <T>(this, id); return(WebApiHelper.ExecuteDownload <T>(this, url, "GetObject", parameters)); }
/// <summary> /// Returns the user whose credentials are used to access the API. /// </summary> /// <param name="parameters">The accepted parameters are: memberships and groups (added in 2.1).</param> /// <returns></returns> /// <exception cref="System.InvalidOperationException"> /// An error occurred during deserialization. The original exception is available /// using the System.Exception.InnerException property. /// </exception> public User GetCurrentUser(NameValueCollection parameters = null) { var url = UrlHelper.GetCurrentUserUrl(this); return(WebApiHelper.ExecuteDownload <User>(this, url, "GetCurrentUser", parameters)); }