We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 81d3644 commit a41026fCopy full SHA for a41026f
currency.go
@@ -0,0 +1,28 @@
1
+package labstack
2
+
3
+import "time"
4
5
+type (
6
+ CurrencyExchangeRequest struct {
7
+ Base string `json:"base"`
8
+ }
9
10
+ CurrencyExchangeResponse struct {
11
+ Rates map[string]float64 `json:"rates"`
12
+ UpdatedAt time.Time `json:"updated_at"`
13
14
+)
15
16
+func (c *Client) CurrencyExchange(req *CurrencyExchangeRequest) (res *CurrencyExchangeResponse, err *APIError) {
17
+ res = new(CurrencyExchangeResponse)
18
+ _, e := c.resty.R().
19
+ SetBody(req).
20
+ SetResult(res).
21
+ SetError(err).
22
+ Post("/currency/exchange")
23
+ if e != nil {
24
+ err = new(APIError)
25
+ err.Message = e.Error()
26
27
+ return
28
+}
0 commit comments