Begin working on Http requests.

This commit is contained in:
2018-12-08 13:49:30 -08:00
parent c292a4c29b
commit 3656b0f3f0
7 changed files with 128 additions and 11 deletions

21
src/Scylla/Model.elm Normal file
View File

@@ -0,0 +1,21 @@
module Scylla.Model exposing (..)
import Scylla.Api exposing (..)
import Scylla.Sync exposing (SyncResponse)
import Scylla.Login exposing (LoginResponse)
import Browser.Navigation as Nav
import Browser
import Http
import Url exposing (Url)
type alias Model =
{ key : Nav.Key
, token : Maybe ApiToken
, apiUrl : ApiUrl
}
type Msg =
TryUrl Browser.UrlRequest
| ChangeUrl Url
| ReceiveSyncResponse (Result Http.Error SyncResponse)
| ReceiveLoginResponse (Result Http.Error LoginResponse)