All files / src/apiManager index.ts

0% Statements 0/1
100% Branches 0/0
100% Functions 0/0
0% Lines 0/1

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31                                                             
import * as api from "@/api";
 
const apiManager = {
  //  movies related api's
  getMovies: { func: api.getMovies, key: 'movies' },
  getUpcomingMovies: { func: api.getUpcomingMovies, key: 'upcomingMovies' },
  searchMovies: { func: api.searchMovies, key: 'searchMovies' },
  getMovie: { func: api.getMovie, key: 'movieDetails' },
  getGenres: { func: api.getGenres, key: 'genres' },
 
  //  movie related api's
  setFavoriteMovie: { func: api.setFavoriteMovie, key: 'movieDetails' },
  setMovieInWatchList: { func: api.setMovieInWatchList, key: 'movieDetails' },
  rateMovie: { func: api.setMovieInWatchList, key: 'movieDetails' },
  deleteMovieRating: { func: api.setMovieInWatchList, key: 'movieDetails' },
 
  //  authenticated related api's
  login: { func: api.login, key: '' },
  createSession: { func: api.createSession, key: 'session' },
  deleteSession: { func: api.deleteSession, key: 'session' },
  getRequestToken: { func: api.getRequestToken, key: 'requestToken' },
 
  //  user related api's
  getAccountDetails: { func: api.getAccountDetails, key: 'userAccount' },
  getFavoriteMovies: { func: api.getFavoriteMovies, key: 'favoriteMovies' },
  getMoviesInWatchlist: { func: api.getMoviesInWatchlist, key: 'watchlistMovies' },
  getRatedMovies: { func: api.getRatedMovies, key: 'ratedMovies' },
}
 
export default apiManager