summaryrefslogtreecommitdiff
path: root/Network
diff options
context:
space:
mode:
Diffstat (limited to 'Network')
-rw-r--r--Network/API/Telegram/Bot.hs5
-rw-r--r--Network/API/Telegram/Bot/Core.hs (renamed from Network/Telegram/API/Bot/Core.hs)2
-rw-r--r--Network/API/Telegram/Bot/Object.hs (renamed from Network/Telegram/API/Bot/Object.hs)9
-rw-r--r--Network/API/Telegram/Bot/Object/Member.hs (renamed from Network/Telegram/API/Bot/Object/Member.hs)8
-rw-r--r--Network/API/Telegram/Bot/Object/Member/Powers.hs (renamed from Network/Telegram/API/Bot/Object/Member/Powers.hs)2
-rw-r--r--Network/API/Telegram/Bot/Object/Member/Restrictions.hs (renamed from Network/Telegram/API/Bot/Object/Member/Restrictions.hs)2
-rw-r--r--Network/API/Telegram/Bot/Object/Sender.hs (renamed from Network/Telegram/API/Bot/Object/Sender.hs)2
-rw-r--r--Network/API/Telegram/Bot/Object/Update.hs (renamed from Network/Telegram/API/Bot/Object/Update.hs)14
-rw-r--r--Network/API/Telegram/Bot/Object/Update/Callback.hs (renamed from Network/Telegram/API/Bot/Object/Update/Callback.hs)6
-rw-r--r--Network/API/Telegram/Bot/Object/Update/Callback/Notification.hs3
-rw-r--r--Network/API/Telegram/Bot/Object/Update/Message.hs (renamed from Network/Telegram/API/Bot/Object/Update/Message.hs)12
-rw-r--r--Network/API/Telegram/Bot/Object/Update/Message/Content.hs (renamed from Network/Telegram/API/Bot/Object/Update/Message/Content.hs)9
-rw-r--r--Network/API/Telegram/Bot/Object/Update/Message/Content/File.hs (renamed from Network/Telegram/API/Bot/Object/Update/Message/Content/File.hs)4
-rw-r--r--Network/API/Telegram/Bot/Object/Update/Message/Content/Info.hs (renamed from Network/Telegram/API/Bot/Object/Update/Message/Content/Info.hs)10
-rw-r--r--Network/API/Telegram/Bot/Object/Update/Message/Content/Location.hs (renamed from Network/Telegram/API/Bot/Object/Update/Message/Content/Location.hs)2
-rw-r--r--Network/API/Telegram/Bot/Object/Update/Message/Content/Size.hs (renamed from Network/Telegram/API/Bot/Object/Update/Message/Content/Size.hs)2
-rw-r--r--Network/API/Telegram/Bot/Object/Update/Message/Keyboard.hs (renamed from Network/Telegram/API/Bot/Object/Update/Message/Keyboard.hs)6
-rw-r--r--Network/API/Telegram/Bot/Object/Update/Message/Keyboard/Button.hs (renamed from Network/Telegram/API/Bot/Object/Update/Message/Keyboard/Button.hs)2
-rw-r--r--Network/API/Telegram/Bot/Object/Update/Message/Origin.hs (renamed from Network/Telegram/API/Bot/Object/Update/Message/Origin.hs)4
-rw-r--r--Network/API/Telegram/Bot/Object/Update/Moving.hs (renamed from Network/Telegram/API/Bot/Object/Update/Moving.hs)4
-rw-r--r--Network/API/Telegram/Bot/Property.hs5
-rw-r--r--Network/API/Telegram/Bot/Property/Accessible.hs (renamed from Network/Telegram/API/Bot/Property/Accessible.hs)12
-rw-r--r--Network/API/Telegram/Bot/Property/Identifiable.hs (renamed from Network/Telegram/API/Bot/Property/Identifiable.hs)14
-rw-r--r--Network/API/Telegram/Bot/Property/Persistable.hs163
-rw-r--r--Network/Telegram/API/Bot.hs5
-rw-r--r--Network/Telegram/API/Bot/Object/Update/Callback/Notification.hs3
-rw-r--r--Network/Telegram/API/Bot/Property.hs5
-rw-r--r--Network/Telegram/API/Bot/Property/Persistable.hs160
28 files changed, 240 insertions, 235 deletions
diff --git a/Network/API/Telegram/Bot.hs b/Network/API/Telegram/Bot.hs
new file mode 100644
index 0000000..418feb7
--- /dev/null
+++ b/Network/API/Telegram/Bot.hs
@@ -0,0 +1,5 @@
+module Network.API.Telegram.Bot (module Exports) where
+
+import Network.API.Telegram.Bot.Property as Exports
+import Network.API.Telegram.Bot.Object as Exports
+import Network.API.Telegram.Bot.Core as Exports
diff --git a/Network/Telegram/API/Bot/Core.hs b/Network/API/Telegram/Bot/Core.hs
index 6c43df3..0c65406 100644
--- a/Network/Telegram/API/Bot/Core.hs
+++ b/Network/API/Telegram/Bot/Core.hs
@@ -1,4 +1,4 @@
-module Network.Telegram.API.Bot.Core (Telegram, telegram, ask', Token (..), Ok, result) where
+module Network.API.Telegram.Bot.Core (Telegram, telegram, ask', Token (..), Ok, result) where
import "aeson" Data.Aeson (FromJSON (parseJSON), withObject, (.:))
import "base" Control.Applicative (Applicative ((<*>)))
diff --git a/Network/Telegram/API/Bot/Object.hs b/Network/API/Telegram/Bot/Object.hs
index 5de113f..bfbebb1 100644
--- a/Network/Telegram/API/Bot/Object.hs
+++ b/Network/API/Telegram/Bot/Object.hs
@@ -1,8 +1,8 @@
-module Network.Telegram.API.Bot.Object (module Exports, Object) where
+module Network.API.Telegram.Bot.Object (module Exports, Object) where
-import Network.Telegram.API.Bot.Object.Update as Exports
-import Network.Telegram.API.Bot.Object.Sender as Exports
-import Network.Telegram.API.Bot.Object.Member as Exports
+import Network.API.Telegram.Bot.Object.Update as Exports
+import Network.API.Telegram.Bot.Object.Sender as Exports
+import Network.API.Telegram.Bot.Object.Member as Exports
import "base" Data.Kind (Constraint)
@@ -19,3 +19,4 @@ type instance Object Origin = ()
type instance Object Callback = ()
type instance Object Button = ()
type instance Object Info = ()
+type instance Object Location = ()
diff --git a/Network/Telegram/API/Bot/Object/Member.hs b/Network/API/Telegram/Bot/Object/Member.hs
index d3352fb..4aca3d4 100644
--- a/Network/Telegram/API/Bot/Object/Member.hs
+++ b/Network/API/Telegram/Bot/Object/Member.hs
@@ -1,7 +1,7 @@
-module Network.Telegram.API.Bot.Object.Member (Member (..), module Exports) where
+module Network.API.Telegram.Bot.Object.Member (Member (..), module Exports) where
-import Network.Telegram.API.Bot.Object.Member.Powers as Exports
-import Network.Telegram.API.Bot.Object.Member.Restrictions as Exports
+import Network.API.Telegram.Bot.Object.Member.Powers as Exports
+import Network.API.Telegram.Bot.Object.Member.Restrictions as Exports
import "aeson" Data.Aeson (FromJSON (parseJSON), Value (Object), withObject, (.:))
import "base" Control.Applicative (Applicative ((<*>)))
@@ -13,7 +13,7 @@ import "base" Text.Show (Show)
import "text" Data.Text (Text)
import "time" Data.Time.Clock.POSIX (POSIXTime)
-import Network.Telegram.API.Bot.Object.Sender (Sender)
+import Network.API.Telegram.Bot.Object.Sender (Sender)
data Member
= Creator Sender
diff --git a/Network/Telegram/API/Bot/Object/Member/Powers.hs b/Network/API/Telegram/Bot/Object/Member/Powers.hs
index 5270c90..5db3c2f 100644
--- a/Network/Telegram/API/Bot/Object/Member/Powers.hs
+++ b/Network/API/Telegram/Bot/Object/Member/Powers.hs
@@ -1,4 +1,4 @@
-module Network.Telegram.API.Bot.Object.Member.Powers (Powers (..)) where
+module Network.API.Telegram.Bot.Object.Member.Powers (Powers (..)) where
import "aeson" Data.Aeson (FromJSON (parseJSON), withObject, (.:))
import "base" Data.Bool (Bool)
diff --git a/Network/Telegram/API/Bot/Object/Member/Restrictions.hs b/Network/API/Telegram/Bot/Object/Member/Restrictions.hs
index 2c83b60..c2f51c1 100644
--- a/Network/Telegram/API/Bot/Object/Member/Restrictions.hs
+++ b/Network/API/Telegram/Bot/Object/Member/Restrictions.hs
@@ -1,4 +1,4 @@
-module Network.Telegram.API.Bot.Object.Member.Restrictions (Restrictions (..)) where
+module Network.API.Telegram.Bot.Object.Member.Restrictions (Restrictions (..)) where
import "aeson" Data.Aeson (FromJSON (parseJSON), withObject, (.:))
import "base" Data.Bool (Bool)
diff --git a/Network/Telegram/API/Bot/Object/Sender.hs b/Network/API/Telegram/Bot/Object/Sender.hs
index 01718fe..1a27f05 100644
--- a/Network/Telegram/API/Bot/Object/Sender.hs
+++ b/Network/API/Telegram/Bot/Object/Sender.hs
@@ -1,4 +1,4 @@
-module Network.Telegram.API.Bot.Object.Sender (Sender (..), nickname, firstname, lastname) where
+module Network.API.Telegram.Bot.Object.Sender (Sender (..), nickname, firstname, lastname) where
import "aeson" Data.Aeson (FromJSON (parseJSON), Object, withObject, (.:), (.:?))
import "aeson" Data.Aeson.Types (Parser)
diff --git a/Network/Telegram/API/Bot/Object/Update.hs b/Network/API/Telegram/Bot/Object/Update.hs
index 28ce466..b9cc5ee 100644
--- a/Network/Telegram/API/Bot/Object/Update.hs
+++ b/Network/API/Telegram/Bot/Object/Update.hs
@@ -1,8 +1,8 @@
-module Network.Telegram.API.Bot.Object.Update (Update (..), module Exports) where
+module Network.API.Telegram.Bot.Object.Update (Update (..), module Exports) where
-import Network.Telegram.API.Bot.Object.Update.Callback as Exports
-import Network.Telegram.API.Bot.Object.Update.Message as Exports
-import Network.Telegram.API.Bot.Object.Update.Moving as Exports
+import Network.API.Telegram.Bot.Object.Update.Callback as Exports
+import Network.API.Telegram.Bot.Object.Update.Message as Exports
+import Network.API.Telegram.Bot.Object.Update.Moving as Exports
import "aeson" Data.Aeson (FromJSON (parseJSON), withObject, (.:))
import "aeson" Data.Aeson.Types (Object, Parser)
@@ -12,9 +12,9 @@ import "base" Data.Functor ((<$>))
import "base" Data.Int (Int)
import "base" Text.Show (Show)
-import Network.Telegram.API.Bot.Object.Update.Callback (Callback)
-import Network.Telegram.API.Bot.Object.Update.Message (Message)
-import Network.Telegram.API.Bot.Object.Update.Moving (Moving)
+import Network.API.Telegram.Bot.Object.Update.Callback (Callback)
+import Network.API.Telegram.Bot.Object.Update.Message (Message)
+import Network.API.Telegram.Bot.Object.Update.Moving (Moving)
data Update
= Query Int Callback
diff --git a/Network/Telegram/API/Bot/Object/Update/Callback.hs b/Network/API/Telegram/Bot/Object/Update/Callback.hs
index 9de031c..55c852b 100644
--- a/Network/Telegram/API/Bot/Object/Update/Callback.hs
+++ b/Network/API/Telegram/Bot/Object/Update/Callback.hs
@@ -1,6 +1,6 @@
-module Network.Telegram.API.Bot.Object.Update.Callback (Callback (..), module Exports) where
+module Network.API.Telegram.Bot.Object.Update.Callback (Callback (..), module Exports) where
-import Network.Telegram.API.Bot.Object.Update.Callback.Notification as Exports
+import Network.API.Telegram.Bot.Object.Update.Callback.Notification as Exports
import "aeson" Data.Aeson (FromJSON (parseJSON), withObject, (.:))
import "base" Control.Applicative (Applicative ((<*>)))
@@ -9,7 +9,7 @@ import "base" Data.Functor ((<$>))
import "base" Text.Show (Show)
import "text" Data.Text (Text)
-import Network.Telegram.API.Bot.Object.Update.Message (Message)
+import Network.API.Telegram.Bot.Object.Update.Message (Message)
data Callback = Datatext Text Message Text deriving Show
diff --git a/Network/API/Telegram/Bot/Object/Update/Callback/Notification.hs b/Network/API/Telegram/Bot/Object/Update/Callback/Notification.hs
new file mode 100644
index 0000000..2289fd6
--- /dev/null
+++ b/Network/API/Telegram/Bot/Object/Update/Callback/Notification.hs
@@ -0,0 +1,3 @@
+module Network.API.Telegram.Bot.Object.Update.Callback.Notification (Notification) where
+
+data Notification
diff --git a/Network/Telegram/API/Bot/Object/Update/Message.hs b/Network/API/Telegram/Bot/Object/Update/Message.hs
index 9cd425f..df28b5d 100644
--- a/Network/Telegram/API/Bot/Object/Update/Message.hs
+++ b/Network/API/Telegram/Bot/Object/Update/Message.hs
@@ -1,8 +1,8 @@
-module Network.Telegram.API.Bot.Object.Update.Message (Message (..), module Exports) where
+module Network.API.Telegram.Bot.Object.Update.Message (Message (..), module Exports) where
-import Network.Telegram.API.Bot.Object.Update.Message.Content as Exports
-import Network.Telegram.API.Bot.Object.Update.Message.Keyboard as Exports
-import Network.Telegram.API.Bot.Object.Update.Message.Origin as Exports
+import Network.API.Telegram.Bot.Object.Update.Message.Content as Exports
+import Network.API.Telegram.Bot.Object.Update.Message.Keyboard as Exports
+import Network.API.Telegram.Bot.Object.Update.Message.Origin as Exports
import "aeson" Data.Aeson (FromJSON (parseJSON), Value (Object), withObject, (.:))
import "aeson" Data.Aeson.Types (Object, Parser)
@@ -14,8 +14,8 @@ import "base" Data.Int (Int)
import "base" Text.Show (Show)
import "text" Data.Text (Text)
-import Network.Telegram.API.Bot.Object.Update.Message.Content (Content)
-import Network.Telegram.API.Bot.Object.Update.Message.Origin (Origin (Private, Group, Supergroup, Channel))
+import Network.API.Telegram.Bot.Object.Update.Message.Content (Content)
+import Network.API.Telegram.Bot.Object.Update.Message.Origin (Origin (Private, Group, Supergroup, Channel))
data Message
= Direct Int Origin Content
diff --git a/Network/Telegram/API/Bot/Object/Update/Message/Content.hs b/Network/API/Telegram/Bot/Object/Update/Message/Content.hs
index 2e9fa0d..cf68add 100644
--- a/Network/Telegram/API/Bot/Object/Update/Message/Content.hs
+++ b/Network/API/Telegram/Bot/Object/Update/Message/Content.hs
@@ -1,8 +1,9 @@
-module Network.Telegram.API.Bot.Object.Update.Message.Content (Content (..), module Exports) where
+module Network.API.Telegram.Bot.Object.Update.Message.Content (Content (..), module Exports) where
-import Network.Telegram.API.Bot.Object.Update.Message.Content.File as Exports
-import Network.Telegram.API.Bot.Object.Update.Message.Content.Info as Exports
-import Network.Telegram.API.Bot.Object.Update.Message.Content.Size as Exports
+import Network.API.Telegram.Bot.Object.Update.Message.Content.File as Exports
+import Network.API.Telegram.Bot.Object.Update.Message.Content.Info as Exports
+import Network.API.Telegram.Bot.Object.Update.Message.Content.Location as Exports
+import Network.API.Telegram.Bot.Object.Update.Message.Content.Size as Exports
import "aeson" Data.Aeson (FromJSON (parseJSON), withArray, withObject, (.:), (.:?))
import "aeson" Data.Aeson.Types (Object, Parser, Value (Object))
diff --git a/Network/Telegram/API/Bot/Object/Update/Message/Content/File.hs b/Network/API/Telegram/Bot/Object/Update/Message/Content/File.hs
index 3627e9a..07cef6d 100644
--- a/Network/Telegram/API/Bot/Object/Update/Message/Content/File.hs
+++ b/Network/API/Telegram/Bot/Object/Update/Message/Content/File.hs
@@ -1,4 +1,4 @@
-module Network.Telegram.API.Bot.Object.Update.Message.Content.File (File (..)) where
+module Network.API.Telegram.Bot.Object.Update.Message.Content.File (File (..)) where
import "aeson" Data.Aeson (FromJSON (parseJSON), withObject, (.:), (.:?))
import "aeson" Data.Aeson.Types (Object, Parser, Value)
@@ -11,7 +11,7 @@ import "base" Data.Maybe (Maybe)
import "base" Text.Show (Show)
import "text" Data.Text (Text)
-import Network.Telegram.API.Bot.Object.Update.Message.Content.Size (Size)
+import Network.API.Telegram.Bot.Object.Update.Message.Content.Size (Size)
data File
= Animation Text Int Int Int (Maybe Size) (Maybe Text) (Maybe Text) (Maybe Int)
diff --git a/Network/Telegram/API/Bot/Object/Update/Message/Content/Info.hs b/Network/API/Telegram/Bot/Object/Update/Message/Content/Info.hs
index 330d3aa..c373788 100644
--- a/Network/Telegram/API/Bot/Object/Update/Message/Content/Info.hs
+++ b/Network/API/Telegram/Bot/Object/Update/Message/Content/Info.hs
@@ -1,4 +1,4 @@
-module Network.Telegram.API.Bot.Object.Update.Message.Content.Info (Info (..)) where
+module Network.API.Telegram.Bot.Object.Update.Message.Content.Info (Info (..)) where
import "aeson" Data.Aeson (FromJSON (parseJSON), withObject, (.:), (.:?))
import "aeson" Data.Aeson.Types (Object, Parser, Value)
@@ -11,10 +11,10 @@ import "base" Data.Maybe (Maybe)
import "base" Text.Show (Show)
import "text" Data.Text (Text)
-import Network.Telegram.API.Bot.Object.Update.Message.Content.Location (Location)
+import Network.API.Telegram.Bot.Object.Update.Message.Content.Location (Location)
data Info = Point Location
- | Contact (Maybe Int) Text (Maybe Text) Text (Maybe Text)
+ | Contact Text (Maybe Text) Text (Maybe Text)
| Venue Location Text Text (Maybe Text) (Maybe Text)
deriving Show
@@ -25,8 +25,8 @@ instance FromJSON Info where
contact v = v .: "contact" >>= info where
info :: Value -> Parser Info
- info = withObject "Contact" $ \i -> Contact <$> i .:? "user_id"
- <*> i .: "first_name" <*> i .:? "last_name"
+ info = withObject "Contact" $ \i -> Contact
+ <$> i .: "first_name" <*> i .:? "last_name"
<*> i .: "phone_number" <*> i .:? "vcard"
venue :: Object -> Parser Info
diff --git a/Network/Telegram/API/Bot/Object/Update/Message/Content/Location.hs b/Network/API/Telegram/Bot/Object/Update/Message/Content/Location.hs
index 219cfc1..a85ca05 100644
--- a/Network/Telegram/API/Bot/Object/Update/Message/Content/Location.hs
+++ b/Network/API/Telegram/Bot/Object/Update/Message/Content/Location.hs
@@ -1,4 +1,4 @@
-module Network.Telegram.API.Bot.Object.Update.Message.Content.Location (Location (..)) where
+module Network.API.Telegram.Bot.Object.Update.Message.Content.Location (Location (..)) where
import "aeson" Data.Aeson (FromJSON (parseJSON), ToJSON (toJSON), object, withObject, (.:), (.=))
import "base" Control.Applicative ((<*>))
diff --git a/Network/Telegram/API/Bot/Object/Update/Message/Content/Size.hs b/Network/API/Telegram/Bot/Object/Update/Message/Content/Size.hs
index 58a528a..b910a82 100644
--- a/Network/Telegram/API/Bot/Object/Update/Message/Content/Size.hs
+++ b/Network/API/Telegram/Bot/Object/Update/Message/Content/Size.hs
@@ -1,4 +1,4 @@
-module Network.Telegram.API.Bot.Object.Update.Message.Content.Size (Size (..)) where
+module Network.API.Telegram.Bot.Object.Update.Message.Content.Size (Size (..)) where
import "aeson" Data.Aeson (FromJSON (parseJSON), withObject, (.:))
import "base" Control.Applicative ((<*>))
diff --git a/Network/Telegram/API/Bot/Object/Update/Message/Keyboard.hs b/Network/API/Telegram/Bot/Object/Update/Message/Keyboard.hs
index 20b07c8..ef15bb8 100644
--- a/Network/Telegram/API/Bot/Object/Update/Message/Keyboard.hs
+++ b/Network/API/Telegram/Bot/Object/Update/Message/Keyboard.hs
@@ -1,13 +1,13 @@
-module Network.Telegram.API.Bot.Object.Update.Message.Keyboard (Keyboard (..), module Exports) where
+module Network.API.Telegram.Bot.Object.Update.Message.Keyboard (Keyboard (..), module Exports) where
-import Network.Telegram.API.Bot.Object.Update.Message.Keyboard.Button as Exports
+import Network.API.Telegram.Bot.Object.Update.Message.Keyboard.Button as Exports
import "aeson" Data.Aeson (FromJSON (parseJSON), ToJSON (toJSON), object, withObject, (.:), (.=))
import "base" Data.Function (($))
import "base" Data.Functor ((<$>))
import "base" Text.Show (Show)
-import Network.Telegram.API.Bot.Object.Update.Message.Keyboard.Button (Button)
+import Network.API.Telegram.Bot.Object.Update.Message.Keyboard.Button (Button)
data Keyboard = Inline [[Button]] deriving Show
diff --git a/Network/Telegram/API/Bot/Object/Update/Message/Keyboard/Button.hs b/Network/API/Telegram/Bot/Object/Update/Message/Keyboard/Button.hs
index 65128eb..b6b8295 100644
--- a/Network/Telegram/API/Bot/Object/Update/Message/Keyboard/Button.hs
+++ b/Network/API/Telegram/Bot/Object/Update/Message/Keyboard/Button.hs
@@ -1,4 +1,4 @@
-module Network.Telegram.API.Bot.Object.Update.Message.Keyboard.Button (Button (..), Pressed (..)) where
+module Network.API.Telegram.Bot.Object.Update.Message.Keyboard.Button (Button (..), Pressed (..)) where
import "aeson" Data.Aeson (FromJSON (parseJSON), ToJSON (toJSON)
, Object, Value (Object), object, withObject, (.:), (.:?), (.=))
diff --git a/Network/Telegram/API/Bot/Object/Update/Message/Origin.hs b/Network/API/Telegram/Bot/Object/Update/Message/Origin.hs
index 5b083ff..e1201c6 100644
--- a/Network/Telegram/API/Bot/Object/Update/Message/Origin.hs
+++ b/Network/API/Telegram/Bot/Object/Update/Message/Origin.hs
@@ -1,4 +1,4 @@
-module Network.Telegram.API.Bot.Object.Update.Message.Origin (Origin (..)) where
+module Network.API.Telegram.Bot.Object.Update.Message.Origin (Origin (..)) where
import "aeson" Data.Aeson (FromJSON (parseJSON), withObject, (.:))
import "aeson" Data.Aeson.Types (Object, Parser, Value)
@@ -10,7 +10,7 @@ import "base" Data.Int (Int64)
import "base" Text.Show (Show)
import "text" Data.Text (Text)
-import Network.Telegram.API.Bot.Object.Sender (Sender)
+import Network.API.Telegram.Bot.Object.Sender (Sender)
data Origin
= Private Int64 Sender
diff --git a/Network/Telegram/API/Bot/Object/Update/Moving.hs b/Network/API/Telegram/Bot/Object/Update/Moving.hs
index d3c63d0..e25b9d3 100644
--- a/Network/Telegram/API/Bot/Object/Update/Moving.hs
+++ b/Network/API/Telegram/Bot/Object/Update/Moving.hs
@@ -1,4 +1,4 @@
-module Network.Telegram.API.Bot.Object.Update.Moving (Moving (..)) where
+module Network.API.Telegram.Bot.Object.Update.Moving (Moving (..)) where
import "aeson" Data.Aeson (FromJSON (parseJSON), withObject, (.:))
import "aeson" Data.Aeson.Types (Object, Parser)
@@ -10,7 +10,7 @@ import "base" Data.Int (Int64)
import "base" Text.Show (Show)
import "text" Data.Text (Text)
-import Network.Telegram.API.Bot.Object.Sender (Sender)
+import Network.API.Telegram.Bot.Object.Sender (Sender)
data Moving
= Gone Sender (Int64, Text)
diff --git a/Network/API/Telegram/Bot/Property.hs b/Network/API/Telegram/Bot/Property.hs
new file mode 100644
index 0000000..58191d5
--- /dev/null
+++ b/Network/API/Telegram/Bot/Property.hs
@@ -0,0 +1,5 @@
+module Network.API.Telegram.Bot.Property (module Exports) where
+
+import Network.API.Telegram.Bot.Property.Persistable as Exports
+import Network.API.Telegram.Bot.Property.Identifiable as Exports
+import Network.API.Telegram.Bot.Property.Accessible as Exports
diff --git a/Network/Telegram/API/Bot/Property/Accessible.hs b/Network/API/Telegram/Bot/Property/Accessible.hs
index e834942..e8eeb9b 100644
--- a/Network/Telegram/API/Bot/Property/Accessible.hs
+++ b/Network/API/Telegram/Bot/Property/Accessible.hs
@@ -1,14 +1,14 @@
-module Network.Telegram.API.Bot.Property.Accessible (Accessible (..)) where
+module Network.API.Telegram.Bot.Property.Accessible (Accessible (..)) where
import "base" Data.Function (flip)
import "base" Data.Functor ((<$>))
import "lens" Control.Lens (Lens')
-import Network.Telegram.API.Bot.Object (Object)
-import Network.Telegram.API.Bot.Object.Update.Callback (Callback (Datatext))
-import Network.Telegram.API.Bot.Object.Update.Message (Message (Direct, Forward, Reply))
-import Network.Telegram.API.Bot.Object.Update.Message.Content (Content)
-import Network.Telegram.API.Bot.Object.Update.Message.Origin (Origin)
+import Network.API.Telegram.Bot.Object (Object)
+import Network.API.Telegram.Bot.Object.Update.Callback (Callback (Datatext))
+import Network.API.Telegram.Bot.Object.Update.Message (Message (Direct, Forward, Reply))
+import Network.API.Telegram.Bot.Object.Update.Message.Content (Content)
+import Network.API.Telegram.Bot.Object.Update.Message.Origin (Origin)
class Object source => Accessible target source where
access :: Lens' source target
diff --git a/Network/Telegram/API/Bot/Property/Identifiable.hs b/Network/API/Telegram/Bot/Property/Identifiable.hs
index 075a15c..06658e1 100644
--- a/Network/Telegram/API/Bot/Property/Identifiable.hs
+++ b/Network/API/Telegram/Bot/Property/Identifiable.hs
@@ -1,14 +1,14 @@
-module Network.Telegram.API.Bot.Property.Identifiable (Identifiable (..), Identificator) where
+module Network.API.Telegram.Bot.Property.Identifiable (Identifiable (..), Identificator) where
import "base" Data.Int (Int, Int64)
import "text" Data.Text (Text)
-import Network.Telegram.API.Bot.Object (Object)
-import Network.Telegram.API.Bot.Object.Update (Update (Query, Membership, Incoming))
-import Network.Telegram.API.Bot.Object.Update.Callback (Callback (Datatext))
-import Network.Telegram.API.Bot.Object.Update.Message (Message (Direct, Forward, Reply))
-import Network.Telegram.API.Bot.Object.Update.Message.Origin (Origin (Private, Group, Supergroup, Channel))
-import Network.Telegram.API.Bot.Object.Sender (Sender (Bot, User))
+import Network.API.Telegram.Bot.Object (Object)
+import Network.API.Telegram.Bot.Object.Update (Update (Query, Membership, Incoming))
+import Network.API.Telegram.Bot.Object.Update.Callback (Callback (Datatext))
+import Network.API.Telegram.Bot.Object.Update.Message (Message (Direct, Forward, Reply))
+import Network.API.Telegram.Bot.Object.Update.Message.Origin (Origin (Private, Group, Supergroup, Channel))
+import Network.API.Telegram.Bot.Object.Sender (Sender (Bot, User))
type family Identificator o = i
diff --git a/Network/API/Telegram/Bot/Property/Persistable.hs b/Network/API/Telegram/Bot/Property/Persistable.hs
new file mode 100644
index 0000000..302d90f
--- /dev/null
+++ b/Network/API/Telegram/Bot/Property/Persistable.hs
@@ -0,0 +1,163 @@
+module Network.API.Telegram.Bot.Property.Persistable
+ (Persistable (..), Capacity (..), Inform (..), Way (..)) where
+
+import "aeson" Data.Aeson (FromJSON, Value, decode, object, (.=))
+import "base" Control.Exception (try)
+import "base" Control.Monad (Monad ((>>=)), join)
+import "base" Data.Bool (Bool (False, True))
+import "base" Data.Function (flip, (.), ($))
+import "base" Data.Functor (Functor (fmap), (<$>))
+import "base" Data.Int (Int, Int64)
+import "base" Data.Maybe (fromJust)
+import "base" Data.Semigroup (Semigroup ((<>)))
+import "base" Data.String (String)
+import "base" Data.Tuple (snd)
+import "http-client" Network.HTTP.Client (Response (responseBody))
+import "tagged" Data.Tagged (Tagged, untag)
+import "text" Data.Text (Text, unpack)
+import "transformers" Control.Monad.Trans.Class (lift)
+import "transformers" Control.Monad.Trans.Except (ExceptT (ExceptT))
+import "transformers" Control.Monad.Trans.Reader (ask)
+import "wreq" Network.Wreq.Session (post)
+
+import Network.API.Telegram.Bot.Core (Telegram, Token (Token), Ok, result)
+import Network.API.Telegram.Bot.Object (Object, Keyboard, Notification, Member, Sender)
+import Network.API.Telegram.Bot.Object.Update.Message (Message)
+import Network.API.Telegram.Bot.Object.Update.Message.Content.Location (Location (Location))
+
+data Inform = Silently | Notify
+
+data Way = Directly | Forwarding | Replying
+
+data Capacity object = Send Inform Way object | Post object | Fetch object | Edit object | Purge object
+
+class Object object => Persistable capacity object where
+ {-# MINIMAL payload, endpoint #-}
+ type Payload (capacity :: * -> Capacity *) object = payload | payload -> capacity object
+ payload :: Payload capacity object -> Value
+ endpoint :: Payload capacity object -> String
+ request :: FromJSON r => Payload capacity object -> Telegram e r
+ request x = request' (endpoint x) (payload x) where
+
+ request' :: forall a e . FromJSON a => String -> Value -> Telegram e a
+ request' e p = snd <$> ask >>= \(session, Token token) -> lift . ExceptT . try
+ . fmap (fromJust . join . fmap result . decode @(Ok a) . responseBody)
+ . flip (post session) p $ "https://api.telegram.org/" <> unpack token <> "/" <> e
+
+instance Persistable 'Edit Keyboard where
+ type instance Payload 'Edit Keyboard
+ = Tagged ('Edit Keyboard) (Int64, Int, Keyboard)
+ payload (untag -> (chat_id, message_id, reply_markup)) = object
+ ["chat_id" .= chat_id, "message_id" .= message_id, "reply_markup" .= reply_markup]
+ endpoint _ = "editMessageReplyMarkup"
+
+instance Persistable 'Post Keyboard where
+ type instance Payload 'Post Keyboard
+ = Tagged ('Post Keyboard) (Int64, Text, Keyboard)
+ payload (untag -> (chat_id, text, kb)) = object
+ ["chat_id" .= chat_id, "text" .= text, "reply_markup" .= kb]
+ endpoint _ = "sendMessage"
+
+instance Persistable ('Send 'Notify 'Directly) Location where
+ type instance Payload ('Send 'Notify 'Directly) Location
+ = Tagged ('Send 'Notify 'Directly Location) (Int64, Location, Int)
+ payload (untag -> (chat_id, Location latitude longitude, live_period)) =
+ object ["chat_id" .= chat_id, "latitude" .= latitude, "longitude" .= longitude,
+ "live_period" .= live_period, "disable_notification" .= False]
+ endpoint _ = "sendLocation"
+
+instance Persistable ('Send 'Silently 'Directly) Location where
+ type instance Payload ('Send 'Silently 'Directly) Location
+ = Tagged ('Send 'Silently 'Directly Location) (Int64, Location, Int)
+ payload (untag -> (chat_id, Location latitude longitude, live_period)) =
+ object ["chat_id" .= chat_id, "latitude" .= latitude, "longitude" .= longitude,
+ "live_period" .= live_period, "disable_notification" .= True]
+ endpoint _ = "sendLocation"
+
+instance Persistable ('Send 'Notify 'Replying) Location where
+ type instance Payload ('Send 'Notify 'Replying) Location
+ = Tagged ('Send 'Notify 'Replying Location) (Int64, Location, Int, Int)
+ payload (untag -> (chat_id, Location latitude longitude, live_period, reply_to_message_id)) = object
+ ["chat_id" .= chat_id, "latitude" .= latitude, "longitude" .= longitude, "live_period" .= live_period,
+ "reply_to_message_id" .= reply_to_message_id, "disable_notification" .= False]
+ endpoint _ = "sendLocation"
+
+instance Persistable ('Send 'Silently 'Replying) Location where
+ type instance Payload ('Send 'Silently 'Replying) Location
+ = Tagged ('Send 'Silently 'Replying Location) (Int64, Location, Int, Int)
+ payload (untag -> (chat_id, Location latitude longitude, live_period, reply_to_message_id)) = object
+ ["chat_id" .= chat_id, "latitude" .= latitude, "longitude" .= longitude, "live_period" .= live_period,
+ "reply_to_message_id" .= reply_to_message_id, "disable_notification" .= True]
+ endpoint _ = "sendLocation"
+
+instance Persistable 'Fetch Member where
+ type instance Payload 'Fetch Member = Tagged ('Fetch Member) (Int64, Int)
+ payload (untag -> (chat_id, user_id)) = object ["chat_id" .= chat_id, "user_id" .= user_id]
+ endpoint _ = "getChatMember"
+
+instance Persistable ('Send 'Notify 'Directly) Message where
+ type instance Payload ('Send 'Notify 'Directly) Message
+ = Tagged ('Send 'Notify 'Directly Message) (Int64, Text)
+ payload (untag -> (chat_id, text)) = object
+ ["chat_id" .= chat_id, "text" .= text, "disable_notification" .= False]
+ endpoint _ = "sendMessage"
+
+instance Persistable ('Send 'Silently 'Directly) Message where
+ type instance Payload ('Send 'Silently 'Directly) Message
+ = Tagged ('Send 'Silently 'Directly Message) (Int64, Text)
+ payload (untag -> (chat_id, text)) = object
+ ["chat_id" .= chat_id, "text" .= text, "disable_notification" .= True]
+ endpoint _ = "sendMessage"
+
+instance Persistable ('Send 'Notify 'Forwarding) Message where
+ type instance Payload ('Send 'Notify 'Forwarding) Message
+ = Tagged ('Send 'Notify 'Forwarding Message) (Int64, Int64, Int)
+ payload (untag -> (chat_id, from_chat_id, message_id)) = object
+ ["chat_id" .= chat_id, "from_chat_id" .= from_chat_id,
+ "message_id" .= message_id, "disable_notification" .= False]
+ endpoint _ = "forwardMessage"
+
+instance Persistable ('Send 'Silently 'Forwarding) Message where
+ type instance Payload ('Send 'Silently 'Forwarding) Message
+ = Tagged ('Send 'Silently 'Forwarding Message) (Int64, Int64, Int)
+ payload (untag -> (chat_id, from_chat_id, message_id)) = object
+ ["chat_id" .= chat_id, "from_chat_id" .= from_chat_id,
+ "message_id" .= message_id, "disable_notification" .= True]
+ endpoint _ = "forwardMessage"
+
+instance Persistable ('Send 'Notify 'Replying) Message where
+ type instance Payload ('Send 'Notify 'Replying) Message
+ = Tagged ('Send 'Notify 'Replying Message) (Int64, Int, Text)
+ payload (untag -> (chat_id, reply_to_message_id, text)) = object
+ ["chat_id" .= chat_id, "reply_to_message_id" .= reply_to_message_id,
+ "text" .= text, "disable_notification" .= False]
+ endpoint _ = "sendMessage"
+
+instance Persistable ('Send 'Silently 'Replying) Message where
+ type instance Payload ('Send 'Silently 'Replying) Message
+ = Tagged ('Send 'Silently 'Replying Message) (Int64, Int, Text)
+ payload (untag -> (chat_id, reply_to_message_id, text)) = object
+ ["chat_id" .= chat_id, "reply_to_message_id" .= reply_to_message_id,
+ "text" .= text, "disable_notification" .= True]
+ endpoint _ = "sendMessage"
+
+instance Persistable 'Edit Message where
+ type instance Payload 'Edit Message = Tagged ('Edit Message) (Int64, Int, Text)
+ payload (untag -> (chat_id, message_id, text)) = object
+ ["chat_id" .= chat_id, "message_id" .= message_id, "text" .= text]
+ endpoint _ = "editMessageText"
+
+instance Persistable 'Purge Message where
+ type instance Payload 'Purge Message = Tagged ('Purge Message) (Int64, Int)
+ payload (untag -> (chat_id, message_id)) = object ["chat_id" .= chat_id, "message_id" .= message_id]
+ endpoint _ = "deleteMessage"
+--
+instance Persistable 'Post Notification where
+ type instance Payload 'Post Notification = Tagged ('Post Notification) (Text, Text)
+ payload (untag -> (cbq_id, text)) = object ["callback_query_id" .= cbq_id, "text" .= text]
+ endpoint _ = "answerCallbackQuery"
+--
+instance Persistable 'Fetch Sender where
+ type instance Payload 'Fetch Sender = Tagged ('Fetch Sender) ()
+ payload _ = object []
+ endpoint _ = "getMe"
diff --git a/Network/Telegram/API/Bot.hs b/Network/Telegram/API/Bot.hs
deleted file mode 100644
index e8ab4ef..0000000
--- a/Network/Telegram/API/Bot.hs
+++ /dev/null
@@ -1,5 +0,0 @@
-module Network.Telegram.API.Bot (module Exports) where
-
-import Network.Telegram.API.Bot.Property as Exports
-import Network.Telegram.API.Bot.Object as Exports
-import Network.Telegram.API.Bot.Core as Exports
diff --git a/Network/Telegram/API/Bot/Object/Update/Callback/Notification.hs b/Network/Telegram/API/Bot/Object/Update/Callback/Notification.hs
deleted file mode 100644
index 957171d..0000000
--- a/Network/Telegram/API/Bot/Object/Update/Callback/Notification.hs
+++ /dev/null
@@ -1,3 +0,0 @@
-module Network.Telegram.API.Bot.Object.Update.Callback.Notification (Notification) where
-
-data Notification
diff --git a/Network/Telegram/API/Bot/Property.hs b/Network/Telegram/API/Bot/Property.hs
deleted file mode 100644
index 322d92e..0000000
--- a/Network/Telegram/API/Bot/Property.hs
+++ /dev/null
@@ -1,5 +0,0 @@
-module Network.Telegram.API.Bot.Property (module Exports) where
-
-import Network.Telegram.API.Bot.Property.Persistable as Exports
-import Network.Telegram.API.Bot.Property.Identifiable as Exports
-import Network.Telegram.API.Bot.Property.Accessible as Exports
diff --git a/Network/Telegram/API/Bot/Property/Persistable.hs b/Network/Telegram/API/Bot/Property/Persistable.hs
deleted file mode 100644
index f4f1e08..0000000
--- a/Network/Telegram/API/Bot/Property/Persistable.hs
+++ /dev/null
@@ -1,160 +0,0 @@
-module Network.Telegram.API.Bot.Property.Persistable
- (Persistable (..), Payload, PL (..), Capacity (..), Message' (..)) where
-
-import "aeson" Data.Aeson (FromJSON, Value, decode, object, (.=))
-import "base" Control.Exception (try)
-import "base" Control.Monad (Monad ((>>=)), join)
-import "base" Data.Function (flip, (.), ($))
-import "base" Data.Functor (Functor (fmap), (<$>))
-import "base" Data.Int (Int, Int64)
-import "base" Data.Maybe (Maybe, fromJust)
-import "base" Data.Semigroup (Semigroup ((<>)))
-import "base" Data.String (String)
-import "base" Data.Tuple (snd)
-import "http-client" Network.HTTP.Client (Response (responseBody))
-import "text" Data.Text (Text, unpack)
-import "transformers" Control.Monad.Trans.Class (lift)
-import "transformers" Control.Monad.Trans.Except (ExceptT (ExceptT))
-import "transformers" Control.Monad.Trans.Reader (ask)
-import "wreq" Network.Wreq.Session (post)
-
-import Network.Telegram.API.Bot.Core (Telegram, Token (Token), Ok, result)
-import Network.Telegram.API.Bot.Object (Object, Keyboard, Notification, Member, Sender)
-import Network.Telegram.API.Bot.Object.Update.Message (Message)
-import Network.Telegram.API.Bot.Object.Update.Message.Content.Info (Info)
-import Network.Telegram.API.Bot.Object.Update.Message.Content.Location (Location)
-
-data Capacity = Post' | Fetch' | Edit' | Purge'
-
-newtype PL c o a = PL a
-
-type family Payload (c :: k) o = r | r -> o c
-
-type instance Payload 'Post' Keyboard = PL 'Post' Keyboard (Int64, Text, Keyboard)
-type instance Payload 'Edit' Keyboard = PL 'Edit' Keyboard (Int64, Int, Keyboard)
-type instance Payload 'Fetch' Member = PL 'Fetch' Member (Int64, Int)
-type instance Payload 'Edit' Message = PL 'Edit' Message (Int64, Int, Text)
-type instance Payload 'Purge' Message = PL 'Purge' Message (Int64, Int)
-type instance Payload 'Post' Notification = PL 'Post' Notification (Text, Text)
-type instance Payload 'Fetch' Sender = PL 'Fetch' Sender ()
-
-data Message' = Direct' Capacity | Forward' Capacity | Reply' Capacity
-
-type instance Payload ('Direct' 'Post') Message = PL ('Direct' 'Post') Message (Int64, Text)
-type instance Payload ('Forward' 'Post') Message = PL ('Forward' 'Post') Message (Int64, Int64, Int)
-type instance Payload ('Reply' 'Post') Message = PL ('Reply' 'Post') Message (Int64, Int, Text)
-
-data Info' = Point' Message' | Contact' Message' | Venue' Message'
-
-type instance Payload ('Point' ('Direct' 'Post')) Info = PL ('Point' ('Direct' 'Post')) Info (Int64, Location, Int)
-type instance Payload ('Contact' ('Direct' 'Post')) Info = PL ('Contact' ('Direct' 'Post')) Info (Int64, Text, Text, Maybe Text, Maybe Text)
-type instance Payload ('Venue' ('Direct' 'Post')) Info = PL ('Venue' ('Direct' 'Post')) Info (Int64, Location, Text, Text, Maybe Text, Maybe Text)
-type instance Payload ('Point' ('Reply' 'Post')) Info = PL ('Point' ('Reply' 'Post')) Info (Int64, Int, Location, Int)
-type instance Payload ('Contact' ('Reply' 'Post')) Info = PL ('Contact' ('Reply' 'Post')) Info (Int64, Int, Text, Text, Maybe Text, Maybe Text)
-type instance Payload ('Venue' ('Reply' 'Post')) Info = PL ('Venue' ('Reply' 'Post')) Info (Int64, Int, Location, Text, Text, Maybe Text, Maybe Text)
-
-data Member' = Kick' | Unban'
-
-type instance Payload 'Kick' Member = PL 'Kick' Member (Int64, Int, Int)
-type instance Payload 'Unban' Member = PL 'Unban' Member (Int64, Int)
-
-class Object o => Persistable c o where
- {-# MINIMAL payload, endpoint #-}
- payload :: Payload c o -> Value
- endpoint :: Payload c o -> String
- request :: FromJSON r => Payload c o -> Telegram e r
- request x = request' (endpoint x) (payload x) where
-
- request' :: forall a e . FromJSON a => String -> Value -> Telegram e a
- request' e p = snd <$> ask >>= \(session, Token token) -> lift . ExceptT . try
- . fmap (fromJust . join . fmap result . decode @(Ok a) . responseBody)
- . flip (post session) p $ "https://api.telegram.org/" <> unpack token <> "/" <> e
-
-instance Persistable 'Edit' Keyboard where
- payload (PL (chat_id, message_id, reply_markup)) = object
- ["chat_id" .= chat_id, "message_id" .= message_id, "reply_markup" .= reply_markup]
- endpoint _ = "editMessageReplyMarkup"
-
-instance Persistable 'Post' Keyboard where
- payload (PL (chat_id, text, kb)) = object
- ["chat_id" .= chat_id, "text" .= text, "reply_markup" .= kb]
- endpoint _ = "sendMessage"
-
-instance Persistable 'Fetch' Member where
- payload (PL (chat_id, user_id)) = object ["chat_id" .= chat_id, "user_id" .= user_id]
- endpoint _ = "getChatMember"
-
-instance Persistable ('Direct' 'Post') Message where
- payload (PL (chat_id, text)) = object ["chat_id" .= chat_id, "text" .= text]
- endpoint _ = "sendMessage"
-
-instance Persistable ('Forward' 'Post') Message where
- payload (PL (chat_id, from_chat_id, message_id)) = object
- ["chat_id" .= chat_id, "from_chat_id" .= from_chat_id, "message_id" .= message_id]
- endpoint _ = "forwardMessage"
-
-instance Persistable ('Reply' 'Post') Message where
- payload (PL (chat_id, reply_to_message_id, text)) = object
- ["chat_id" .= chat_id, "reply_to_message_id" .= reply_to_message_id, "text" .= text]
- endpoint _ = "sendMessage"
-
-instance Persistable 'Purge' Message where
- payload (PL (chat_id, message_id)) = object ["chat_id" .= chat_id, "message_id" .= message_id]
- endpoint _ = "deleteMessage"
-
-instance Persistable 'Post' Notification where
- payload (PL (cbq_id, text)) = object ["callback_query_id" .= cbq_id, "text" .= text]
- endpoint _ = "answerCallbackQuery"
-
-instance Persistable 'Fetch' Sender where
- payload (PL ()) = object []
- endpoint _ = "getMe"
-
-instance Persistable 'Edit' Message where
- payload (PL (chat_id, message_id, text)) = object
- ["chat_id" .= chat_id, "message_id" .= message_id, "text" .= text]
- endpoint _ = "editMessageText"
-
-instance Persistable ('Point' ('Direct' 'Post')) Info where
- payload (PL (chat_id, location, live_period)) = object
- ["chat_id" .= chat_id, "location" .= location, "live_period" .= live_period]
- endpoint _ = "sendLocation"
-
-instance Persistable ('Contact' ('Direct' 'Post')) Info where
- payload (PL (chat_id, phone_number, first_name, last_name, vcard)) =
- object ["chat_id" .= chat_id, "phone_number" .= phone_number,
- "first_name" .= first_name, "last_name" .= last_name, "vcard" .= vcard]
- endpoint _ = "sendContact"
-
-instance Persistable ('Venue' ('Direct' 'Post')) Info where
- payload (PL (chat_id, location, title, address, foursquare_id, foursquare_type)) = object
- ["chat_id" .= chat_id, "location" .= location, "title" .= title, "address" .= address,
- "foursquare_id" .= foursquare_id, "foursquare_type" .= foursquare_type]
- endpoint _ = "sendVenue"
-
-instance Persistable ('Point' ('Reply' 'Post')) Info where
- payload (PL (chat_id, reply_to_message_id, location, live_period)) = object
- ["chat_id" .= chat_id, "reply_to_message_id" .= reply_to_message_id,
- "location" .= location, "live_period" .= live_period]
- endpoint _ = "sendLocation"
-
-instance Persistable ('Contact' ('Reply' 'Post')) Info where
- payload (PL (chat_id, reply_to_message_id, phone_number, first_name, last_name, vcard)) = object
- ["chat_id" .= chat_id, "reply_to_message_id" .= reply_to_message_id, "phone_number" .= phone_number,
- "first_name" .= first_name, "last_name" .= last_name, "vcard" .= vcard]
- endpoint _ = "sendContact"
-
-instance Persistable ('Venue' ('Reply' 'Post')) Info where
- payload (PL (chat_id, reply_to_message_id, location, title, address, foursquare_id, foursquare_type)) = object
- ["chat_id" .= chat_id, "reply_to_message_id" .= reply_to_message_id, "location" .= location, "title" .= title,
- "address" .= address, "foursquare_id" .= foursquare_id, "foursquare_type" .= foursquare_type]
- endpoint _ = "sendVenue"
-
-instance Persistable 'Kick' Member where
- payload (PL (chat_id, user_id, until_date)) = object
- ["chat_id" .= chat_id, "user_id" .= user_id, "until_date" .= until_date]
- endpoint _ = "kickChatMember"
-
-instance Persistable 'Unban' Member where
- payload (PL (chat_id, user_id)) = object ["chat_id" .= chat_id, "user_id" .= user_id]
- endpoint _ = "unbanChatMember"