/// <summary> /// The export events. /// </summary> /// <returns> /// The <see cref="FileResult"/>. /// </returns> public FileResult ExportEvents() { PagedOwnedEvents pagedEvents = EventServices.GetMyEvents(); CsvActionResult <Event> events = new CsvActionResult <Event>(pagedEvents.Events, "my_events.csv"); return(events); }
/// <summary> /// The get my events. /// </summary> /// <returns> /// The <see cref="PagedOwnedEvents"/>. /// </returns> public static PagedOwnedEvents GetMyEvents() { const string Url = "users/{0}/owned_events/"; PagedOwnedEvents events = CallApi <PagedOwnedEvents>(string.Format(Url, ConfigurationManager.AppSettings["EventBriteUserId"])).Result; return(events); }
/// <summary> /// The index. /// </summary> /// <returns> /// The <see cref="ActionResult"/>. /// </returns> public ActionResult Index() { PagedOwnedEvents myEvents = EventServices.GetMyEvents(); HomeViewModel viewModel = new HomeViewModel { MyEvents = myEvents }; return(this.View(viewModel)); }