public static string SetSettings2(this YStation station, YStationSettings2 settings)
 {
     return(station.Context.API.Radio.SetStationSettings2(station.Context.Storage, station, settings).Result);
 }
 public static List <YSequenceItem> GetTracks(this YStation station, string prevTrackId = "")
 {
     return(station.Context.API.Radio.GetStationTracks(station.Context.Storage, station, prevTrackId).Result.Sequence);
 }
Esempio n. 3
0
 /// <summary>
 /// Установка настроек подбора треков
 /// </summary>
 /// <param name="storage">Хранилище</param>
 /// <param name="station">Радиостанция</param>
 /// <param name="settings">Настройки</param>
 /// <returns></returns>
 public YResponse <string> SetStationSettings2(AuthStorage storage, YStation station, YStationSettings2 settings)
 {
     return(SetStationSettings2Async(storage, station, settings).GetAwaiter().GetResult());
 }
Esempio n. 4
0
 /// <summary>
 /// Установка настроек подбора треков
 /// </summary>
 /// <param name="storage">Хранилище</param>
 /// <param name="station">Радиостанция</param>
 /// <param name="settings">Настройки</param>
 /// <returns></returns>
 public async Task <YResponse <string> > SetStationSettings2Async(AuthStorage storage, YStation station, YStationSettings2 settings)
 {
     return(await new YSetSettings2Request(api, storage)
            .Create(station.Station, settings)
            .GetResponseAsync <YResponse <string> >());
 }
Esempio n. 5
0
 /// <summary>
 /// Получение последовательности треков радиостанции
 /// </summary>
 /// <param name="storage">Хранилище</param>
 /// <param name="station">Радиостанция</param>
 /// <returns></returns>
 public YResponse <YStationSequence> GetStationTracks(AuthStorage storage, YStation station, string prevTrackId = "")
 {
     return(GetStationTracksAsync(storage, station, prevTrackId).GetAwaiter().GetResult());
 }
Esempio n. 6
0
 /// <summary>
 /// Получение последовательности треков радиостанции
 /// </summary>
 /// <param name="storage">Хранилище</param>
 /// <param name="station">Радиостанция</param>
 /// <returns></returns>
 public async Task <YResponse <YStationSequence> > GetStationTracksAsync(AuthStorage storage, YStation station, string prevTrackId = "")
 {
     return(await new YGetStationTracksRequest(api, storage)
            .Create(station.Station, prevTrackId)
            .GetResponseAsync <YResponse <YStationSequence> >());
 }