finished movie endpoints, addded configuration and utility method to construct full image url

This commit is contained in:
Blake Joynes
2021-05-15 13:50:54 -04:00
parent 9937277752
commit 6f8ae6e2c3
10 changed files with 846 additions and 2 deletions

12
src/utils/getImagePath.ts Normal file
View File

@@ -0,0 +1,12 @@
/**
* Utility method to construct full url for image
* based on configuration
*
* https://developers.themoviedb.org/3/getting-started/images
* @param {string} baseUrl base image url
* @param {string} fileSize file size
* @param {string} imagePath raw image path
*/
export const getFullImagePath = (baseUrl: string, fileSize: string, imagePath: string): string => {
return `${baseUrl}${fileSize}${imagePath}`;
};