| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
CDP.Endpoints
Synopsis
- type URL = Text
- type TargetId = Text
- data EPBrowserVersion = EPBrowserVersion
- data EPAllTargets = EPAllTargets
- data EPCurrentProtocol = EPCurrentProtocol
- data EPOpenNewTab = EPOpenNewTab {
- unOpenNewTab :: URL
- data EPActivateTarget = EPActivateTarget {}
- data EPCloseTarget = EPCloseTarget {}
- data EPFrontend = EPFrontend
- data SomeEndpoint where
- SomeEndpoint :: Endpoint ep => ep -> SomeEndpoint
- fromSomeEndpoint :: (forall ep. Endpoint ep => ep -> r) -> SomeEndpoint -> r
- endpoint :: Endpoint ep => Config -> ep -> IO (EndpointResponse ep)
- connectToTab :: Config -> URL -> IO TargetInfo
- class Endpoint ep where
- type EndpointResponse ep :: *
- getEndpoint :: (String, Int) -> ep -> IO (EndpointResponse ep)
- epDecode :: Proxy ep -> ByteString -> Either String (EndpointResponse ep)
- data BrowserVersion = BrowserVersion {}
- data TargetInfo = TargetInfo {
- tiDescription :: Text
- tiDevtoolsFrontendUrl :: Text
- tiId :: Text
- tiTitle :: Text
- tiType :: Text
- tiUrl :: Text
- tiWebSocketDebuggerUrl :: Text
- browserAddress :: (String, Int) -> IO (String, Int, String)
- pageAddress :: (String, Int) -> IO (String, Int, String)
- getRequest :: (String, Int) -> [Text] -> Maybe Text -> Request
- performRequest :: Endpoint ep => Proxy ep -> Request -> IO (EndpointResponse ep)
- parseUri :: String -> Maybe (String, Int, String)
Documentation
data EPBrowserVersion Source #
Constructors
| EPBrowserVersion |
Instances
| Endpoint EPBrowserVersion Source # | |
Defined in CDP.Endpoints Associated Types Methods getEndpoint :: (String, Int) -> EPBrowserVersion -> IO (EndpointResponse EPBrowserVersion) Source # epDecode :: Proxy EPBrowserVersion -> ByteString -> Either String (EndpointResponse EPBrowserVersion) Source # | |
| type EndpointResponse EPBrowserVersion Source # | |
Defined in CDP.Endpoints | |
data EPAllTargets Source #
Constructors
| EPAllTargets |
Instances
| Endpoint EPAllTargets Source # | |
Defined in CDP.Endpoints Associated Types Methods getEndpoint :: (String, Int) -> EPAllTargets -> IO (EndpointResponse EPAllTargets) Source # epDecode :: Proxy EPAllTargets -> ByteString -> Either String (EndpointResponse EPAllTargets) Source # | |
| type EndpointResponse EPAllTargets Source # | |
Defined in CDP.Endpoints | |
data EPCurrentProtocol Source #
Constructors
| EPCurrentProtocol |
Instances
| Endpoint EPCurrentProtocol Source # | |
Defined in CDP.Endpoints Associated Types Methods getEndpoint :: (String, Int) -> EPCurrentProtocol -> IO (EndpointResponse EPCurrentProtocol) Source # epDecode :: Proxy EPCurrentProtocol -> ByteString -> Either String (EndpointResponse EPCurrentProtocol) Source # | |
| type EndpointResponse EPCurrentProtocol Source # | |
Defined in CDP.Endpoints | |
data EPOpenNewTab Source #
Constructors
| EPOpenNewTab | |
Fields
| |
Instances
| Endpoint EPOpenNewTab Source # | |
Defined in CDP.Endpoints Associated Types Methods getEndpoint :: (String, Int) -> EPOpenNewTab -> IO (EndpointResponse EPOpenNewTab) Source # epDecode :: Proxy EPOpenNewTab -> ByteString -> Either String (EndpointResponse EPOpenNewTab) Source # | |
| type EndpointResponse EPOpenNewTab Source # | |
Defined in CDP.Endpoints | |
data EPActivateTarget Source #
Constructors
| EPActivateTarget | |
Fields | |
Instances
| Endpoint EPActivateTarget Source # | |
Defined in CDP.Endpoints Associated Types Methods getEndpoint :: (String, Int) -> EPActivateTarget -> IO (EndpointResponse EPActivateTarget) Source # epDecode :: Proxy EPActivateTarget -> ByteString -> Either String (EndpointResponse EPActivateTarget) Source # | |
| type EndpointResponse EPActivateTarget Source # | |
Defined in CDP.Endpoints | |
data EPCloseTarget Source #
Constructors
| EPCloseTarget | |
Fields | |
Instances
| Endpoint EPCloseTarget Source # | |
Defined in CDP.Endpoints Associated Types Methods getEndpoint :: (String, Int) -> EPCloseTarget -> IO (EndpointResponse EPCloseTarget) Source # epDecode :: Proxy EPCloseTarget -> ByteString -> Either String (EndpointResponse EPCloseTarget) Source # | |
| type EndpointResponse EPCloseTarget Source # | |
Defined in CDP.Endpoints | |
data EPFrontend Source #
Constructors
| EPFrontend |
Instances
| Endpoint EPFrontend Source # | |
Defined in CDP.Endpoints Associated Types Methods getEndpoint :: (String, Int) -> EPFrontend -> IO (EndpointResponse EPFrontend) Source # epDecode :: Proxy EPFrontend -> ByteString -> Either String (EndpointResponse EPFrontend) Source # | |
| type EndpointResponse EPFrontend Source # | |
Defined in CDP.Endpoints | |
data SomeEndpoint where Source #
Constructors
| SomeEndpoint :: Endpoint ep => ep -> SomeEndpoint |
fromSomeEndpoint :: (forall ep. Endpoint ep => ep -> r) -> SomeEndpoint -> r Source #
endpoint :: Endpoint ep => Config -> ep -> IO (EndpointResponse ep) Source #
Sends a request with the given parameters to the corresponding endpoint
connectToTab :: Config -> URL -> IO TargetInfo Source #
Creates a session with a new tab
class Endpoint ep where Source #
Associated Types
type EndpointResponse ep :: * Source #
Methods
getEndpoint :: (String, Int) -> ep -> IO (EndpointResponse ep) Source #
epDecode :: Proxy ep -> ByteString -> Either String (EndpointResponse ep) Source #
Instances
data BrowserVersion Source #
Constructors
| BrowserVersion | |
Fields
| |
Instances
| Eq BrowserVersion Source # | |
Defined in CDP.Endpoints Methods (==) :: BrowserVersion -> BrowserVersion -> Bool # (/=) :: BrowserVersion -> BrowserVersion -> Bool # | |
| Show BrowserVersion Source # | |
Defined in CDP.Endpoints Methods showsPrec :: Int -> BrowserVersion -> ShowS # show :: BrowserVersion -> String # showList :: [BrowserVersion] -> ShowS # | |
| FromJSON BrowserVersion Source # | |
Defined in CDP.Endpoints Methods parseJSON :: Value -> Parser BrowserVersion # parseJSONList :: Value -> Parser [BrowserVersion] # | |
data TargetInfo Source #
Constructors
| TargetInfo | |
Fields
| |
Instances
| Show TargetInfo Source # | |
Defined in CDP.Endpoints Methods showsPrec :: Int -> TargetInfo -> ShowS # show :: TargetInfo -> String # showList :: [TargetInfo] -> ShowS # | |
| FromJSON TargetInfo Source # | |
Defined in CDP.Endpoints | |
performRequest :: Endpoint ep => Proxy ep -> Request -> IO (EndpointResponse ep) Source #