public bool isUserValid(string apiKey) { var request = ConstructRedmineRequest(RedmineUrlManager.GetTicketsUrl(), apiKey); using (var response = request.GetResponse()) { return(true); } }
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)); } } }
public void Get_Tickets_Url_Should_Return_A_Valid_Url() { Assert.IsNotNull(_manager.GetTicketsUrl()); }