Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Bruno Predot
/
tmdb_test
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
Bruno Predot
2025-04-25 15:49:35 +0200
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
b099b69dd6f0569b50611128a5772093c7a2b372
b099b69d
1 parent
7565e292
Mise à jour du model Movie + interface + composable TMDB.
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
2 deletions
composables/tMDB.ts
interfaces/movie.ts
models/movie.ts
composables/tMDB.ts
View file @
b099b69
...
...
@@ -48,7 +48,7 @@ export const useTMDB = function() {
* Fetch movie details by id.
* @param id
*/
const
fetchMovieDetails
=
async
(
id
:
number
)
=>
{
const
fetchMovieDetails
=
async
(
id
:
number
|
string
)
=>
{
try
{
const
response
=
await
fetch
(
`
${
apiUrl
}
/movie/
${
id
}
?api_key=
${
apiKey
}
&language=fr-FR`
,
...
...
interfaces/movie.ts
View file @
b099b69
...
...
@@ -2,7 +2,7 @@ export interface MovieInterface {
id
:
number
;
adult
:
boolean
;
backdrop_pat
:
string
;
genre_ids
:
unknown
[];
genre_ids
:
number
[];
original_language
:
string
;
original_title
:
string
;
overview
:
string
;
...
...
models/movie.ts
View file @
b099b69
...
...
@@ -23,13 +23,26 @@ export class Movie extends Model {
id
:
this
.
number
(
null
),
adult
:
this
.
boolean
(
false
),
backdrop_pat
:
this
.
string
(
null
),
belongs_to_collection
:
this
.
attr
(
null
),
budget
:
this
.
number
(
null
),
genre_ids
:
this
.
attr
([]),
genres
:
this
.
attr
([]),
homepage
:
this
.
string
(
null
),
imdb_id
:
this
.
string
(
null
),
origin_country
:
this
.
attr
([]),
original_language
:
this
.
string
(
null
),
original_title
:
this
.
string
(
null
),
overview
:
this
.
string
(
null
),
popularity
:
this
.
number
(
null
),
poster_path
:
this
.
string
(
null
),
production_companies
:
this
.
attr
([]),
production_cuntries
:
this
.
attr
([]),
release_date
:
this
.
string
(
null
),
revenue
:
this
.
number
(
null
),
runtime
:
this
.
number
(
null
),
spoken_languages
:
this
.
attr
([]),
status
:
this
.
string
(
null
),
tagline
:
this
.
string
(
null
),
title
:
this
.
string
(
null
),
video
:
this
.
boolean
(
false
),
vote_average
:
this
.
number
(
null
),
...
...
Please
register
or
login
to post a comment