PhishNet 0.1.2
dotnet add package PhishNet --version 0.1.2
NuGet\Install-Package PhishNet -Version 0.1.2
<PackageReference Include="PhishNet" Version="0.1.2" />
paket add PhishNet --version 0.1.2
#r "nuget: PhishNet, 0.1.2"
// Install PhishNet as a Cake Addin #addin nuget:?package=PhishNet&version=0.1.2 // Install PhishNet as a Cake Tool #tool nuget:?package=PhishNet&version=0.1.2
PhishNet
A C#/.NET wrapper around the Phish.net API ...and yet another page in the Helping Friendly Book!
Installation
Add the NuGet package to your project:
$ dotnet add package PhishNet
Setup
Create 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-key
Usage
Create 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.
Models and Methods
Artist
GetArtistsAsync()
GetArtistByIdAsync(artistId)
Attendance
GetAttendanceByUserIdAsync(long userId)
GetAttendanceByUsernameAsync(string username)
GetAttendanceByShowIdAsync(long showId)
GetAttendanceByShowDateAsync(DateOnly showDate)
JamChart
(NOTE: JamCharts appear to be the same as Setlists)
GetJamChartsBySongAsync(string songSlug)
GetJamChartsByShowIdAsync(long showId)
GetJamChartsByShowDateAsync(DateOnly showDate)
Review
GetReviewsByUserIdAsync(long userId)
GetReviewsByUsernameAsync(string username)
GetReviewsByShowIdAsync(long showId)
GetReviewsByShowDateAsync(DateOnly showDate)
Setlist
GetSetlistsBySongAsync(string songSlug)
GetSetlistsByShowIdAsync(long showId)
GetSetlistsByShowDateAsync(DateOnly showDate)
Show
GetShowsAsync()
GetShowByIdAsync(long showId)
Song
GetSongsAsync()
GetSongByIdAsync(long songId)
SongData
GetSongDataAsync()
GetSongDataByIdAsync(long songId)
User
GetUserByIdAsync(long userId)
GetUserByUsernameAsync(string username)
Venue
GetVenuesAsync()
GetVenueByIdAsync(int venueId)
Todo
- Convert 404 responses into null objects or empty lists
- Console: Introduce resource caching
- Console: Support cache expiration
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net8.0 is compatible. 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. |
-
net8.0
- Microsoft.AspNetCore.WebUtilities (>= 8.0.11)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.