namespace Yw.Application
|
{
|
/// <summary>
|
/// BimfaceTool
|
/// </summary>
|
[Route("Bimface/Tool")]
|
[ApiDescriptionSettings("Bimface", Name = "工具(Std)", Order = 10000)]
|
public class BimfaceTool_Controller : IDynamicApiController
|
{
|
|
/// <summary>
|
/// 获取账号
|
/// </summary>
|
[Route("GetAccount@V1.0")]
|
[HttpGet]
|
public BimfaceAccountDto GetAccount()
|
{
|
return new BimfaceAccountDto() { AppKey = ConfigHelper.AppKey, AppSecret = ConfigHelper.AppSecret };
|
}
|
|
/// <summary>
|
/// 获取ViewToken
|
/// </summary>
|
[Route("GetViewToken@V1.0")]
|
[HttpGet]
|
public string GetViewToken([FromQuery][Required] GetViewTokenInput input)
|
{
|
var client = Yw.BimfaceClient.GetClient(ConfigHelper.AppKey, ConfigHelper.AppSecret);
|
if (client == null)
|
{
|
throw YOops.Oh(eResultCode.Alert, InternalErrorCodes.V001, "Bimface 账户错误");
|
}
|
return client.GetViewToken(input.BimfaceId, input.ModelIdType);
|
}
|
}
|
}
|