-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathapi.js
More file actions
24 lines (19 loc) · 722 Bytes
/
api.js
File metadata and controls
24 lines (19 loc) · 722 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
import Trakt from 'trakt.tv-browser';
import { isDevelopment } from './utils';
// eslint-disable-next-line no-undef
const isLocal = Boolean(__LOCAL__);
/* eslint-disable camelcase */
const api = new Trakt({
client_id: '907c2fe5ff19a529456c0058d2c96f6913f62b55fc6e9a86605f05a0c4e2fec7',
client_secret: '0b70b2072730e0e2ab845f8f89fbfa4a808f47e10678365cb746f4b81fbb56a3',
redirect_uri: (isLocal || isDevelopment) ? 'http://localhost:8080/' : 'https://sharkykh.github.io/tppm/',
timeout: 30000,
useragent: `tppm/${__VERSION__}`,
pagination: false, // Defaults to false, global pagination
debug: isDevelopment,
});
/* eslint-enable camelcase */
if (isDevelopment) {
window.api = api;
}
export default api;