Skip to content
Snippets Groups Projects
Commit d7cba443 authored by Abdulsamad Sheikh's avatar Abdulsamad Sheikh :cat2:
Browse files

Edited FetchCountriesByLanguage to expect an array of CountryInfo objects...

Edited FetchCountriesByLanguage to expect an array of CountryInfo objects instead of a single LanguageCountriesResponse object
parent 2cb339f8
No related branches found
No related tags found
No related merge requests found
......@@ -37,8 +37,12 @@ type LanguageCountriesResponse struct {
// CountryInfo represents country information in the LanguageCountriesResponse.
type CountryInfo struct {
Name string `json:"name"`
ISOCode string `json:"isoCode"`
ISO3166_1_Alpha_3 string `json:"ISO3166_1_Alpha_3"`
ISO3166_1_Alpha_2 string `json:"ISO3166_1_Alpha_2"`
Official_Name string `json:"Official_Name"`
Region_Name string `json:"Region_Name"`
Sub_Region_Name string `json:"Sub_Region_Name"`
Language string `json:"Language"`
}
// CountryResponse represents the structure of a country response from the REST Countries API.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment