Add documentation for StrippedEvent

pull/31/head
Bram 2024-06-08 15:32:17 +02:00
parent 6783186c18
commit 693124aa15
2 changed files with 10 additions and 2 deletions

View File

@ -124,6 +124,7 @@ docs :
, room : TypeDocs , room : TypeDocs
, settings : TypeDocs , settings : TypeDocs
, stateManager : TypeDocs , stateManager : TypeDocs
, strippedEvent : TypeDocs
, timeline : TypeDocs , timeline : TypeDocs
, timelineFilter : TypeDocs , timelineFilter : TypeDocs
, unsigned : TypeDocs , unsigned : TypeDocs
@ -206,6 +207,12 @@ docs =
, "Instead of making the user loop through the room's timeline of events, the StateManager offers the user a dictionary-like experience to navigate through the Matrix room state." , "Instead of making the user loop through the room's timeline of events, the StateManager offers the user a dictionary-like experience to navigate through the Matrix room state."
] ]
} }
, strippedEvent =
{ name = "StrippedEvent"
, description =
[ "The StrippedEvent is a simplified Matrix event that contains no metadata."
]
}
, timeline = , timeline =
{ name = "Timeline" { name = "Timeline"
, description = , description =

View File

@ -11,6 +11,7 @@ The stripped event is a simple Matrix event that does not contain any metadata.
-} -}
import Internal.Config.Text as Text
import Internal.Tools.Json as Json import Internal.Tools.Json as Json
@ -21,8 +22,8 @@ type alias StrippedEvent =
coder : Json.Coder StrippedEvent coder : Json.Coder StrippedEvent
coder = coder =
Json.object2 Json.object2
{ name = Debug.todo "Needs name" { name = Text.docs.strippedEvent.name
, description = Debug.todo "Needs description" , description = Text.docs.strippedEvent.description
, init = StrippedEvent , init = StrippedEvent
} }
(Json.field.required (Json.field.required