import { get } from './utils';

export default {
  comingSoon: get('/data/coming_soon.json'),
  inTheaters: get('/data/in_theaters.json'),
  search: get('/api/movie/search', { cache: sessionStorage }, payload => ({ q: payload.query, count: 50 })),
  subject: get(subjectId => `/api/movie/subject/${subjectId}`, { requiresAPIKey: true, cache: sessionStorage }, () => null),
  top20: get('/data/top20.json')
};

import { get } from './utils';

export default {
  comingSoon: get('/data/coming_soon.json'),
  inTheaters: get('/data/in_theaters.json'),
  search: get('/api/movie/search', { cache: sessionStorage }, payload => ({ q: payload.query })),
  subject: get(subjectId => `/api/movie/subject/${subjectId}`, { requiresAPIKey: true, cache: sessionStorage }, () => null),
  top20: get('/data/top20.json')
};

Remove count from search