Skip to content

BouSenna/CountryInfo_API

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CountryInfo_API

This is an API wrapper through which users should be able to get information about specific country.
Consumers of the API should send HTTP request with the country name and the information they desire. The API should get all the information about the given country from a public RESTCountries API, parse it and respond with the requested information.

Testing

The API is covered by both unit tests and integration tests.
A dummy API is provided to be able to run these tests locally without the need of an internet connection or any external resources

API Endpoints

Below are some of the REST endpoints that could be used to search for information about a country.

All

Request all information about a country.

http://localhost:5000/{country_name}

Name

Request a country name.

http://localhost:5000/{country_name}?info=name  

Top Level Domain

Request a country’s top level domain.

http://localhost:5000/{country_name}?info=topLevelDomain 

Codes

Alpha 2-Code

Request a country’s alpha 2-code.

http://localhost:5000/{country_name}?info=alpha2Code 
Alpha 3-Code

Request a country’s alpha 3-code.

http://localhost:5000/{country_name}?info=alpha3Code
Calling Code

Request a country’s calling code.

http://localhost:5000/{country_name}?info=callingCodes

Capital

Request a country’s capital.

http://localhost:5000/{country_name}?info=capital 

Region

Country Region

Request a country’s region.

http://localhost:5000/{country_name}?info=region
Country Sub-Region

Request a country’s sub-region.

http://localhost:5000/{country_name}?info=subregion

Population

Request the population of a country.

http://localhost:5000/{country_name}?info=population

Languages

Request the spoken languages in a country.

http://localhost:5000/{country_name}?info=languages




TBC

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages