aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Api/LiveTv/LiveTvService.cs
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2013-11-27 14:04:19 -0500
committerLuke Pulverenti <luke.pulverenti@gmail.com>2013-11-27 14:04:19 -0500
commit1e9ffb83cf060bf2f755cd5a62782209eaaa6a4b (patch)
tree33b33879b288f80663bcf747b4bebca4888b4909 /MediaBrowser.Api/LiveTv/LiveTvService.cs
parent6e3b8420baeca7fce91979a78ccff48457ac82e6 (diff)
added live tv timers page
Diffstat (limited to 'MediaBrowser.Api/LiveTv/LiveTvService.cs')
-rw-r--r--MediaBrowser.Api/LiveTv/LiveTvService.cs23
1 files changed, 23 insertions, 0 deletions
diff --git a/MediaBrowser.Api/LiveTv/LiveTvService.cs b/MediaBrowser.Api/LiveTv/LiveTvService.cs
index db50f463d..2961c920f 100644
--- a/MediaBrowser.Api/LiveTv/LiveTvService.cs
+++ b/MediaBrowser.Api/LiveTv/LiveTvService.cs
@@ -57,6 +57,17 @@ namespace MediaBrowser.Api.LiveTv
public string ChannelId { get; set; }
}
+ [Route("/LiveTv/Timers", "GET")]
+ [Api(Description = "Gets live tv timers")]
+ public class GetTimers : IReturn<QueryResult<TimerInfoDto>>
+ {
+ [ApiMember(Name = "ServiceName", Description = "Optional filter by service.", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "GET")]
+ public string ServiceName { get; set; }
+
+ [ApiMember(Name = "ChannelId", Description = "Optional filter by channel id.", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "GET")]
+ public string ChannelId { get; set; }
+ }
+
[Route("/LiveTv/Programs", "GET")]
[Api(Description = "Gets available live tv epgs..")]
public class GetPrograms : IReturn<QueryResult<ProgramInfoDto>>
@@ -153,5 +164,17 @@ namespace MediaBrowser.Api.LiveTv
return ToOptimizedResult(result);
}
+
+ public object Get(GetTimers request)
+ {
+ var result = _liveTvManager.GetTimers(new TimerQuery
+ {
+ ChannelId = request.ChannelId,
+ ServiceName = request.ServiceName
+
+ }, CancellationToken.None).Result;
+
+ return ToOptimizedResult(result);
+ }
}
} \ No newline at end of file