person social info

This commit is contained in:
Francisco Zorat
2023-09-05 00:17:28 -03:00
parent 150b20f15c
commit e34303161d
2 changed files with 15 additions and 3 deletions

View File

@@ -21,7 +21,7 @@ export interface TmdbPersonFull extends TmdbPerson {
images: operations['person-images']['responses']['200']['content']['application/json'];
movie_credits: operations['person-tv-credits']['responses']['200']['content']['application/json'];
tv_credits: operations['person-movie-credits']['responses']['200']['content']['application/json'];
combined_credits: operations['person-combined-credits']['responses']['200']['content']['application/json'];
external_ids: operations['person-external-ids']['responses']['200']['content']['application/json'];
}
export interface TmdbMovieFull2 extends TmdbMovie2 {
@@ -309,7 +309,7 @@ export const getTmdbPerson = async (person_id: number) =>
person_id: person_id
},
query: {
append_to_response: 'images,movie_credits,tv_credits,combined_credits'
append_to_response: 'images,movie_credits,tv_credits,external_ids'
}
}
}).then((res) => res.data as TmdbPersonFull);

View File

@@ -29,10 +29,22 @@
.then((res) => res.filter((p) => p.backdropUrl))
.then((res) => res.sort((a, b) => b.rating - a.rating));
const tmdbSocials = {
facebook: tmdbPerson.external_ids.facebook_id,
imdb: tmdbPerson.external_ids.imdb_id,
instagram: tmdbPerson.external_ids.instagram_id,
tiktok: tmdbPerson.external_ids.tiktok_id,
twitter: tmdbPerson.external_ids.twitter_id,
youtube: tmdbPerson.external_ids.youtube_id,
wikipedia: tmdbPerson.external_ids.wikidata_id,
};
return {
tmdbPerson,
tmdbMoviesOn,
tmdbSeriesOn
tmdbSeriesOn,
tmdbSocials
};
}
</script>