Add documentation to exposed modules

pull/1/head
Bram van den Heuvel 2023-03-16 10:24:03 +01:00
parent d03aea1f3f
commit 0c535916eb
3 changed files with 38 additions and 5 deletions

View File

@ -1,4 +1,9 @@
module Matrix exposing (..) module Matrix exposing
( Vault, fromLoginCredentials, fromAccessToken
, sync, VaultUpdate, updateWith
, getRooms, getRoomById, getInvites
, joinRoomById
)
{-| This is the main module of the SDK. Here, you will find basic functions to {-| This is the main module of the SDK. Here, you will find basic functions to
interact with the API. interact with the API.
@ -16,7 +21,12 @@ interact with the API.
# Exploring your vault # Exploring your vault
@docs getRooms, getRoomById, accessToken @docs getRooms, getRoomById, getInvites
# Taking action
@docs joinRoomById
-} -}

View File

@ -1,6 +1,23 @@
module Matrix.Room exposing (..) module Matrix.Room exposing
( Room, roomId, mostRecentEvents
, sendMessage, sendMessages, sendOneEvent, sendMultipleEvents
)
{-| -} {-| This module provides functions for working with Matrix rooms.
# Room
A room represents a channel of communication within a Matrix home server.
@docs Room, roomId, mostRecentEvents
# Sending events
@docs sendMessage, sendMessages, sendOneEvent, sendMultipleEvents
-}
import Internal.Api.VaultUpdate exposing (VaultUpdate) import Internal.Api.VaultUpdate exposing (VaultUpdate)
import Internal.Event as Event import Internal.Event as Event

View File

@ -1,4 +1,4 @@
module Matrix.RoomInvite exposing (..) module Matrix.RoomInvite exposing (RoomInvite, accept, reject, acceptWithReason, rejectWithReason)
{-| Sometimes, your user will be invited to a new room! {-| Sometimes, your user will be invited to a new room!
This module offers you a few simple handles to deal with such invites - This module offers you a few simple handles to deal with such invites -
@ -18,6 +18,12 @@ Be careful though, anyone can invite you to any room! This means that room invit
may contain offensive, shocking or other unwanted content that the user may not may contain offensive, shocking or other unwanted content that the user may not
want to see. want to see.
@docs RoomInviteEvent getEvent, getAllEvents
Once you have the event you want, you can explore it with the following functions.
@docs sender, stateKey, contentType, content
-} -}
import Internal.Api.VaultUpdate exposing (VaultUpdate) import Internal.Api.VaultUpdate exposing (VaultUpdate)