first push

This commit is contained in:
2025-05-06 10:37:33 -04:00
parent 2b1ec3ee26
commit 74efad656a
35 changed files with 1686 additions and 0 deletions
+56
View File
@@ -0,0 +1,56 @@
using System.Text.Json.Serialization;
namespace MovieActorLookup.Models
{
public class Actor(string name)
{
[JsonPropertyName("name")]
public string Name { get; set; } = name;
[JsonPropertyName("movie_cast")]
public List<MovieCharacter> MovieCharacters { get; set; } = new();
[JsonPropertyName("tv_cast")]
public List<TvCharacter> TvCharacters { get; set; } = new();
}
public class MovieCharacter
{
[JsonPropertyName("title")]
public string MovieTitle { get; set; }
[JsonPropertyName("character")]
public string CharacterName { get; set; }
[JsonPropertyName("poster_path")]
public string MoviePosterPath { get; set; }
[JsonPropertyName("overview")]
public string Overview { get; set; }
[JsonPropertyName("release_date")]
public string ReleaseDate { get; set; }
public string Franchise { get; set; }
}
public class TvCharacter
{
[JsonPropertyName("name")]
public string ShowTitle { get; set; }
[JsonPropertyName("character")]
public string CharacterName { get; set; }
[JsonPropertyName("poster_path")]
public string ShowPosterPath { get; set; }
[JsonPropertyName("overview")]
public string Overview { get; set; }
[JsonPropertyName("first_air_date")]
public string FirstAirDate { get; set; }
public string Franchise { get; set; }
}
}
+16
View File
@@ -0,0 +1,16 @@
namespace MovieActorLookup.Models
{
public class ActorViewModel
{
public string ActorName { get; set; }
public string ActorProfilePath { get; set; }
public List<MovieCharacterInfo> MovieCharacterInfos { get; set; } = new List<MovieCharacterInfo>();
}
public class MovieCharacterInfo
{
public string MovieTitle { get; set; }
public string CharacterName { get; set; }
public string MoviePosterPath { get; set; }
}
}
+60
View File
@@ -0,0 +1,60 @@
using System.Text.Json.Serialization;
namespace MovieActorLookup.Models
{
public class Credits
{
[JsonPropertyName("id")]
public int Id { get; set; }
[JsonPropertyName("cast")]
public List<CastMember> Cast { get; set; }
public Credits() { }
public Credits(int id, List<CastMember> cast)
{
Id = id;
Cast = cast;
}
}
public class CastMember
{
[JsonPropertyName("adult")]
public bool Adult { get; set; }
[JsonPropertyName("gender")]
public int Gender { get; set; }
[JsonPropertyName("id")]
public int Id { get; set; }
[JsonPropertyName("known_for_department")]
public string KnownForDepartment { get; set; }
[JsonPropertyName("name")]
public string Name { get; set; }
[JsonPropertyName("original_name")]
public string OriginalName { get; set; }
[JsonPropertyName("popularity")]
public double Popularity { get; set; }
[JsonPropertyName("profile_path")]
public string ProfilePath { get; set; }
[JsonPropertyName("cast_id")]
public int CastId { get; set; }
[JsonPropertyName("character")]
public string Character { get; set; }
[JsonPropertyName("credit_id")]
public string CreditId { get; set; }
[JsonPropertyName("order")]
public int Order { get; set; }
}
}
@@ -0,0 +1,25 @@
using System.Text.Json.Serialization;
namespace MovieActorLookup.Models.Movie.Movie
{
public class ActorMovieFilmography
{
[JsonPropertyName("cast")]
public List<MovieRole> Cast { get; set; }
}
public class MovieRole
{
[JsonPropertyName("id")]
public int Id { get; set; }
[JsonPropertyName("title")]
public string Title { get; set; }
[JsonPropertyName("character")]
public string Character { get; set; }
[JsonPropertyName("poster_path")]
public string PosterPath { get; set; }
}
}
+98
View File
@@ -0,0 +1,98 @@
using System.Text.Json.Serialization;
namespace MovieActorLookup.Models.Movies
{
public class Movie
{
[JsonPropertyName("id")]
public int Id { get; set; }
[JsonPropertyName("title")]
public string? Title { get; set; }
[JsonPropertyName("original_title")]
public string? OriginalTitle { get; set; }
[JsonPropertyName("overview")]
public string? Overview { get; set; }
[JsonPropertyName("adult")]
public bool Adult { get; set; }
[JsonPropertyName("backdrop_path")]
public string? BackdropPath { get; set; }
[JsonPropertyName("genre_ids")]
public List<int> GenreIds { get; set; } = new List<int>();
[JsonPropertyName("original_language")]
public string? OriginalLanguage { get; set; }
[JsonPropertyName("popularity")]
public double Popularity { get; set; }
[JsonPropertyName("poster_path")]
public string? PosterPath { get; set; }
[JsonPropertyName("release_date")]
public string? ReleaseDate { get; set; }
[JsonPropertyName("video")]
public bool Video { get; set; }
[JsonPropertyName("vote_average")]
public double VoteAverage { get; set; }
[JsonPropertyName("vote_count")]
public int VoteCount { get; set; }
[JsonPropertyName("belongs_to_collection")]
public CollectionInfo BelongsToCollection { get; set; }
// Constructor
public Movie()
{
GenreIds = new List<int>();
}
}
public class CollectionInfo
{
[JsonPropertyName("id")]
public int Id { get; set; }
[JsonPropertyName("name")]
public string Name { get; set; }
[JsonPropertyName("poster_path")]
public string PosterPath { get; set; }
[JsonPropertyName("backdrop_path")]
public string BackdropPath { get; set; }
}
public class MovieResponse
{
[JsonPropertyName("page")]
public int Page { get; set; }
[JsonPropertyName("results")]
public List<Movie> Results { get; set; } = new List<Movie>();
[JsonPropertyName("total_pages")]
public int TotalPages { get; set; }
[JsonPropertyName("total_results")]
public int TotalResults { get; set; }
public MovieResponse()
{
Results = new List<Movie>();
}
}
public class Genre
{
public int? Id { get; set; }
public string? Name { get; set; }
}
}
@@ -0,0 +1,11 @@
namespace MovieActorLookup.Models.Movie
{
public class MovieResult
{
public MovieResult() { }
public int Id { get; set; }
public string Title { get; set; }
public string Overview { get; set; }
public string PosterPath { get; set; }
}
}
@@ -0,0 +1,25 @@
using System.Text.Json.Serialization;
namespace MovieActorLookup.Models.TvShow.TvShow
{
public class ActorTvFilmography
{
[JsonPropertyName("cast")]
public List<TvRole> Cast { get; set; }
}
public class TvRole
{
[JsonPropertyName("id")]
public int Id { get; set; }
[JsonPropertyName("name")]
public string ShowTitle { get; set; }
[JsonPropertyName("character")]
public string Character { get; set; }
[JsonPropertyName("poster_path")]
public string PosterPath { get; set; }
}
}
+68
View File
@@ -0,0 +1,68 @@
using MovieActorLookup.Models.Movie;
using System.Text.Json.Serialization;
namespace MovieActorLookup.Models.TvShows
{
public class TvShow
{
[JsonPropertyName("id")]
public int Id { get; set; }
[JsonPropertyName("name")]
public string Name { get; set; }
[JsonPropertyName("overview")]
public string Overview { get; set; }
[JsonPropertyName("poster_path")]
public string PosterPath { get; set; }
[JsonPropertyName("backdrop_path")]
public string BackdropPath { get; set; }
[JsonPropertyName("first_air_date")]
public string FirstAirDate { get; set; }
[JsonPropertyName("popularity")]
public double Popularity { get; set; }
[JsonPropertyName("vote_average")]
public double VoteAverage { get; set; }
[JsonPropertyName("genre_ids")]
public List<int> GenreIds { get; set; } = new List<int>();
[JsonPropertyName("belongs_to_collection")]
public CollectionInfo BelongsToCollection { get; set; }
}
public class CollectionInfo
{
[JsonPropertyName("id")]
public int Id { get; set; }
[JsonPropertyName("name")]
public string Name { get; set; }
[JsonPropertyName("poster_path")]
public string PosterPath { get; set; }
[JsonPropertyName("backdrop_path")]
public string BackdropPath { get; set; }
}
public class TvResponse
{
[JsonPropertyName("page")]
public int Page { get; set; }
[JsonPropertyName("results")]
public List<TvShow> Results { get; set; } = new List<TvShow>();
[JsonPropertyName("total_pages")]
public int TotalPages { get; set; }
[JsonPropertyName("total_results")]
public int TotalResults { get; set; }
}
}