File tree Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -488,6 +488,8 @@ type PersonTranslations struct {
488488 Name string `json:"name"`
489489 Data struct {
490490 Biography string `json:"biography"`
491+ Name string `json:"name"`
492+ Primary bool `json:"primary"`
491493 } `json:"data"`
492494 EnglishName string `json:"english_name"`
493495 } `json:"translations"`
Original file line number Diff line number Diff line change @@ -24,6 +24,17 @@ func (suite *TMBDTestSuite) TestGetPersonDetailsWithOptions() {
2424 suite .Equal ("Jason Momoa" , jasonMomoa .Name )
2525}
2626
27+ func (suite * TMBDTestSuite ) TestGetPersonDetailsWithAppend () {
28+ options := make (map [string ]string )
29+ options ["append_to_response" ] = "translations"
30+ jasonMomoa , err := suite .client .GetPersonDetails (jasonMomoaID , options )
31+ suite .Nil (err )
32+ suite .NotNil (jasonMomoa .PersonTranslationsAppend )
33+ suite .NotNil (jasonMomoa .Translations )
34+ suite .NotEmpty (jasonMomoa .Translations .Translations )
35+ suite .Equal ("Jason Momoa" , jasonMomoa .Translations .Translations [0 ].Data .Name )
36+ }
37+
2738func (suite * TMBDTestSuite ) TestGetPersonChanges () {
2839 jasonMomoa , err := suite .client .GetPersonChanges (jasonMomoaID , nil )
2940 suite .Nil (err )
@@ -174,6 +185,8 @@ func (suite *TMBDTestSuite) TestGetPersonTranslationsWithOptions() {
174185 tomCruise , err := suite .client .GetPersonTranslations (tomCruiseID , options )
175186 suite .Nil (err )
176187 suite .NotNil (tomCruise .ID )
188+ suite .NotEmpty (tomCruise .Translations )
189+ suite .NotEmpty (tomCruise .Translations [0 ].Data .Name )
177190}
178191
179192func (suite * TMBDTestSuite ) TestGetPersonLatest () {
You can’t perform that action at this time.
0 commit comments