Skip to content

b-garbacz/rust-exchange-rate-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rust-ExchangeRate-API

  1. Classic lauch
  2. Use Docker environment

Api Key

Obtain your API Key from https://www.exchangerate-api.com

Classic launch (Linux)

  1. Enter to the project directory
   $ cargo build --release
  1. Add an environment variable named API_KEY which contains your api key to https://www.exchangerate-api.com API
   $ export API_KEY=111111111111111111111111
  1. Enter to the /target/release
   $ cd /target/release
  1. You can use the --help flag to see how to use the program
   $ ./exchange-rate-api --help

image
5. Default mode

  $ ./exchange-rate-api PLN USD 1000.123

image
6. List all available currencies

  $ ./exchange-rate-api --codes

image
6. List all available currencies and the current exchange rates against a single currency:

  $ ./exchange-rate-api USD

image

Use Docker environment

  1. Pull docker image from https://hub.docker.com/repository/docker/bgarbach/exchange_rate_api/general or use:
  $ docker pull bgarbach/exchange_rate_api
  1. You can use the --help flag to see how to use the program
   $ docker run -e API_KEY=xxxxxxx bgarbach/exchange_rate_api --help
  1. Default mode
   $ docker run -e API_KEY=xxxxxxx bgarbach/exchange_rate_api PLN USD 1000.123
  1. List all available currencies
   $ docker run -e API_KEY=xxxxxxx bgarbach/exchange_rate_api --codes
  1. List all available currencies and the current exchange rates against a single currency:
   $ docker run -e API_KEY=xxxxxxx bgarbach/exchange_rate_api USD

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published