carpe/elm-data/4.0.4

NOTE: the latest version is 4.0.5

Rerouted (archive, verified). The original repository is gone. This copy comes from an archive (Software Heritage). The Lamdera package server serves a copy recovered from swh:1:rev:4abc9c6bb1c67f0e0bbd50530c4617374a690805 (Software Heritage, origin https://github.com/carpe/elm-data).

What we checked: Software Heritage archived tag 4.0.4 of github.com/carpe/elm-data at commit 4abc9c6bb1c6; its commit 4abc9c6bb1c6 is from 2020-03-17 23:35 UTC, before the version was published (2020-03-17 23:35 UTC); elm.json is byte-identical to package.elm-lang.org's; the exposed modules match docs.json; the zip is our own, made from Software Heritage's copy of the files Elm uses, so its SHA-1 is not the published one.

The Lamdera compiler uses this copy and prints a one-line notice saying so. elm itself fails to download this version.

Details · package.elm-lang.org's zip: https://github.com/carpe/elm-data/zipball/4.0.4/

ElmData.DAO

DAOs (Data Access Objects) exist to hold all state relevant to making requests to an API.

type alias DAO recordType =
{ apiUrl : String
, authConfig : AuthConfig
, deserialize : Decoder recordType
, serialize : recordType -> Value
}

the dao

createDAO : String -> Decoder recordType -> (recordType -> Value) -> DAO recordType

Function used to create a DAO

String
-> AuthConfig
-> Decoder recordType
-> (recordType -> Value)
-> DAO recordType

Function used to create a DAO