Skip to content

Commit

Permalink
Merge pull request #486 from revam/patch-7
Browse files Browse the repository at this point in the history
Add missing Person Translations
  • Loading branch information
Shadowghost authored Mar 10, 2024
2 parents 32ee2f0 + 4093aad commit 75e52b5
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
5 changes: 5 additions & 0 deletions TMDbLib/Client/TMDbClientPeople.cs
Original file line number Diff line number Diff line change
Expand Up @@ -160,5 +160,10 @@ public async Task<TvCredits> GetPersonTvCreditsAsync(int personId, string langua
{
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);
}
}
}
3 changes: 3 additions & 0 deletions TMDbLib/Objects/People/Person.cs
Original file line number Diff line number Diff line change
Expand Up @@ -70,5 +70,8 @@ public class Person

[JsonProperty("tv_credits")]
public TvCredits TvCredits { get; set; }

[JsonProperty("translations")]
public TranslationsContainer Translations { get; set; }
}
}
4 changes: 3 additions & 1 deletion TMDbLib/Objects/People/PersonMethods.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ public enum PersonMethods
[EnumValue("tagged_images")]
TaggedImages = 16,
[EnumValue("changes")]
Changes = 32
Changes = 32,
[EnumValue("translations")]
Translations = 64,
}
}

0 comments on commit 75e52b5

Please sign in to comment.