Esempio n. 1
0
        public bool isUserValid(string apiKey)
        {
            var request = ConstructRedmineRequest(RedmineUrlManager.GetTicketsUrl(), apiKey);

            using (var response = request.GetResponse())
            {
                return(true);
            }
        }
Esempio n. 2
0
        public Page <Models.Ticket> GetTickets(int userID, string apiKey)
        {
            var request = ConstructRedmineRequest(RedmineUrlManager.GetTicketsUrl(new { assigned_to_id = userID, limit = 15000 }), apiKey);

            using (HttpWebResponse response = (HttpWebResponse)request.GetResponse())
            {
                using (var reader = new StreamReader(response.GetResponseStream()))
                {
                    string json = reader.ReadToEnd();

                    var tickets = Parser.ParseTicketsResult(json);

                    return(_ticketMapper.MapFromTicketResult(tickets));
                }
            }
        }
Esempio n. 3
0
 public void Get_Tickets_Url_Should_Return_A_Valid_Url()
 {
     Assert.IsNotNull(_manager.GetTicketsUrl());
 }