| Copyright | (c) Justus Adam 2017 |
|---|---|
| License | BSD3 |
| Maintainer | dev@justus.science |
| Stability | experimental |
| Portability | POSIX |
| Safe Haskell | None |
| Language | Haskell2010 |
Marvin.Adapter.Telegram.Push
Description
Caveats:
resolveUser and resolveChannel resolving are not yet supported in this adapter and always returns Nothing. See #10.
- data TelegramAdapter updateType
- data Push
- data TelegramChat = TelegramChat Integer ChatType (Maybe Text) (Maybe Text) (Maybe Text)
- data ChatType
- data TelegramUser = TelegramUser Integer Text (Maybe Text) (Maybe Text)
- class MkTelegram a
- class HasUsername s a | s -> a where
- class HasLastName s a | s -> a where
- class HasId_ s a | s -> a where
- class HasFirstName s a | s -> a where
- class HasType_ s a | s -> a where
Documentation
data TelegramAdapter updateType Source #
The telegram adapter type for a particular update type. Either Push or Poll
Instances
| MkTelegram a => IsAdapter (TelegramAdapter a) Source # | |
| type User (TelegramAdapter a) Source # | |
| type Channel (TelegramAdapter a) Source # | |
Use the telegram API by recieving updates as a server via webhook
Note: The initialization for this adapter _includes_ registering or clearing its own webhook.
Instances
data TelegramChat Source #
A telegram chat object as contained in telegram updates
Chat type as defined by the telegram api
Constructors
| PrivateChat | |
| GroupChat | |
| SupergroupChat | |
| ChannelChat |
data TelegramUser Source #
A user object as contained in the telegram update objects
class MkTelegram a Source #
Class to enable polymorphism over update mechanics for TelegramAdapter
Minimal complete definition
mkEventGetter, mkAdapterId
Instances