Pebble.Companion.Timeline
Timeline commands for companion-driven pins.
init _ =
( model, Timeline.getToken GotToken )
subscriptions _ =
Timeline.onToken GotTokenCommands
getToken
getToken : (Result String String -> msg) -> Cmd msgRequest the timeline token for the current user.
insertPin
insertPin : Encode.Value -> (Result String () -> msg) -> Cmd msgInsert or update a timeline pin from encoded pin JSON.
deletePin
deletePin : String -> (Result String () -> msg) -> Cmd msgDelete a timeline pin by id.
setupToken
setupToken : Cmd msgRegister the timeline token platform handler with the companion bridge.
setupCommands
setupCommands : Cmd msgRegister the timeline command platform handler with the companion bridge.
Subscriptions
onToken
onToken : (Result String String -> msg) -> Sub msgReceive timeline token command responses on the dedicated timeline port.
onCommands
onCommands : (Result String () -> msg) -> Sub msgReceive timeline command responses on the dedicated timeline port.