Skip to content

josago97/RadioBrowserNet

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RadioBrowserNet

license NuGet version (Sharplus) downloads

A .NET wrapper for https://www.radio-browser.info/
Documentation for the API can be found here

Samples

Simple search

RadioBrowserClient client = new RadioBrowserClient();
StationInfo[] stations = await client.Stations.SearchByNameAsync("station name");
RadioBrowserClient client = new RadioBrowserClient();
ExtendedQueryOptions options = new ExtendedQueryOptions()
{
    Order = "votes",
    Reverse = true
};
StationInfo[] stations = await client.Stations.SearchByNameAsync("station name", options: options);
StationInfo mostVoted = stations.First();
Console.WriteLine(mostVoted.Name);

Advanced search

To use advanced search use AdvancedSearchOptions

RadioBrowserClient client = new RadioBrowserClient();
StationInfo[] stations = await client.Stations.AdvancedSearchAsync(new AdvancedSearchOptions
{
    Language = "spanish",
    Codec = "mp3",
    TagList = "80s",
    Limit = 10
});

Lists

// All countries
RadioBrowserClient client = new RadioBrowserClient();
CountryInfo[] countries = await client.Lists.GetCountriesAsync();
// Codecs containing the 'm' character
RadioBrowserClient client = new RadioBrowserClient();
CodecInfo[] codecs = await client.List.GetCodecsAsync("m");

Other

// Vote station
RadioBrowserClient client = new RadioBrowserClient();
ActionResult result = await client.Stations.VoteAsync("station uuid");
// Click station
RadioBrowserClient client = new RadioBrowserClient();
ClickResult result = await client.Stations.ClickAsync("station uuid");

Releases

No releases published

Packages

No packages published

Languages