Skip to content

Conversation

@Bost
Copy link
Contributor

@Bost Bost commented Mar 6, 2020

How to pull the country codes as JSU doesn't offer them. I'm guessing the best solution would be to hard-code them into a map (e.g: "Mainland China" => "CN"), the issue here would be to update the code if JSU decides to use a different key when they add new countries.

See the comment at country_name_synonyms and the country_code docstring.
(We might want to add that explanation to the README.md)

@ExpDev07
Copy link
Owner

ExpDev07 commented Mar 6, 2020

Exactly something like this I was thinking about. Very good work! Is this neccecary:?
pip install --upgrade flask-cors python-dotenv requests cachetools python-dateutil

Running "pipenv install" in the directory should be enough to install the dependencies?

Copy link
Owner

@ExpDev07 ExpDev07 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove pip install --upgrade flask-cors python-dotenv requests cachetools python-dateutil as it's not necessary if you've properly installed dependencies using pipenv install.

Also change countrycode to country_code to comply with the JSON API specification.

@ExpDev07 ExpDev07 added the enhancement New feature or request label Mar 6, 2020
@ExpDev07 ExpDev07 linked an issue Mar 6, 2020 that may be closed by this pull request
@ExpDev07 ExpDev07 merged commit 56a7443 into ExpDev07:master Mar 6, 2020
@Bost Bost mentioned this pull request Mar 9, 2020
@ExpDev07 ExpDev07 linked an issue Mar 16, 2020 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Adding country codes

3 participants