/// <summary>
        /// Get a list of issues that match one or more search queries.
        /// </summary>
        /// <remarks>Uses the REST API <a href="https://www.jetbrains.com/help/youtrack/standalone/Get-the-List-of-Issues.html">Get Issues</a>.</remarks>
        /// <returns>The <see cref="Issue" /> list that matches the requested</returns>
        public async Task <IEnumerable <Issue> > GetListIssues(IIssueQueryBuilder builder = null)
        {
            var url     = IssuesUrls.GetIssues();
            var request = new YouTrackRestRequest(url, Method.GET);

            if (builder != null)
            {
                foreach (var param in builder.GetQueryParameters())
                {
                    request.AddQueryParameter(param.Key, param.Value);
                }
            }


            var response = await RestClient.ExecuteTaskAsync <IssueCollectionWrapper>(request);

            return(response.Data.Issues);
        }
        /// <summary>
        /// Get all issues by project
        /// </summary>
        ///<remarks>Uses the REST API <a href="https://www.jetbrains.com/help/youtrack/standalone/Get-Issues-in-a-Project.html">Get Issues in a Project</a>.</remarks>
        /// <param name="projectId">ProjectID of a project to get issues from.</param>
        /// <returns>The <see cref="Issue" /> list that matches the requested <paramref name="projectId"/>.</returns>
        /// <exception cref="T:System.ArgumentNullException">When the <paramref name="projectId"/> is null or empty.</exception>
        /// <exception cref="T:System.Net.HttpRequestException">When the call to the remote YouTrack server instance failed.</exception>
        public async Task <IEnumerable <Issue> > GetIssuesByProject(string projectId, IIssueQueryBuilder builder = null)
        {
            if (string.IsNullOrEmpty(projectId))
            {
                throw new ArgumentNullException(nameof(projectId));
            }

            var url     = IssuesUrls.GetIssuesByProject(projectId);
            var request = new YouTrackRestRequest(url, Method.GET);

            if (builder != null)
            {
                foreach (var param in builder.GetQueryParameters())
                {
                    request.AddQueryParameter(param.Key, param.Value);
                }
            }

            var response = await RestClient.ExecuteTaskAsync <List <Issue> >(request);

            return(response.Data);
        }