I'm struggling to create a link on movie posters that will lead to detailed movie information based on the movie ID. I have been going through their documentation, but I can't seem to get the api configuration to function properly. Every time I try, I keep seeing a 404 error in the console log.
Here is how I am attempting to call the API to generate image URLs. Can anyone provide insight into how to correct this portion?
(function() {
'use strict';
angular
.module('app.core')
.factory('posterService', posterService)
posterService.$inject = ['$q', '$http'];
function posterService($q, $http) {
var service = {
getPoster: _getPoster,
};
return service;
function _getPoster(id) {
var params = {
id: id,
key: 'xxx'
}
return $http({
method: 'GET',
url: 'https://api.themoviedb.org/3/movie/' + id + '/images/api_key=' + key,
});
}
}
})();