Safe Haskell | None |
---|---|
Language | Haskell2010 |
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 #
Instances
Endpoint EPBrowserVersion Source # | |
Defined in CDP.Endpoints 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 #
Instances
Endpoint EPAllTargets Source # | |
Defined in CDP.Endpoints 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 #
Instances
Endpoint EPCurrentProtocol Source # | |
Defined in CDP.Endpoints | |
type EndpointResponse EPCurrentProtocol Source # | |
Defined in CDP.Endpoints |
data EPOpenNewTab Source #
Instances
Endpoint EPOpenNewTab Source # | |
Defined in CDP.Endpoints 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 #
Instances
Endpoint EPActivateTarget Source # | |
Defined in CDP.Endpoints 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 #
Instances
Endpoint EPCloseTarget Source # | |
Defined in CDP.Endpoints 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 #
Instances
Endpoint EPFrontend Source # | |
Defined in CDP.Endpoints 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 #
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 #
type EndpointResponse ep :: * Source #
getEndpoint :: (String, Int) -> ep -> IO (EndpointResponse ep) Source #
epDecode :: Proxy ep -> ByteString -> Either String (EndpointResponse ep) Source #
Instances
data BrowserVersion Source #
BrowserVersion | |
|
Instances
Eq BrowserVersion Source # | |
Defined in CDP.Endpoints (==) :: BrowserVersion -> BrowserVersion -> Bool # (/=) :: BrowserVersion -> BrowserVersion -> Bool # | |
Show BrowserVersion Source # | |
Defined in CDP.Endpoints showsPrec :: Int -> BrowserVersion -> ShowS # show :: BrowserVersion -> String # showList :: [BrowserVersion] -> ShowS # | |
FromJSON BrowserVersion Source # | |
Defined in CDP.Endpoints parseJSON :: Value -> Parser BrowserVersion # parseJSONList :: Value -> Parser [BrowserVersion] # |
data TargetInfo Source #
TargetInfo | |
|
Instances
Show TargetInfo Source # | |
Defined in CDP.Endpoints showsPrec :: Int -> TargetInfo -> ShowS # show :: TargetInfo -> String # showList :: [TargetInfo] -> ShowS # | |
FromJSON TargetInfo Source # | |
Defined in CDP.Endpoints parseJSON :: Value -> Parser TargetInfo # parseJSONList :: Value -> Parser [TargetInfo] # |
performRequest :: Endpoint ep => Proxy ep -> Request -> IO (EndpointResponse ep) Source #