Example #1
0
        public async Task <ActionResult <HttpTimeline> > TimelineGet([FromRoute][GeneralTimelineName] string timeline)
        {
            var timelineId = await _service.GetTimelineIdByNameAsync(timeline);

            var t = await _service.GetTimelineAsync(timelineId);

            var result = await Map(t);

            return(result);
        }
Example #2
0
        public static async Task <List <TimelineEntity> > GetTimelineList(this ITimelineService service, IEnumerable <long> ids)
        {
            var timelines = new List <TimelineEntity>();

            foreach (var id in ids)
            {
                timelines.Add(await service.GetTimelineAsync(id));
            }
            return(timelines);
        }