GithubHelp home page GithubHelp logo

mattevans / dinero Goto Github PK

View Code? Open in Web Editor NEW
79.0 6.0 9.0 56 KB

๐Ÿ“ˆ ๐Ÿ’ฐ A golang interface for the Open Exchange Rates API

Home Page: https://docs.openexchangerates.org/docs/

License: MIT License

Go 100.00%
golang currency exchange-rates open-exchange forex go golang-library

dinero's People

Contributors

dvrkps avatar marthjod avatar mattevans avatar rbuubr avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

dinero's Issues

Can't find 0.5.0 package version

Added some code to my project dedicated to this library:

package main

import (
	exchangeRates "github.com/mattevans/dinero"
)

// ExchangeRatesClient - pointer to exchange rates client
var ExchangeRatesClient *exchangeRates.Client

type ratesClient *exchangeRates.Client

func main() {
  ExchangeRatesClient = exchangeRates.NewClient(...)
}

run this code and then see in my go.mod file:

module search

go 1.12

require (
	github.com/mattevans/dinero v0.4.1-0.20191227041751-0242073870a1
)

same for go.sum file. Tried to do it manually, but doesn't work :(

PoC: Create struct functions to perform API calls

Currently I have an use-case when I need convert a lot of currencies to another currencies in a row. In my code I need to do something like this:

client := // client creating
for _, currency := range currencies {
  request := client.newRequest(...params)
  rsp, _ := client.do(request)
}

Here is the problem: I need to do a lot of actions to just convert the currency :(

  1. create client
  2. set up request
  3. perform request
    What if this library will have some kind of advanced API to do something like:
client := // client creating
for _, currency := range currencies {
  rsp, _ := client.ConvertCurrency(currency, "USD")
}

WDYT about it?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.