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.
24 lines • 687 B
JavaScript
module.exports = (self) => {
return (company_id) => {
return {
detail() {
return {
end() {
self.url = self.api(`/company/${company_id}`)
self.type = 'company'
return self
}
}
},
images() {
return {
end() {
self.url = self.api(`/company/${company_id}/images`)
self.type = 'company'
return self
}
}
}
}
}
}