Skip to content

robot-jones/PhishNet

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

A C#/.NET wrapper around the Phish.net API

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages