C# 클래스 Popcorn.Services.Movie.MovieService

Services used to interact with movies
상속: IMovieService
파일 보기 프로젝트 열기: bbougot/Popcorn 1 사용 예제들

Private Properties

프로퍼티 타입 설명
GetMoviesListFromWrapper IEnumerable

공개 메소드들

메소드 설명
ChangeTmdbLanguage ( ILanguage language ) : void

Change the culture of TMDb

DownloadBackgroundImageAsync ( MovieFull movie, CancellationTokenSource ct ) : Task

Download the movie's background image

DownloadCastImageAsync ( MovieFull movie, CancellationTokenSource ct ) : Task

Download actors' image for a movie

DownloadCoverImageAsync ( IEnumerable movies, CancellationTokenSource ct ) : Task

Download cover image for each of the movies provided

DownloadPosterImageAsync ( MovieFull movie, CancellationTokenSource ct ) : Task

Download the movie's poster image

DownloadSubtitleAsync ( MovieFull movie, IProgress progress, CancellationTokenSource ct ) : Task

Download a subtitle

GetGenresAsync ( CancellationToken ct ) : Task>

Get all movie's genres

GetGreatestMoviesAsync ( int page, int limit, double ratingFilter, CancellationToken ct, Popcorn.Models.Genre.MovieGenre genre = null ) : int>>.Task

Get greatest movies by page

GetMovieFullDetailsAsync ( Popcorn.Models.Movie.Short.MovieShort movieToLoad, CancellationToken ct ) : Task

Get TMDb movie informations

GetMovieTrailerAsync ( MovieFull movie, CancellationToken ct ) : Task>

Get the link to the youtube trailer of a movie

GetPopularMoviesAsync ( int page, int limit, double ratingFilter, CancellationToken ct, Popcorn.Models.Genre.MovieGenre genre = null ) : int>>.Task

Get popular movies by page

GetRecentMoviesAsync ( int page, int limit, double ratingFilter, CancellationToken ct, Popcorn.Models.Genre.MovieGenre genre = null ) : int>>.Task

Get recent movies by page

LoadSubtitlesAsync ( MovieFull movie, CancellationToken ct ) : Task

Get the movie's subtitles according to a language

MovieService ( ) : System

Initialize a new instance of MovieService class

SearchMoviesAsync ( string criteria, int page, int limit, Popcorn.Models.Genre.MovieGenre genre, double ratingFilter, CancellationToken ct ) : int>>.Task

Search movies by criteria

TranslateMovieFullAsync ( MovieFull movieToTranslate, CancellationToken ct ) : Task

Translate movie informations (title, description, ...)

TranslateMovieShortAsync ( Popcorn.Models.Movie.Short.MovieShort movieToTranslate, CancellationToken ct ) : Task

Translate movie informations (title, description, ...)

비공개 메소드들

메소드 설명
GetMoviesListFromWrapper ( Popcorn.Models.Movie.Short.WrapperMovieShort wrapper ) : IEnumerable

Get movies as a list from wrapped movies

메소드 상세

ChangeTmdbLanguage() 공개 메소드

Change the culture of TMDb
public ChangeTmdbLanguage ( ILanguage language ) : void
language ILanguage Language to set
리턴 void

DownloadBackgroundImageAsync() 공개 메소드

Download the movie's background image
public DownloadBackgroundImageAsync ( MovieFull movie, CancellationTokenSource ct ) : Task
movie Popcorn.Models.Movie.Full.MovieFull The movie to process
ct System.Threading.CancellationTokenSource Used to cancel downloading background image
리턴 Task

DownloadCastImageAsync() 공개 메소드

Download actors' image for a movie
public DownloadCastImageAsync ( MovieFull movie, CancellationTokenSource ct ) : Task
movie Popcorn.Models.Movie.Full.MovieFull The movie to process
ct System.Threading.CancellationTokenSource Used to cancel downloading actor image
리턴 Task

DownloadCoverImageAsync() 공개 메소드

Download cover image for each of the movies provided
public DownloadCoverImageAsync ( IEnumerable movies, CancellationTokenSource ct ) : Task
movies IEnumerable The movies to process
ct System.Threading.CancellationTokenSource Used to cancel task
리턴 Task

DownloadPosterImageAsync() 공개 메소드

Download the movie's poster image
public DownloadPosterImageAsync ( MovieFull movie, CancellationTokenSource ct ) : Task
movie Popcorn.Models.Movie.Full.MovieFull The movie to process
ct System.Threading.CancellationTokenSource Used to cancel downloading poster image
리턴 Task

DownloadSubtitleAsync() 공개 메소드

Download a subtitle
public DownloadSubtitleAsync ( MovieFull movie, IProgress progress, CancellationTokenSource ct ) : Task
movie Popcorn.Models.Movie.Full.MovieFull The movie of which to retrieve its subtitles
progress IProgress Report the progress of the download
ct System.Threading.CancellationTokenSource Cancellation token
리턴 Task

GetGenresAsync() 공개 메소드

Get all movie's genres
public GetGenresAsync ( CancellationToken ct ) : Task>
ct System.Threading.CancellationToken Used to cancel loading genres
리턴 Task>

GetGreatestMoviesAsync() 공개 메소드

Get greatest movies by page
public GetGreatestMoviesAsync ( int page, int limit, double ratingFilter, CancellationToken ct, Popcorn.Models.Genre.MovieGenre genre = null ) : int>>.Task
page int Page to return
limit int The maximum number of movies to return
ratingFilter double Used to filter by rating
ct System.Threading.CancellationToken Cancellation token
genre Popcorn.Models.Genre.MovieGenre The genre to filter
리턴 int>>.Task

GetMovieFullDetailsAsync() 공개 메소드

Get TMDb movie informations
public GetMovieFullDetailsAsync ( Popcorn.Models.Movie.Short.MovieShort movieToLoad, CancellationToken ct ) : Task
movieToLoad Popcorn.Models.Movie.Short.MovieShort Movie to load
ct System.Threading.CancellationToken Used to cancel loading
리턴 Task

GetMovieTrailerAsync() 공개 메소드

Get the link to the youtube trailer of a movie
public GetMovieTrailerAsync ( MovieFull movie, CancellationToken ct ) : Task>
movie Popcorn.Models.Movie.Full.MovieFull The movie
ct System.Threading.CancellationToken Used to cancel loading trailer
리턴 Task>

GetPopularMoviesAsync() 공개 메소드

Get popular movies by page
public GetPopularMoviesAsync ( int page, int limit, double ratingFilter, CancellationToken ct, Popcorn.Models.Genre.MovieGenre genre = null ) : int>>.Task
page int Page to return
limit int The maximum number of movies to return
ratingFilter double Used to filter by rating
ct System.Threading.CancellationToken Cancellation token
genre Popcorn.Models.Genre.MovieGenre The genre to filter
리턴 int>>.Task

GetRecentMoviesAsync() 공개 메소드

Get recent movies by page
public GetRecentMoviesAsync ( int page, int limit, double ratingFilter, CancellationToken ct, Popcorn.Models.Genre.MovieGenre genre = null ) : int>>.Task
page int Page to return
limit int The maximum number of movies to return
ratingFilter double Used to filter by rating
ct System.Threading.CancellationToken Cancellation token
genre Popcorn.Models.Genre.MovieGenre The genre to filter
리턴 int>>.Task

LoadSubtitlesAsync() 공개 메소드

Get the movie's subtitles according to a language
public LoadSubtitlesAsync ( MovieFull movie, CancellationToken ct ) : Task
movie Popcorn.Models.Movie.Full.MovieFull The movie of which to retrieve its subtitles
ct System.Threading.CancellationToken Cancellation token
리턴 Task

MovieService() 공개 메소드

Initialize a new instance of MovieService class
public MovieService ( ) : System
리턴 System

SearchMoviesAsync() 공개 메소드

Search movies by criteria
public SearchMoviesAsync ( string criteria, int page, int limit, Popcorn.Models.Genre.MovieGenre genre, double ratingFilter, CancellationToken ct ) : int>>.Task
criteria string Criteria used for search
page int Page to return
limit int The maximum number of movies to return
genre Popcorn.Models.Genre.MovieGenre The genre to filter
ratingFilter double Used to filter by rating
ct System.Threading.CancellationToken Cancellation token
리턴 int>>.Task

TranslateMovieFullAsync() 공개 메소드

Translate movie informations (title, description, ...)
public TranslateMovieFullAsync ( MovieFull movieToTranslate, CancellationToken ct ) : Task
movieToTranslate Popcorn.Models.Movie.Full.MovieFull Movie to translate
ct System.Threading.CancellationToken Used to cancel translation
리턴 Task

TranslateMovieShortAsync() 공개 메소드

Translate movie informations (title, description, ...)
public TranslateMovieShortAsync ( Popcorn.Models.Movie.Short.MovieShort movieToTranslate, CancellationToken ct ) : Task
movieToTranslate Popcorn.Models.Movie.Short.MovieShort Movie to translate
ct System.Threading.CancellationToken Used to cancel translation
리턴 Task