Add missing Person Translations

And I found another endpoint/method missing that I needed,
this time for the people. I did a PR for mapping the person bio.
to overview previously, but forgot to check if the methods/endpoints
to get the translation was mapped… which they were not… so here I
am again, with another PR. 😅
This commit is contained in:
Mikal Stordal 2024-03-10 21:18:05 +01:00
parent 32ee2f0e56
commit 4093aadf18
3 changed files with 11 additions and 1 deletions

View File

@ -160,5 +160,10 @@ namespace TMDbLib.Client
{
return await GetPersonMethodInternal<TvCredits>(personId, PersonMethods.TvCredits, language: language, cancellationToken: cancellationToken).ConfigureAwait(false);
}
public async Task<TranslationsContainer> GePersonTranslationsAsync(int personId, CancellationToken cancellationToken = default)
{
return await GetPersonMethodInternal<TranslationsContainer>(personId, PersonMethods.Translations, cancellationToken: cancellationToken).ConfigureAwait(false);
}
}
}

View File

@ -70,5 +70,8 @@ namespace TMDbLib.Objects.People
[JsonProperty("tv_credits")]
public TvCredits TvCredits { get; set; }
[JsonProperty("translations")]
public TranslationsContainer Translations { get; set; }
}
}

View File

@ -19,6 +19,8 @@ namespace TMDbLib.Objects.People
[EnumValue("tagged_images")]
TaggedImages = 16,
[EnumValue("changes")]
Changes = 32
Changes = 32,
[EnumValue("translations")]
Translations = 64,
}
}