public ActionResult Tickets(string space, string secret) { _api = new Assembla.Api(_apiKey, secret); var tickets = _api.GetTicketsForSpace(space); ViewData["space"] = space; return View(tickets.OrderBy(x => x.Summary)); }
// // GET: /Specifications/ public ActionResult Index(string subdomain, string space, string username, string password) { var assemblaApi = new Assembla.Api(username, password); var tickets = assemblaApi.GetTicketsForSpace(subdomain ?? "www", space); ViewData["space"] = space; return View(tickets); }
public ActionResult Delete(string space, string secret) { _api = new Assembla.Api(_apiKey, secret); var tickets = _api.GetTicketsForSpace(space).Select(x => x.Number).ToList(); foreach(var t in tickets) { try { _api.DeleteTicket(space, t); } catch (Exception) { } } return RedirectToAction("Tickets", new {space, secret}); }