From 094cb864323a5ee34906bddd89c6809a8cd0066e Mon Sep 17 00:00:00 2001 From: Marco Milanesi Date: Mon, 9 Apr 2018 20:53:58 +0200 Subject: [PATCH 1/2] Add naked JSON renderer --- lib/forecastr/renderer/json.ex | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 lib/forecastr/renderer/json.ex diff --git a/lib/forecastr/renderer/json.ex b/lib/forecastr/renderer/json.ex new file mode 100644 index 0000000..428805b --- /dev/null +++ b/lib/forecastr/renderer/json.ex @@ -0,0 +1,12 @@ +defmodule Forecastr.Renderer.JSON do + + @moduledoc """ + JSON "renderer". + Currently it just returns what the OWM API will return + """ + + @spec render(map()) :: map() + def render(forecast) do + forecast + end +end From 5507bd18f2a0978804c09bed0a19e3eaffe53814 Mon Sep 17 00:00:00 2001 From: Marco Milanesi Date: Mon, 9 Apr 2018 20:56:12 +0200 Subject: [PATCH 2/2] Update the README --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index a9d7272..1ce6a7b 100644 --- a/README.md +++ b/README.md @@ -63,8 +63,8 @@ Sample output for 5 days: - [X] Tests! (reached ~80%, good enough for now ™, however if someone feels like to add more.. ;)) - [ ] Correct ASCII Art for the renderers that supports that (In progress) - [ ] PNG Renderer with transparency (In progress) +- [ ] JSON renderer (In progress) - [ ] Integrate https://forecast.io as a backend? -- [ ] JSON renderer # Thank yous