first push
This commit is contained in:
@@ -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; }
|
||||
}
|
||||
}
|
||||
@@ -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; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user