finished movie endpoints, addded configuration and utility method to construct full image url
This commit is contained in:
12
src/utils/getImagePath.ts
Normal file
12
src/utils/getImagePath.ts
Normal 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}`;
|
||||
};
|
||||
Reference in New Issue
Block a user