Skip to content

Commit

Permalink
docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Marco Zocca committed Jul 6, 2023
1 parent 7530d2b commit 17a3a82
Showing 1 changed file with 19 additions and 2 deletions.
21 changes: 19 additions & 2 deletions ms-graph-api/src/MSGraphAPI/Users/Group.hs
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
-- | Users.Group
--
-- A 'Group' is an AAD group, which can be a Microsoft 365 group, or a security group.
--
-- A team in Microsoft Teams is a collection of channel objects. A channel represents a topic, and therefore a logical isolation of discussion, within a team.
--
-- Every team is associated with a Microsoft 365 group. The group has the same ID as the team - for example, @\/groups\/{id}\/team is the same@ as @\/teams\/{id}@.
module MSGraphAPI.Users.Group (
-- * Teams
-- ** Joined teams
Expand All @@ -11,6 +17,7 @@ module MSGraphAPI.Users.Group (
, listTeamChannels
-- ** Channel messages
, listChannelMessages
, getChannelMessage
, listMessageReplies
-- * Drive items
, listGroupsDriveItems
Expand Down Expand Up @@ -83,9 +90,19 @@ listChannelMessages ::
listChannelMessages tid chid =
MSG.get ["teams", tid, "channels", chid, "messages"] mempty

-- | Retrieve a single message or a message reply in a channel or a chat.
--
-- @GET \/teams\/{team-id}\/channels\/{channel-id}\/messages\/{message-id}@
getChannelMessage :: Text -- ^ team ID
-> Text -- ^ channel ID
-> Text -- ^ message ID
-> AccessToken -> Req ChatMessage
getChannelMessage tid chid mid =
MSG.get ["teams", tid, "channels", chid, "messages", mid] mempty

-- | List all the replies to a message in a channel of a team.
--
-- This method lists only the replies of the specified message, if any. To get the message itself, simply call get channel message.
-- This method lists only the replies of the specified message, if any. To get the message itself, use 'getChannelMessage'.
--
-- GET /teams/{team-id}/channels/{channel-id}/messages/{message-id}/replies
listMessageReplies ::
Expand All @@ -97,7 +114,7 @@ listMessageReplies tid chid mid =
MSG.get ["teams", tid, "channels", chid, "messages", mid, "replies"] mempty


-- | An individual chat message within a channel or chat. The message can be a root message or part of a thread
-- | An individual chat message within a channel or chat. The message can be a root message or part of a thread
--
-- https://learn.microsoft.com/en-us/graph/api/resources/chatmessage?view=graph-rest-1.0
data ChatMessage = ChatMessage {
Expand Down

0 comments on commit 17a3a82

Please sign in to comment.