summaryrefslogtreecommitdiffstats
path: root/ComicRackWebViewer/Modules/API.cs
diff options
context:
space:
mode:
authorJeroen Walter <jeroen@enormkansloos.nl>2012-08-04 20:21:29 +0200
committerJeroen Walter <jeroen@enormkansloos.nl>2012-08-04 20:21:29 +0200
commit25571d3846b3a6dba728e437f65b6e99db7f1c95 (patch)
tree74c36ae2630fcee46d453d49a669eb8b0b8c3710 /ComicRackWebViewer/Modules/API.cs
parent05cff6f167f97568e8df58154b97f5cdbde1728f (diff)
downloadComicRackWeb-25571d3846b3a6dba728e437f65b6e99db7f1c95.zip
ComicRackWeb-25571d3846b3a6dba728e437f65b6e99db7f1c95.tar.gz
ComicRackWeb-25571d3846b3a6dba728e437f65b6e99db7f1c95.tar.bz2
- extended the web api interface
- ComicBook properties can now be set via the web api
Diffstat (limited to 'ComicRackWebViewer/Modules/API.cs')
-rw-r--r--ComicRackWebViewer/Modules/API.cs15
1 files changed, 14 insertions, 1 deletions
diff --git a/ComicRackWebViewer/Modules/API.cs b/ComicRackWebViewer/Modules/API.cs
index 58dd58f..e775275 100644
--- a/ComicRackWebViewer/Modules/API.cs
+++ b/ComicRackWebViewer/Modules/API.cs
@@ -47,7 +47,6 @@ namespace ComicRackWebViewer
}
return new BooksList
{
- //Comics = context.ApplyODataUriFilter(list.GetBooks().Select(x => x.ToComic())).Cast<Comic>(),
Comics = list.GetBooks().Select(x => x.ToComic()),
Id = id
};
@@ -203,6 +202,20 @@ namespace ComicRackWebViewer
return null;
}
}
+
+ public static ComicBook GetComicBook(Guid id)
+ {
+ try
+ {
+ var comic = GetComics().First(x => x.Id == id);
+ return comic;
+ }
+ catch(Exception e)
+ {
+ //MessageBox.Show(e.ToString());
+ return null;
+ }
+ }
public static IQueryable<ComicBook> GetComics()
{