Skip to content

seanblumenfeld/jawbone-health-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

jawbone-health-example

The command line interface is provided via Makefile targets. To view all the available command line options run make help in the root of the repo.

Known issues

  • For some reason the APIs started returning a 404. This is a result of some sort of initialisation order being wrong. I spent a bit of time trying to fix it but I ran out of time. The tests pass and the command line client works so it must be something to do with how I spin up the main Flask app.

Install

The install the application run:

make build

You will then need to enter an API key attained from your fixer.io api account. Add this api key into the .env file into the variable

FIXERIO_API_KEY=<YOUR-API-KEY>

Once you have done this you will be able to run the application using

make start

Usage

Cli

Print latest rates

You can print the latest exchange rates to the screen by running

make get_latest_rates

API

Get historic rate

You can get a historic rate by curling the api like this

curl 0.0.0.0:5000/rates/2020-01-10

Save historic rate

You can save a historic rate to the database by curling the api like this;

curl -X POST 0.0.0.0:5000/rates/2020-01-10

Deploy

To deploy the application in the foreground run

make start

This will also print logging from all services to the blocking terminal. Logs are not saved to a file currently. A future action would be to integrate a logging service which would push application logs to a decoupled application such as Splunk or Grafana.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published