docker build -t rate_mailer .
docker run -p 10000:10000 -e ENV_SENDER_EMAIL='<email>' -e ENV_SENDER_PASSWORD='<password>' rate_mailer
Returns exchange rate of the coin to the given currency
-
Request
GET rate/<coin>/<currency>
-
URL params
Required:
coin=[string]
currency=[string]
-
Success response
- Code: 200
Content:<int>
- Code: 200
-
Error response
- Code: 400
Content{"error":<string>}
- Code: 400
Request curl http://localhost:10000/rate/bitcoin/uah
Response
959270
Returns the list of supported coins
-
Request
GET rate/coins
-
Success response
- Code: 200
Content:[<string>, <string>, ...]
- Code: 200
-
Error response
- Code: 400
Content
- Code: 400
Request curl http://localhost:10000/coins
Response
["adazoo","add-xyz-new","adex"]
Returns the list of supported currencies
-
Request
GET rate/currencies
-
Success response
- Code: 200
Content:[<string>, <string>, ...]
- Code: 200
-
Error response
- Code: 400
Content
- Code: 400
Request curl http://localhost:10000/currencies
Response
["usd", "eur", "uah"]
Add emails to the mailing list of coin/currency pair exchange rate
-
Request
POST rate/subscribe
-
Data params
Required
email=[string]
coin=[string]
currency=[string]
-
Success response
- Code: 200
Content:
- Code: 200
-
Error response
- Code: 400
Content
- Code: 400
-
Error response
- Code: 409
Content{"error":<string>}
- Code: 409
Send email to each subscriber in the mailing list with information they subscribed for
-
Request
POST rate/sendEmails
-
Success response
- Code: 200
Content:
- Code: 200
-
Error response
- Code: 400
Content
- Code: 400