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 { ...@@ -37,8 +37,12 @@ type LanguageCountriesResponse struct {
// CountryInfo represents country information in the LanguageCountriesResponse. // CountryInfo represents country information in the LanguageCountriesResponse.
type CountryInfo struct { type CountryInfo struct {
Name string `json:"name"` ISO3166_1_Alpha_3 string `json:"ISO3166_1_Alpha_3"`
ISOCode string `json:"isoCode"` 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. // CountryResponse represents the structure of a country response from the REST Countries API.
...@@ -62,4 +66,4 @@ type ServiceStatus struct { ...@@ -62,4 +66,4 @@ type ServiceStatus struct {
CountriesAPI string `json:"countriesapi"` CountriesAPI string `json:"countriesapi"`
Version string `json:"version"` Version string `json:"version"`
Uptime int64 `json:"uptime"` Uptime int64 `json:"uptime"`
} }
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment