diff --git a/.github/workflows/install.sh b/.github/workflows/install.sh deleted file mode 100644 index 97126f5..0000000 --- a/.github/workflows/install.sh +++ /dev/null @@ -1,7 +0,0 @@ -sudo add-apt-repository ppa:ondrej/php -y -sudo apt update -y -sudo apt install -y php$1 curl -sudo update-alternatives --set php /usr/bin/php$1 -php -v -sudo curl -s https://getcomposer.org/installer | php -sudo mv composer.phar /usr/local/bin/composer \ No newline at end of file diff --git a/README.md b/README.md index 451c34d..e524ac5 100644 --- a/README.md +++ b/README.md @@ -1,13 +1,15 @@ # Country City API [![Build Status](https://travis-ci.org/shivammathur/countrycity.svg?branch=master)](https://travis-ci.org/shivammathur/countrycity) [![Code Climate](https://codeclimate.com/github/shivammathur/countrycity/badges/gpa.svg)](https://codeclimate.com/github/shivammathur/countrycity) -[![Coverage Status](https://coveralls.io/repos/github/shivammathur/countrycity/badge.svg?branch=master)](https://coveralls.io/github/shivammathur/countrycity?branch=master) [![codecov](https://codecov.io/gh/shivammathur/countrycity/branch/master/graph/badge.svg)](https://codecov.io/gh/shivammathur/countrycity) -[![License](https://poser.pugx.org/shivammathur/countrycity/license)](https://packagist.org/packages/shivammathur/countrycity) +[![License](https://poser.pugx.org/shivammathur/countrycity/license)](license.md) +[![Support me on Patreon](https://shivammathur.com/badges/patreon.svg)](https://www.patreon.com/shivammathur) +[![Support me on Paypal](https://shivammathur.com/badges/paypal.svg)](https://www.paypal.me/shivammathur) +[![Get Help on codementor](https://cdn.codementor.io/badges/get_help_github.svg)](https://www.codementor.io/shivammathur?utm_source=github&utm_medium=button&utm_term=shivammathur&utm_campaign=github) Country City API is a REST API to get a list of all the countries in the world. It can also be used to get a list of all the cities in a country. -### Installing the API +### :zap: Installing the API - Download this API using [composer](https://getcomposer.org/download/) by executing the command below. ```bash @@ -19,7 +21,7 @@ composer create-project shivammathur/countrycity countrycity "master-dev" --pref ``` - You are all set. -### Rest API Features +### :sparkles: Rest API Features - Built using Slim micro framework. - Caching enabled with following headers - ETag @@ -28,24 +30,28 @@ composer create-project shivammathur/countrycity countrycity "master-dev" --pref - Fast and lightweight API - PSR 7 Complaint -### API Endpoints +### :hash: API Endpoints -- Get All Countries +All API responses are in `json` format. + +- Get the list of all countries ``` /countries ``` -- Get All Cities in a Country +- Get the list all cities in a country ``` /cities/{countryName} ``` -### Error Format +### :wrench: Error Format + +If there is an error in the API, you will get an error in `json` format as response ```json {"error":"true", "message": "error message here"} ``` -### Testing +### :rotating_light: Testing ```bash vendor/bin/phpunit --configuration phpunit.xml.dist ```