A C#/.NET wrapper around the Phish.net API ...and yet another page in the Helping Friendly Book!
Add the NuGet package to your project:
$ dotnet add package PhishNetCreate a .env file in the root of your project and add the following line, replacing your-api-key with your actual API key:
PHISH_NET_API_KEY=your-api-keyCreate an instance of the PhishNetClient class, and use it to make requests to the Phish.net API.
var client = new PhishNetClient();
var showDate = DateOnly.Parse("1998-07-29");
var setlist = await client.GetSetlistsByShowDateAsync(showDate);See the PhishNet.Console project for more examples, including a simple cache implementation.
GetArtistsAsync()
GetArtistByIdAsync(artistId)
GetAttendanceByUserIdAsync(long userId)
GetAttendanceByUsernameAsync(string username)
GetAttendanceByShowIdAsync(long showId)
GetAttendanceByShowDateAsync(DateOnly showDate)
(NOTE: JamCharts appear to be the same as Setlists)
GetJamChartsBySongAsync(string songSlug)
GetJamChartsByShowIdAsync(long showId)
GetJamChartsByShowDateAsync(DateOnly showDate)
GetReviewsByUserIdAsync(long userId)
GetReviewsByUsernameAsync(string username)
GetReviewsByShowIdAsync(long showId)
GetReviewsByShowDateAsync(DateOnly showDate)
GetSetlistsBySongAsync(string songSlug)
GetSetlistsByShowIdAsync(long showId)
GetSetlistsByShowDateAsync(DateOnly showDate)
GetShowsAsync()
GetShowByIdAsync(long showId)
GetSongsAsync()
GetSongByIdAsync(long songId)
GetSongDataAsync()
GetSongDataByIdAsync(long songId)
GetUserByIdAsync(long userId)
GetUserByUsernameAsync(string username)
GetVenuesAsync()
GetVenueByIdAsync(int venueId)
- Convert 404 responses into null objects or empty lists
- Console: Introduce resource caching
- Console: Support cache expiration