vjousse / elm-mastodon-tooty / Mastodon.Http

Build Mastodon http queries

Definition


type Action
    = GET String
    | POST String
    | DELETE String

Action


type alias Links =
{ prev : Maybe String
, next : Maybe String 
}

Links


type alias Request a =
HttpBuilder.RequestBuilder (Response a)

Request


type alias Response a =
{ decoded : a
, links : Links 
}

Response

extractLinks : Dict String String -> Links

extractLinks

getAuthorizationUrl : Mastodon.Model.AppRegistration -> String

getAuthorizationUrl

send : HttpBuilder.RequestBuilder msg -> Platform.Cmd.Cmd msg

send

withBodyDecoder : (Result Mastodon.Model.Error (Response a) -> msg) -> Json.Decode.Decoder a -> HttpBuilder.RequestBuilder b -> HttpBuilder.RequestBuilder msg

withBodyDecoder

withClient : Mastodon.Model.Client -> HttpBuilder.RequestBuilder a -> HttpBuilder.RequestBuilder a

withClient

withQueryParams : List ( String, String ) -> HttpBuilder.RequestBuilder a -> HttpBuilder.RequestBuilder a

withQueryParams