コード例 #1
0
ファイル: BCRAPI.cs プロジェクト: jeroenwalter/ComicRackWeb
        /*
         * 
         */ 
        public static IEnumerable<Comic> GetSeries(BCRUser user, Guid id, NancyContext context)
        {
            var books = ComicRackWebViewer.Plugin.Application.GetLibraryBooks();
            var book = books.Where(x => x.Id == id).First();
            var series = books.Where(x => x.ShadowSeries == book.ShadowSeries)
                .Where(x => x.ShadowVolume == book.ShadowVolume)
                .Select(x => x.ToComic(user))
                .OrderBy(x => x.ShadowNumber).ToList();

            int totalCount = 0;
            return context.ApplyODataUriFilter(series, ref totalCount).Cast<Comic>();
        }
コード例 #2
0
ファイル: API.cs プロジェクト: kavenblog/ComicRackWeb
 public static List GetSeries(Guid id, NancyContext context)
 {
     var books = Plugin.Application.GetLibraryBooks();
     var book = books.Where(x => x.Id == id).First();
     var series = books.Where(x => x.Series == book.Series)
         .Where(x => x.Volume == book.Volume)
         .Select(x => x.ToComic())
         .OrderBy(x => x.Number).ToList();
     return new List
     {
         Comics = context.ApplyODataUriFilter(series).Cast<Comic>(),
         Name = book.Series
     };
 }
コード例 #3
0
ファイル: API.cs プロジェクト: kavenblog/ComicRackWeb
 public static List GetIssuesOfList(string name, NancyContext context)
 {
     var list = GetLists(Program.Database.ComicLists).FirstOrDefault(x => x.Name == name);
     if (list == null)
     {
         return new List
         {
             Comics = Enumerable.Empty<Comic>(),
             Name = name
         };
     }
     return new List
     {
         Comics = context.ApplyODataUriFilter(list.GetBooks().Select(x => x.ToComic())).Cast<Comic>(),
         Name = name
     };
 }