|
|
|
@ -3,6 +3,7 @@ using IoTNode.DeviceServices.Onvif;
|
|
|
|
|
using Microsoft.AspNetCore.Mvc;
|
|
|
|
|
using Swashbuckle.AspNetCore.Annotations;
|
|
|
|
|
using System;
|
|
|
|
|
using System.ComponentModel.DataAnnotations;
|
|
|
|
|
|
|
|
|
|
namespace IoTNode.Controllers
|
|
|
|
|
{
|
|
|
|
@ -17,7 +18,7 @@ namespace IoTNode.Controllers
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[HttpGet, Route("/[controller]/[action]"), SwaggerOperation("截屏")]
|
|
|
|
|
public ApiResponse ScreenShot([SwaggerParameter("设备编号")]string number)
|
|
|
|
|
public ApiResponse ScreenShot([SwaggerParameter("设备编号"), Required] string number)
|
|
|
|
|
{
|
|
|
|
|
return this.Action(() =>
|
|
|
|
|
{
|
|
|
|
@ -32,7 +33,7 @@ namespace IoTNode.Controllers
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[HttpGet, Route("/[controller]/[action]"), SwaggerOperation("上")]
|
|
|
|
|
public ApiResponse Up([SwaggerParameter("设备编号")]string number)
|
|
|
|
|
public ApiResponse Up([SwaggerParameter("设备编号"), Required] string number)
|
|
|
|
|
{
|
|
|
|
|
return this.AsyncAction(() =>
|
|
|
|
|
{
|
|
|
|
@ -41,7 +42,7 @@ namespace IoTNode.Controllers
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[HttpGet, Route("/[controller]/[action]"), SwaggerOperation("下")]
|
|
|
|
|
public ApiResponse Down([SwaggerParameter("设备编号")]string number)
|
|
|
|
|
public ApiResponse Down([SwaggerParameter("设备编号"), Required] string number)
|
|
|
|
|
{
|
|
|
|
|
return this.AsyncAction(() =>
|
|
|
|
|
{
|
|
|
|
@ -50,7 +51,7 @@ namespace IoTNode.Controllers
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[HttpGet, Route("/[controller]/[action]"), SwaggerOperation("左")]
|
|
|
|
|
public ApiResponse Left([SwaggerParameter("设备编号")]string number)
|
|
|
|
|
public ApiResponse Left([SwaggerParameter("设备编号"), Required] string number)
|
|
|
|
|
{
|
|
|
|
|
return this.AsyncAction(() =>
|
|
|
|
|
{
|
|
|
|
@ -59,7 +60,7 @@ namespace IoTNode.Controllers
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[HttpGet, Route("/[controller]/[action]"), SwaggerOperation("右")]
|
|
|
|
|
public ApiResponse Right([SwaggerParameter("设备编号")]string number)
|
|
|
|
|
public ApiResponse Right([SwaggerParameter("设备编号"), Required] string number)
|
|
|
|
|
{
|
|
|
|
|
return this.AsyncAction(() =>
|
|
|
|
|
{
|
|
|
|
@ -68,7 +69,7 @@ namespace IoTNode.Controllers
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[HttpGet, Route("/[controller]/[action]"), SwaggerOperation("大")]
|
|
|
|
|
public ApiResponse Zoomin([SwaggerParameter("设备编号")]string number)
|
|
|
|
|
public ApiResponse Zoomin([SwaggerParameter("设备编号"), Required] string number)
|
|
|
|
|
{
|
|
|
|
|
return this.AsyncAction(() =>
|
|
|
|
|
{
|
|
|
|
@ -77,7 +78,7 @@ namespace IoTNode.Controllers
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[HttpGet, Route("/[controller]/[action]"), SwaggerOperation("小")]
|
|
|
|
|
public ApiResponse Zoomout([SwaggerParameter("设备编号")]string number)
|
|
|
|
|
public ApiResponse Zoomout([SwaggerParameter("设备编号"), Required] string number)
|
|
|
|
|
{
|
|
|
|
|
return this.AsyncAction(() =>
|
|
|
|
|
{
|
|
|
|
@ -86,7 +87,7 @@ namespace IoTNode.Controllers
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[HttpGet, Route("/[controller]/[action]"), SwaggerOperation("停")]
|
|
|
|
|
public ApiResponse Stop([SwaggerParameter("设备编号")]string number)
|
|
|
|
|
public ApiResponse Stop([SwaggerParameter("设备编号"), Required] string number)
|
|
|
|
|
{
|
|
|
|
|
return this.AsyncAction(() =>
|
|
|
|
|
{
|
|
|
|
@ -95,7 +96,7 @@ namespace IoTNode.Controllers
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[HttpGet, Route("/[controller]/[action]"), SwaggerOperation("开始推流")]
|
|
|
|
|
public ApiResponse StartPush([SwaggerParameter("设备编号")]string number)
|
|
|
|
|
public ApiResponse StartPush([SwaggerParameter("设备编号"), Required] string number)
|
|
|
|
|
{
|
|
|
|
|
return this.AsyncAction(() =>
|
|
|
|
|
{
|
|
|
|
@ -104,7 +105,7 @@ namespace IoTNode.Controllers
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[HttpGet, Route("/[controller]/[action]"), SwaggerOperation("停止推流")]
|
|
|
|
|
public ApiResponse StopPush([SwaggerParameter("设备编号")]string number)
|
|
|
|
|
public ApiResponse StopPush([SwaggerParameter("设备编号"), Required] string number)
|
|
|
|
|
{
|
|
|
|
|
return this.AsyncAction(() =>
|
|
|
|
|
{
|
|
|
|
@ -113,7 +114,7 @@ namespace IoTNode.Controllers
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[HttpGet, Route("/[controller]/[action]"), SwaggerOperation("开始录制")]
|
|
|
|
|
public ApiResponse StartRecord([SwaggerParameter("设备编号")]string number)
|
|
|
|
|
public ApiResponse StartRecord([SwaggerParameter("设备编号"), Required] string number)
|
|
|
|
|
{
|
|
|
|
|
return this.AsyncAction(() =>
|
|
|
|
|
{
|
|
|
|
@ -122,7 +123,7 @@ namespace IoTNode.Controllers
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[HttpGet, Route("/[controller]/[action]"), SwaggerOperation("停止录制")]
|
|
|
|
|
public ApiResponse StopRecord([SwaggerParameter("设备编号")]string number)
|
|
|
|
|
public ApiResponse StopRecord([SwaggerParameter("设备编号"), Required] string number)
|
|
|
|
|
{
|
|
|
|
|
return this.AsyncAction(() =>
|
|
|
|
|
{
|
|
|
|
|