Pebble.Companion.Timeline

Timeline commands for companion-driven pins.

init _ =
    ( model, Timeline.getToken GotToken )

subscriptions _ =
    Timeline.onToken GotToken

Commands

getToken

getToken : (Result String String -> msg) -> Cmd msg

Request the timeline token for the current user.

insertPin

insertPin : Encode.Value -> (Result String () -> msg) -> Cmd msg

Insert or update a timeline pin from encoded pin JSON.

deletePin

deletePin : String -> (Result String () -> msg) -> Cmd msg

Delete a timeline pin by id.

setupToken

setupToken : Cmd msg

Register the timeline token platform handler with the companion bridge.

setupCommands

setupCommands : Cmd msg

Register the timeline command platform handler with the companion bridge.

Subscriptions

onToken

onToken : (Result String String -> msg) -> Sub msg

Receive timeline token command responses on the dedicated timeline port.

onCommands

onCommands : (Result String () -> msg) -> Sub msg

Receive timeline command responses on the dedicated timeline port.