SetlistNet 2.1.0

dotnet add package SetlistNet --version 2.1.0
                    
NuGet\Install-Package SetlistNet -Version 2.1.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="SetlistNet" Version="2.1.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="SetlistNet" Version="2.1.0" />
                    
Directory.Packages.props
<PackageReference Include="SetlistNet" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add SetlistNet --version 2.1.0
                    
#r "nuget: SetlistNet, 2.1.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#addin nuget:?package=SetlistNet&version=2.1.0
                    
Install as a Cake Addin
#tool nuget:?package=SetlistNet&version=2.1.0
                    
Install as a Cake Tool

setlist.fm API .NET Core library

C# library to interact with setlist.fm API. It's currently supports all methods listed in the REST Endpoints section, such as setlists search or getting artist by MBID.

Usage

Get the key

First of all, apply for the setlist.fm API key. It's needed for all requests.

Search for setlists

SetlistApi api = new SetlistApi(apiKey);
Setlists setlists = api.SearchSetlists(new Setlist()
{
  // Search for Foo Fighters' setlists of 2004.
  Artist = new Artist("foo fighters"),
  EventDate = "00-00-2004"
});

if (setlists.Count > 0)
{
  // A setlist consists of Sets
  foreach (Set set in setlists[0].Sets)
  {
    // A set can be an encore
    if (set.EncoreSpecified)
      Console.WriteLine("---");
    // ...or can have a special name
    if (!string.IsNullOrEmpty(set.Name))
      Console.WriteLine(set.Name);

    // A set consists of Songs
    foreach (Song song in set.Songs)
    {
      Console.WriteLine(song.Name);
    }
  }

  // You can also use this method for text representation of the setlist
  Util.SetlistToText(setlists[0]);
}

So, you must provide search criteria as Setlist object in this case.

Every search method has a description which says what properties of given object will become part of the search query. Not all properties are necessary, for example: Url or Info.

Search for artists

Artists artists = api.SearchArtists(new Artist("muse"));
foreach (Artist artist in artists)
{
  Console.Write(artist.Name);

  // There may be several performers with the same name - use "Disambiguation" property
  // to get SetlistFM notes and distinguish the right one.
  if (!string.IsNullOrEmpty(artist.Disambiguation))
    Console.Write(", " + artist.Disambiguation);

  // Or simply use this:
  Console.WriteLine(artist.NameWithDisambiguation);
  // It will show just the name of the Artist if there's no disambiguation.
}

Same here. If you want to search for artists (or anything else, because it works the same way), you must provide Artist object with necessary properties.

Internationalization

This feature listed as "experimental" by official documentation and does not work for all cities. However, for the rest of it, you can get localized cities and countries names. The default language is English (en), but you can provide any of the languages Spanish (es), French (fr), German (de), Portuguese (pt), Turkish (tr), Italian (it) or Polish (pl).

SetlistApi api = new SetlistApi(apiKey, "en");
var setlist = api.Setlist("23f6dc3b");
Console.WriteLine(setlist.Venue.City.Name + ", " + setlist.Venue.City.Country.Name);
// Output: New York, United States

// If you pass "es" to the constructor, you will get
api = new SetlistApi(apiKey, "es");
setlist = api.Setlist("23f6dc3b");
Console.WriteLine(setlist.Venue.City.Name + ", " + setlist.Venue.City.Country.Name);
// Output: Nueva York, Estados Unidos

More examples coming soon...

Installation

Nuget: https://www.nuget.org/packages/SetlistNet/

Tests

Coming soon.

Issues and contributions

...are welcome.

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
.NET Core netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.1 is compatible. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
2.1.0 130 6/4/2025
2.0.1 138 6/4/2025
2.0.0-beta.2 106 2/5/2025
2.0.0-beta.1 75 2/4/2025
1.1.0 704 5/5/2020
1.0.1 620 8/22/2019
1.0.0 594 8/22/2019