Copyright | (c) Naoto Shimazaki 20172018 |
---|---|
License | MIT (see the file LICENSE) |
Maintainer | https://github.com/nshimaza |
Stability | experimental |
Safe Haskell | None |
Language | Haskell2010 |
Network.WebexTeams
Description
This module provides types and functions for accessing Cisco Webex Teams REST API.
The module is designed to improve type safety over the API. Each entity is separately typed. JSON messages contained in REST responses are decoded into appropriate type of Haskell record. JSON messages sent in REST requests are encoded only from correct type of record.
Some Webex Teams REST API return list of objects. Those APIs require HTTP Link Header based pagination. Haskell functions for those APIs automatically request subsequent pages as needed.
Examples
-- Sending a message to a room. let auth = Authorization "your authorization token" roomId = RoomId "Room ID your message to be sent" messageText = MessageText "your message" message = CreateMessage (Just roomId) Nothing Nothing (Just messageText) Nothing Nothing createEntity auth def createMessage >>= prin