TVShowTracker API is a service that allows users to track TV shows, seasons, and episodes. It integrates with The Movie Database (TMDb) to fetch show information and provides user authentication and watchlist functionality.
- Fetch top TV shows
- Get detailed information about TV shows, seasons, and episodes
- Search for TV shows
- User registration and authentication
- User profile management
- Watchlist functionality to track watched episodes
GET /api/shows/top
: Get top TV showsGET /api/shows/{id}
: Get details of a specific TV showPUT /api/shows/{id}
: Update a TV showGET /api/shows/{showId}/season/{seasonNumber}
: Get season detailsGET /api/shows/{showId}/season/{seasonNumber}/episode/{episodeNumber}
: Get episode detailsGET /api/shows/search
: Search for TV showsDELETE /api/shows/{cacheKey}
: Clear cachePOST /api/shows
: Add a new TV show
POST /api/users/register
: Register a new userPOST /api/users/login
: User loginGET /api/users/profile
: Get user profilePUT /api/users/profile
: Update user profilePUT /api/users/change-password
: Change user passwordDELETE /api/users
: Delete user account
GET /api/watchlist
: Get user's watched episodesPOST /api/watchlist/{episodeId}
: Mark an episode as watchedDELETE /api/watchlist/{episodeId}
: Remove an episode from watchlistGET /api/watchlist/{episodeId}/in-watchlist
: Check if an episode is in the watchlist
- TVShows
- Seasons
- Episodes
- Users
- WatchedEpisodes
- The API is built using ASP.NET Core
- It uses AutoMapper for object mapping
- The TMDb API is used as an external service to fetch TV show data
- Caching is implemented to improve performance
- JWT authentication is used for user authorization
- Clone the repository
- Set up your TMDb API key in the configuration
- Configure the database connection string
- Run database migrations
- Build and run the project
Set Connection String appsettings.json
{
"ConnectionStrings": {
"SqlDbConnection": "Data Source=localhost;initial catalog=tvshowtracker;TrustServerCertificate=True;Trusted_Connection=True;"
}
}
Ensure you have the following settings in your appsettings.json
:
{
"TMDbOptions": {
"ApiKey": "your_tmdb_api_key",
"BaseUrl": "https://api.themoviedb.org/3/",
"ReadAccessToken": "your_read_access_token"
}
}