aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Api/LiveTv/LiveTvService.cs
diff options
context:
space:
mode:
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