webex-teams-api-0.2.0.1: A Haskell bindings for Webex Teams API
Copyright(c) Naoto Shimazaki 20172018
LicenseMIT (see the file LICENSE)
Maintainerhttps://github.com/nshimaza
Stabilityexperimental
Safe HaskellNone
LanguageHaskell2010

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