Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Web.Slack.Experimental.Views
Contents
Description
Publishing views using the Blocks API.
This is used for App Home and modals.
https://api.slack.com/methods/views.publish
Since: 2.1.0.0
Synopsis
- data SlackView inner = SlackView {
- blocks :: Vector SlackBlock
- privateMetadata :: Maybe Text
- callbackId :: Maybe Text
- externalId :: Maybe Text
- inner :: inner
- data HomeTabView = HomeTabView {}
- data ModalView = ModalView {
- type_ :: Expected "modal"
- title :: SlackPlainTextOnly
- close :: Maybe SlackPlainTextOnly
- submit :: Maybe SlackPlainTextOnly
- submitDisabled :: Maybe Bool
- data Expected (lit :: Symbol) = Expected
- data PublishReq = PublishReq {
- userId :: UserId
- view :: SlackView HomeTabView
- data PublishResp = PublishResp {}
- type Api = "views.publish" :> (AuthProtect "token" :> (ReqBody '[FormUrlEncoded] PublishReq :> Post '[JSON] (ResponseJSON PublishResp)))
- viewsPublish :: SlackConfig -> PublishReq -> IO (Response PublishResp)
Types
View definition for some Slack surface. Has an inner type of either
ModalView
or HomeTabView
.
https://api.slack.com/reference/surfaces/views
Since: 2.1.0.0
Constructors
SlackView | |
Fields
|
Instances
data HomeTabView Source #
Since: 2.1.0.0
Constructors
HomeTabView | |
Instances
Constructors
ModalView | |
Fields
|
Instances
data Expected (lit :: Symbol) Source #
Expected a given value as a string. Useful for type
fields in json.
Constructors
Expected |
Instances
KnownSymbol lit => FromJSON (Expected lit) Source # | |
Defined in Web.Slack.AesonUtils | |
KnownSymbol lit => ToJSON (Expected lit) Source # | |
KnownSymbol lit => Show (Expected lit) Source # | |
KnownSymbol lit => Eq (Expected lit) Source # | |
Requests and responses
data PublishReq Source #
Constructors
PublishReq | |
Fields
|
Instances
Show PublishReq Source # | |
Defined in Web.Slack.Experimental.Views Methods showsPrec :: Int -> PublishReq -> ShowS # show :: PublishReq -> String # showList :: [PublishReq] -> ShowS # | |
ToForm PublishReq Source # | |
Defined in Web.Slack.Experimental.Views Methods toForm :: PublishReq -> Form # |
data PublishResp Source #
Since: 2.1.0.0
Constructors
PublishResp | |
Fields |
Instances
FromJSON PublishResp Source # | |
Defined in Web.Slack.Experimental.Views | |
ToJSON PublishResp Source # | |
Defined in Web.Slack.Experimental.Views Methods toJSON :: PublishResp -> Value # toEncoding :: PublishResp -> Encoding # toJSONList :: [PublishResp] -> Value # toEncodingList :: [PublishResp] -> Encoding # omitField :: PublishResp -> Bool # | |
Show PublishResp Source # | |
Defined in Web.Slack.Experimental.Views Methods showsPrec :: Int -> PublishResp -> ShowS # show :: PublishResp -> String # showList :: [PublishResp] -> ShowS # |
type Api = "views.publish" :> (AuthProtect "token" :> (ReqBody '[FormUrlEncoded] PublishReq :> Post '[JSON] (ResponseJSON PublishResp))) Source #
Since: 2.1.0.0
viewsPublish :: SlackConfig -> PublishReq -> IO (Response PublishResp) Source #