Added an api call to pull down user configuration

This commit is contained in:
LukePulverenti Luke Pulverenti luke pulverenti
2012-07-23 11:05:30 -04:00
parent 0a48b5e31a
commit 6c7175e33d
12 changed files with 147 additions and 20 deletions

View File

@@ -0,0 +1,18 @@
using System;
using MediaBrowser.Controller;
namespace MediaBrowser.Api.HttpHandlers
{
public class UserConfigurationHandler : JsonHandler
{
protected override object ObjectToSerialize
{
get
{
Guid userId = Guid.Parse(QueryString["userid"]);
return Kernel.Instance.ConfigurationController.GetUserConfiguration(userId);
}
}
}
}

View File

@@ -57,6 +57,7 @@
<Compile Include="HttpHandlers\RecentlyAddedItemsHandler.cs" />
<Compile Include="HttpHandlers\StudioHandler.cs" />
<Compile Include="HttpHandlers\StudiosHandler.cs" />
<Compile Include="HttpHandlers\UserConfigurationHandler.cs" />
<Compile Include="HttpHandlers\UsersHandler.cs" />
<Compile Include="ImageProcessor.cs" />
<Compile Include="HttpHandlers\MediaHandler.cs" />

View File

@@ -71,6 +71,10 @@ namespace MediaBrowser.Api
{
handler = new InProgressItemsHandler();
}
else if (localPath.EndsWith("/api/userconfiguration", StringComparison.OrdinalIgnoreCase))
{
handler = new UserConfigurationHandler();
}
if (handler != null)
{