Giter Club home page Giter Club logo

curry's Introduction

Build Status

Feature request for Ver 2.0

Currently we're planing on making many more changes, those changes will affect the way we use the service. But before making any change, we'll love to hear any new feature you've in mind, currently we're planing on implementing the following features:

- History (make rates from previous days accesible)
- Faster responses (increase the service's response time)
- Include new juicy API conserning employee's compensations.

Currency scraper for the Dominican Republic

This is a simple service that provides the current currency exchange rate for
the Dominican Republic. To do so, we parse the web pages of all the major banks
of the Dominican Republic, those pages are updated on a daily basis by every
bank.

The method used by this application to calculate the mean of the data is the
Harmonic mean.

This application is freely available as a service thanks to
Marcos Organizador de Negocios S.R.L here http://api.marcos.do

Something is wrong with this service?
Please contact us (at) manuel at marcos dot do.

or

you may make a pull request as well, if you see something that needs to be fixed
or better implemented.

Install

$ bundle install

Please note that, this service not longer needs imagemagik, ogcr or ocrad.

This application uses port 8080 by default, one may change the port passing it as
the first parameter:

$ ruby curry.rb 1025

Known bugs

There's a bug in older versions of Ruby that causes this application to hang for
an indefinite period of time. Please use Ruby 2.2 +

Available actions

GET /requests

Returns the total number of requests successefully served up to this moment.

sample response:

1092 requests.

GET /rnc/:rnc

Returns information about the RNC specified by :rnc. [JSON serialized]

sample response:

{
  "rnc": "131098193",
  "name": "MARCOS ORGANIZADOR DE NEGOCIOS SRL",
  "comercial_name": "MARCOS ORGANIZADOR DE NEGOCIOS",
  "category": "",
  "payment_regimen": "NORMAL",
  "status": "ACTIVO"
}

GET /ncf/:rnc/:ncf

Returns true or false, depending if the RNC and the NCF specified by :rnc and
:ncf respectively belongs to the entity associated to :rnc

sample response:

{
  "valid": true
}

GET /rates

Returns the exchange rate for euros and dollars from all major banks of the
Dominican Republic. [JSON serialized]

{
  "bpd": {
    "euro": {
      "buying_rate": "48.15",
      "selling_rate": "51.90"
    },
    "dollar": {
      "buying_rate": "45.05",
      "selling_rate": "45.56"
    },
    "source": "https://www.popularenlinea.com/_api/web/lists/getbytitle('Rates')/items"
  },
  "blh": {
    "euro": {
      "buying_rate": "48.00",
      "selling_rate": "51.00"
    },
    "dollar": {
      "buying_rate": "45.20",
      "selling_rate": "45.56"
    },
    "source": "http://www.blh.com.do/Inicio.aspx"
  },
  
  ...
  
  "euro_mean": {
    "buying_rate": "48.12",
    "selling_rate": "51.68"
  },
  "dollar_mean": {
    "buying_rate": "45.16",
    "selling_rate": "45.56"
  }
}

GET /central_bank_rates

Returns the exchange rate for the dollar according to the Central Bank of the
Dominican Republic. [JSON serialized]

sample response:

{
  "dollar": {
    "buying_rate": "45.76",
    "selling_rate": "45.81"
  }
}

License

MIT License

Copyright(C) 2016 Marcos Organizador de Negocios

curry's People

Contributors

eneldoserrata avatar mag21 avatar rmariuzzo avatar

Watchers

 avatar

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.