Add server api definition

This commit is contained in:
2025-05-24 19:54:06 +02:00
commit a80465c6c1
37 changed files with 3842 additions and 0 deletions

View File

@@ -0,0 +1,16 @@
using Microsoft.AspNetCore.Mvc;
using MusicCast.Net.Api.Server.Models;
namespace MusicCast.Net.Api.Server.Controllers;
[ApiController]
[Route("/YamahaExtendedControl/v1/dist/")]
public class DistController
{
[HttpGet]
[Route("getDistributionInfo")]
public GetDistributionInfoResponse GetDistributionInfo()
{
throw new NotImplementedException();
}
}

View File

@@ -0,0 +1,59 @@
using Microsoft.AspNetCore.Mvc;
using MusicCast.Net.Api.Server.Models;
namespace MusicCast.Net.Api.Server.Controllers;
[ApiController]
[Route("/YamahaExtendedControl/v1/main/")]
public class MainController
{
[HttpGet]
[Route("getStatus")]
public GetStatusResponse GetStatus()
{
throw new NotImplementedException();
}
[HttpGet]
[Route("getSignalInfo")]
public GetSignalInfoResponse GetSignalInfo()
{
throw new NotImplementedException();
}
[HttpGet]
[Route("setVolume")]
public BaseResponse SetVolume([FromQuery] int volume)
{
throw new NotImplementedException();
}
[HttpGet]
[Route("prepareInputChange")]
public BaseResponse PrepareInputChange([FromQuery] string input)
{
throw new NotImplementedException();
}
[HttpGet]
[Route("setInput")]
public BaseResponse SetInput([FromQuery] string input)
{
throw new NotImplementedException();
}
[EndpointSummary("Shutdown after the specified interval in minutes")]
[HttpGet]
[Route("setSleep")]
public BaseResponse SetSleep([FromQuery] int sleep)
{
throw new NotImplementedException();
}
[HttpGet]
[Route("setPower")]
public BaseResponse SetPower([FromQuery] PowerState power)
{
throw new NotImplementedException();
}
}

View File

@@ -0,0 +1,124 @@
using Microsoft.AspNetCore.Mvc;
using MusicCast.Net.Api.Server.Models;
namespace MusicCast.Net.Api.Server.Controllers;
[ApiController]
[Route("/YamahaExtendedControl/v1/netusb/")]
public class NetUsbController
{
[HttpGet]
[Route("getMcPlaylistName")]
public GetMcPlaylistNameResponse GetMcPlaylistName()
{
throw new NotImplementedException();
}
[HttpGet]
[Route("getStreamingServiceSettings")]
public GetStreamingServiceSettingsResponse GetStreamingServiceSettings()
{
throw new NotImplementedException();
}
[HttpGet]
[Route("getPlayInfo")]
public GetPlayInfoResponse GetPlayInfo()
{
throw new NotImplementedException();
}
[HttpGet]
[Route("getPlayQueue")]
public GetPlayQueueResponse GetPlayQueue([FromQuery] int index)
{
throw new NotImplementedException();
}
[HttpGet]
[Route("getRecentInfo")]
public GetRecentInfoResponse GetRecentInfo()
{
throw new NotImplementedException();
}
[HttpGet]
[Route("recallRecentItem")]
public BaseResponse RecallRecentItem([FromQuery] string zone, [FromQuery] int num)
{
throw new NotImplementedException();
}
[HttpGet]
[Route("setPlayback")]
public BaseResponse SetPlayback([FromQuery] PlaybackAction playback)
{
throw new NotImplementedException();
}
[HttpGet]
[Route("toggleShuffle")]
public BaseResponse ToggleShuffle()
{
throw new NotImplementedException();
}
[HttpGet]
[Route("toggleRepeat")]
public BaseResponse ToggleRepeat()
{
throw new NotImplementedException();
}
[HttpGet]
[Route("getListInfo")]
public GetListInfoResponse GetListInfo([FromQuery] string list_id, [FromQuery] string input, [FromQuery] int size, [FromQuery] string lang)
{
throw new NotImplementedException();
}
[HttpGet]
[Route("setListControl")]
public BaseResponse SetListControl([FromQuery] ListControlAction type, [FromQuery] int index, [FromQuery] string zone)
{
throw new NotImplementedException();
}
[HttpGet]
[Route("manageList")]
public BaseResponse ManageList(
[FromQuery] string list_id,
[FromQuery] ManageListAction type,
[FromQuery] int index,
[FromQuery] int timeout,
[FromQuery] string zone
)
{
throw new NotImplementedException();
}
[HttpGet]
[Route("managePlayQueue")]
public BaseResponse ManagePlayQueue(
[FromQuery] ManagePlayQueueAction type,
[FromQuery] int index,
[FromQuery] string zone
)
{
throw new NotImplementedException();
}
[HttpGet]
[Route("copyPlayQueue")]
public BaseResponse CopyPlayQueue([FromQuery] int index)
{
throw new NotImplementedException();
}
[HttpGet]
[Route("movePlayQueueItem")]
public BaseResponse MovePlayQueueItem([FromQuery] int from, [FromQuery] int to)
{
throw new NotImplementedException();
}
}

View File

@@ -0,0 +1,95 @@
using Microsoft.AspNetCore.Mvc;
using MusicCast.Net.Api.Server.Models;
namespace MusicCast.Net.Api.Server.Controllers;
[ApiController]
[Route("/YamahaExtendedControl/v1/system/")]
public class SystemController : ControllerBase
{
[HttpGet]
[Route("getFeatures")]
[EndpointSummary("Get the available features for this device")]
public GetFeaturesResponse GetFeatures()
{
throw new NotImplementedException();
}
[HttpGet]
[Route("getLocationInfo")]
public GetLocationInfoResponse GetLocationInfo()
{
throw new NotImplementedException();
}
[HttpGet]
[Route("getNameText")]
[EndpointSummary("Get sources friendly names")]
public GetNameTextResponse GetNameText()
{
throw new NotImplementedException();
}
[HttpGet]
[Route("getDeviceInfo")]
public GetDeviceInfoResponse GetDeviceInfo()
{
throw new NotImplementedException();
}
[HttpGet]
[Route("isNewFirmwareAvailable")]
public IsNewFirmwareAvailableResponse IsNewFirmwareAvailable([FromQuery] string type)
{
throw new NotImplementedException();
}
[HttpGet]
[Route("getFuncStatus")]
public GetFuncStatusResponse GetFuncStatus()
{
throw new NotImplementedException();
}
[HttpGet]
[Route("getDisklavierSettings")]
public GetDisklavierSettingsResponse GetDisklavierSettings()
{
throw new NotImplementedException();
}
[HttpGet]
[Route("getTag")]
public GetTagResponse GetTag()
{
throw new NotImplementedException();
}
[HttpGet]
[Route("getYpaoConfig")]
public GetYpaoConfigResponse GetYpaoConfig()
{
throw new NotImplementedException();
}
[HttpGet]
[Route("setSpeakerA")]
public BaseResponse setSpeakerA([FromQuery] bool enable)
{
throw new NotImplementedException();
}
[HttpGet]
[Route("setSpeakerB")]
public BaseResponse setSpeakerB([FromQuery] bool enable)
{
throw new NotImplementedException();
}
[HttpGet]
[Route("getNetworkStandby")]
public GetNetworkStandbyResponse GetNetworkStandby()
{
throw new NotImplementedException();
}
}