Skip to content

Commit

Permalink
Merge pull request #13 from allansifuna/master
Browse files Browse the repository at this point in the history
Updated RestCountryApi and RestCountryApiV2  BASE_URI
  • Loading branch information
SteinRobert committed Oct 7, 2021
2 parents f69bef3 + 4294e8f commit df22994
Show file tree
Hide file tree
Showing 4 changed files with 122 additions and 151 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ python-restcountries
[![Coverage Status](https://coveralls.io/repos/github/SteinRobert/python-restcountries/badge.svg?branch=master)](https://coveralls.io/github/SteinRobert/python-restcountries?branch=master)
[![PyPI version](https://badge.fury.io/py/python-restcountries.svg)](https://badge.fury.io/py/python-restcountries)

This is a simple python wrapper for the API of [http://restcountries.eu](http://restcountries.eu).
This is a simple python wrapper for the API of [http://restcountries.com](http://restcountries.com).
If there are any issues, please use this repository to contact me about it.

Installation
Expand Down
9 changes: 2 additions & 7 deletions restcountries/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@


class RestCountryApi:
BASE_URI = "https://restcountries.eu/rest/v1"
BASE_URI = "https://restcountries.com/v1"
QUERY_SEPARATOR = ","

@classmethod
Expand Down Expand Up @@ -167,7 +167,7 @@ def get_countries_by_capital(cls, capital, filters=None):


class RestCountryApiV2(RestCountryApi):
BASE_URI = "https://restcountries.eu/rest/v2"
BASE_URI = "https://restcountries.com/v2"
QUERY_SEPARATOR = ";"


Expand Down Expand Up @@ -218,8 +218,3 @@ def __str__(self):

def __repr__(self):
return "<{} | {}>".format(self.name, self.alpha3_code)


# s = RestCountryApiV2()

# s.get_countries_by_country_codes(["ke", "ug"],filters=["name","capital","currencies"])

0 comments on commit df22994

Please sign in to comment.