carpe/elm-data/1.1.0

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:6f3e1b17964105a22fd368586d7b7c0c11cc6dd9 (Software Heritage, origin https://github.com/carpe/elm-data).

What we checked: Software Heritage archived tag 1.1.0 of github.com/carpe/elm-data at commit 6f3e1b179641; its commit 6f3e1b179641 is from 2020-01-03 19:33 UTC, before the version was published (2020-01-03 19:41 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/1.1.0/

ElmData.Resource

Resource allows you to make requests on behalf of a DAO, without having to think about the state of the DAO

type alias Resource recordType externalMsg =
{ create : Session -> recordType -> Cmd externalMsg
, fetch : Session -> String -> Cmd externalMsg
, update : Session -> recordType -> Cmd externalMsg
}

A Resource that can be used to make requests that target a single record. (i.e. SHOW/CREATE/UPDATE)

type ResourceMsg recordType
= Success recordType
| Failure RequestError

A message that contains the results of a request

DAO recordType
-> (ResourceMsg recordType -> localMsg)
-> (localMsg -> externalMsg)
-> Resource recordType externalMsg

Convenience function for creating a Resource