-
Notifications
You must be signed in to change notification settings - Fork 0
/
RadioStation.cs
46 lines (38 loc) · 1.38 KB
/
RadioStation.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
using PoLaKoSz.WeAreOne.DataAccessLayer.Web;
using PoLaKoSz.WeAreOne.Models;
using PoLaKoSz.WeAreOne.Parsers;
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
namespace PoLaKoSz.WeAreOne.EndPoints
{
/// <summary>
/// Class to access one of the WeAreOne radio station.
/// <para>This class will be removed from the public API in the 2.0 release!
/// Please use the <see cref="IRadioStation"/> interface instead!
/// </para>
/// </summary>
[Obsolete("This class will be removed from the public API in the 2.0 release!" +
" Please use the IRadioStation interface instead!", error: false)]
public class RadioStation : EndPoint, IRadioStation
{
/// <inheritdoc />
public string Name { get; }
/// <summary>
/// Initialize a new instance to access a radio.
/// </summary>
/// <param name="endPoint">Non null string.</param>
/// <param name="httpClient">Non null object to access the web.</param>
public RadioStation(string endPoint, IHttpClient httpClient)
: base(endPoint, httpClient)
{
Name = endPoint;
}
/// <inheritdoc />
public async Task<List<Music>> Tracklist()
{
string sourceCode = await base.GetAsync("tracklist");
return TracklistParser.Process(sourceCode);
}
}
}