rates

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2020 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package rates provides support for getting exchange rates from Open Exchange Rates.

The main usage is with ApiClient GetRates func to get the latest exchange rates from https://openexchangerates.org/

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ApiClient

type ApiClient struct {
	ApiKey string
}

An ApiClient is used to interact with the Open Exchange Rates API

func NewApiClient

func NewApiClient(apiKey string) *ApiClient

func (*ApiClient) GetRates

func (c *ApiClient) GetRates() (map[string]float64, error)

GetRates retrieves the latest exchange rates and returns them as a map of Currency Code to rate

Jump to

Keyboard shortcuts

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