summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/Comm/LoadStory.elm')
-rw-r--r--src/Comm/LoadStory.elm34
1 files changed, 34 insertions, 0 deletions
diff --git a/src/Comm/LoadStory.elm b/src/Comm/LoadStory.elm
new file mode 100644
index 0000000..869d21b
--- /dev/null
+++ b/src/Comm/LoadStory.elm
@@ -0,0 +1,34 @@
+module Comm.LoadStory exposing (request)
+
+-- Elm -------------------------------------------------------------------------
+import Http
+
+-- Tonkadur --------------------------------------------------------------------
+import Tonkadur.Json
+
+-- Local Module ----------------------------------------------------------------
+import Struct.Event
+
+--------------------------------------------------------------------------------
+-- TYPES -----------------------------------------------------------------------
+--------------------------------------------------------------------------------
+
+--------------------------------------------------------------------------------
+-- LOCAL -----------------------------------------------------------------------
+--------------------------------------------------------------------------------
+
+--------------------------------------------------------------------------------
+-- EXPORTED --------------------------------------------------------------------
+--------------------------------------------------------------------------------
+request : String -> (Cmd Struct.Event.Type)
+request story_url =
+ (Http.get
+ {
+ url = story_url,
+ expect =
+ (Http.expectJson
+ Struct.Event.LoadStory
+ (Tonkadur.Json.decoder)
+ )
+ }
+ )