Skip to content
Snippets Groups Projects
Commit ea3999d3 authored by maria-moroz's avatar maria-moroz
Browse files

Create filmInfoAPIService.js

parent a2ec63c7
No related branches found
No related tags found
No related merge requests found
const API_KEY = '306e564986f0782b8ec4bf227b0f3c28';
const BASE_URL = 'https://api.themoviedb.org/3/movie';
export default class FilmInfoApiService {
constructor() {
this.id = '';
}
async getFilmInfo() {
console.log(this.id);
const response = await fetch(`${BASE_URL}/${this.id}?api_key=${API_KEY}`);
return response;
}
get id() {
return this.id;
}
set id(newId) {
this.id = newId;
}
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment