exchange

command module
v0.0.0-...-554626f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 8, 2017 License: AGPL-3.0 Imports: 14 Imported by: 0

README

exchange

GoDoc

It's a web service to return rate exchange for dollars/euros/rubles by incoming comma-separated text messages.

For example:

http -b -f POST localhost:8070 q="5 usd, 20 €, 100 рублей" d="2016-12-08"
{
    "date": "2016-12-08", 
    "rates": [
        {
            "msg": "5 usd", 
            "rate": {
                "eur": 4.67, 
                "rub": 319.56, 
                "usd": 5
            }
        }, 
        {
            "msg": "20 €", 
            "rate": {
                "eur": 20, 
                "rub": 1370, 
                "usd": 21.44
            }
        }, 
        {
            "msg": "100 рублей", 
            "rate": {
                "eur": 1.46, 
                "rub": 100, 
                "usd": 1.56
            }
        }
    ]
}

Documentation

Overview

Package main runs web service to handle incoming requests and return Russian Central Bank rate exchange.

Directories

Path Synopsis
Package main is a client program for github.com/z0rr0/exchange service.
Package main is a client program for github.com/z0rr0/exchange service.
Package rates contains methods to get currencies exchange rates from Russian Central Bank https://www.cbr.ru
Package rates contains methods to get currencies exchange rates from Russian Central Bank https://www.cbr.ru

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL