using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
namespace AliAPIForBLV.Controllers
{
public class HomeController : Controller
{
public ActionResult Index()
{
ViewBag.Title = "Home Page";
return View();
}
///
/// 上报自定义场景
///
///
///
///
///
public ActionResult PostCustomScene(string accessKeyId, string accessKeySecret, string jsonData)
{
AliAPI.APIResultEntity apiResult = AliAPI.AliOpenApiHelper.PostCustomScene(accessKeyId, accessKeySecret, jsonData);
return Json(apiResult, JsonRequestBehavior.AllowGet);
}
///
/// 退房重置
///
///
///
///
///
public ActionResult CheckoutWithAK(string accessKeyId, string accessKeySecret, string jsonData)
{
AliAPI.APIResultEntity apiResult = AliAPI.AliOpenApiHelper.CheckoutWithAK(accessKeyId, accessKeySecret, jsonData);
return Json(apiResult, JsonRequestBehavior.AllowGet);
}
///
/// 推送并直接播报欢迎词
///
///
///
///
///
public ActionResult PushWelcome(string accessKeyId, string accessKeySecret, string jsonData)
{
AliAPI.APIResultEntity apiResult = AliAPI.AliOpenApiHelper.PushWelcome(accessKeyId, accessKeySecret, jsonData);
return Json(apiResult, JsonRequestBehavior.AllowGet);
}
///
/// 设置欢迎词
///
///
///
///
///
public ActionResult AddOrUpdateWelcomeText(string accessKeyId, string accessKeySecret, string jsonData)
{
AliAPI.APIResultEntity apiResult = AliAPI.AliOpenApiHelper.AddOrUpdateWelcomeText(accessKeyId, accessKeySecret, jsonData);
return Json(apiResult, JsonRequestBehavior.AllowGet);
}
///
/// 推送欢迎词
///
///
///
///
///
public ActionResult PushWelcomeTextAndMusic(string accessKeyId, string accessKeySecret, string jsonData)
{
AliAPI.APIResultEntity apiResult = AliAPI.AliOpenApiHelper.PushWelcomeTextAndMusic(accessKeyId, accessKeySecret, jsonData);
return Json(apiResult, JsonRequestBehavior.AllowGet);
}
}
}