Skip to content

thinhducngo/movie-wrapper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 

Repository files navigation

movie-wrapper

Getting Started

  1. Down loading library from https://github.com/thinhducngo/movie-wrapper
  2. Build MovieWrapper.dll file
  3. In your console app or web apps add reference MovieWrapper.dll
  4. MovieWrapper.dll depends on Json.NET version 12.0.2 -> please pull from Nuget to your project.

Usage

1. Methods

Task<MovieResult> GetMovieDetails(VendorType type, string movieId)
Task<MovieResult> GetMovieDetails(VendorType type, string domain, string movieId)

Task<MovieSessionListResult> GetMovieSessions(VendorType type, string movieId)
Task<MovieSessionListResult> GetMovieSessions(VendorType type, string domain, string movieId)

Task<MovieListResult> GetShowingMovies(VendorType type)
Task<MovieListResult> GetShowingMovies(VendorType type, string domain)

2. Enums

enum VendorType:
- GalaxyCinema,
- Lotteria

3. Response Format

class ServiceResult<T>
- Success: string;   // request success or failed
- Message: string;  // give info if request failed.
- Data: T           // return data with type T
class Movie
- Name: string;                 // movie name
- ReleaseDate: DateTime?;       // movie release date
- Rating: decimal?;             // reating point
- Description: string;          // movie description
class MovieSession
- MovieId: string;          // movie
- Location: string;         // cinema address
- ShowDate: string;         // session date
- ShowTime: string;         // session time

3. How to use (Example)

  • Initialize:
var service = new MovieService();   // init wrapper service
var response = await service.GetShowingMovies(VendorType.GalaxyCinema);
  • Get showing movies (in case galaxy change domain)
var response = await service.GetShowingMovies(VendorType.GalaxyCinema, "https://www.galaxycine-custom.vn");
var response = await service.GetMovieDetails(VendorType.GalaxyCinema, movieId);
  • Get movie details (in case galaxy change domain)
var response = await service.GetMovieDetails(VendorType.GalaxyCinema, "https://www.galaxycine-custom.vn", movieId);
var response = await service.GetMovieSessions(VendorType.GalaxyCinema, movieId);
  • Get movie sessions (in case galaxy change domain)
var response = await service.GetMovieSessions(VendorType.GalaxyCinema, "https://www.galaxycine-custom.vn", movieId);

Vendors

Limitation

  • Lotte cinema vendor does not provide api for getting all movie's sessions, so app need to loop all day and cinema for getting data -> take to much time

Propose functionalities

- GetMovieSessionsByDate
- GetMovieSessionsByCinema
- GetFavoriteMovies                         // high rating

Have a good day

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages