UNPKG

tmdb-interface

Version:

This is a Node.js wrapper of TMDB API. We apply chain-style design on it, which make it more semantic and functional.

15 lines (14 loc) 343 B
const axios = require('axios') module.exports = (self) => { return (key, version = 3) => { self.http = axios.create({ baseURL: 'https://api.themoviedb.org', headers: { Authorization: `Bearer ${key}`, 'User-Agent': 'TMDB-API/1.0.0' } }) self.version = version return self } }