RSS scraper for reading exchange rates from the European Central Bank web page.
- make build
- make run
- make migrate
- make makemigrations
- make createsuperuser
- There is a possibility to use currency shortcut to get all data for given currency like below: http://127.0.0.1:8000/api/exchange_rates/all/PLN
RESPONSE:
[
{
"exchange_rate": "4.36980000",
"date": "2019-10-02",
"currency": {
"base_currency": "EUR",
"target_currency": "PLN"
}
}
]
- There is another possibility to use currency shortcut to get only latest data for given currency like below: http://127.0.0.1:8000/api/exchange_rates/PLN
RESPONSE:
{
"exchange_rate": "4.36980000",
"date": "2019-10-02",
"currency": {
"base_currency": "EUR",
"target_currency": "PLN"
}
}
- There is also a possibility to use date to get proper data like below: http://127.0.0.1:8000/api/exchange_rates/2019-10-02
RESPONSE:
[
{
"exchange_rate": "1.09250000",
"date": "2019-10-02",
"currency": {
"base_currency": "EUR",
"target_currency": "USD"
}
},
...
{
"exchange_rate": "16.66270000",
"date": "2019-10-02",
"currency": {
"base_currency": "EUR",
"target_currency": "ZAR"
}
}
]
To use django-admin: http://127.0.0.1:8000/admin/
Remember to add super user before using that:
make createsuperuser
make test-django
make test-python