Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/wnuqui/convertex
A simple Phoenix JSON API application that converts currency.
https://github.com/wnuqui/convertex
convert-currency elixir json-api phoenix
Last synced: 8 days ago
JSON representation
A simple Phoenix JSON API application that converts currency.
- Host: GitHub
- URL: https://github.com/wnuqui/convertex
- Owner: wnuqui
- Created: 2017-08-28T05:23:55.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-11-02T21:59:42.000Z (about 7 years ago)
- Last Synced: 2024-11-18T09:42:57.615Z (2 months ago)
- Topics: convert-currency, elixir, json-api, phoenix
- Language: Elixir
- Size: 49.8 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# convertex [![Build Status](https://travis-ci.org/wnuqui/convertex.png?branch=master)](https://travis-ci.org/wnuqui/convertex) [![Coverage Status](https://coveralls.io/repos/github/wnuqui/convertex/badge.svg?branch=master)](https://coveralls.io/github/wnuqui/convertex?branch=master)
A simple Phoenix JSON API application that converts currency. This is a direct port of [konverter](https://github.com/wnuqui/konverter), a Rails application.
## Specifications
- [x] Convert currency to another currency using Google
- [x] Save/cache conversion for the next 60 seconds
- [x] After 60 seconds, convert using Google again## Sample Usage
Simple `curl` command to convert **USD** to **PHP**.
```bash
# curl command
$ curl -s -X "POST" "http://localhost:4000/api/conversions" \
-H "Content-Type: application/json" \
-d "{\"base\":\"USD\",\"amount\":\"1\",\"target\":\"PHP\"}"# response
# {"data":{"conversion":"1 US dollar = 51.0740 Philippine pesos"}}
```