Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- data OpenTok
- opentok :: APIKey -> APISecret -> OpenTok
- createSession :: OpenTok -> SessionOptions -> IO (Either OTError Session)
- generateToken :: OpenTok -> SessionId -> TokenOptions -> IO (Either OTError Token)
- type Token = String
- data Role
- data TokenOptions = TokenOptions {}
- tokenOpts :: TokenOptions
- startArchive :: OpenTok -> ArchiveOptions -> IO (Either OTError Archive)
- stopArchive :: OpenTok -> ArchiveId -> IO (Either OTError Archive)
- listArchives :: OpenTok -> ListArchiveOptions -> IO (Either OTError ArchiveCollection)
- deleteArchive :: OpenTok -> ArchiveId -> IO (Either OTError ArchiveId)
Documentation
Represents an OpenTok project.
Get your project key and secret from https://tokbox.com/account/
opentok :: APIKey -> APISecret -> OpenTok Source #
Get an OpenTok project
ot = opentok "my_api_key" "my_api_secret"
createSession :: OpenTok -> SessionOptions -> IO (Either OTError Session) Source #
Create a new OpenTok Session
options = sessionOpts { mediaMode = Routed } session <- createSession ot sessionOpts
generateToken :: OpenTok -> SessionId -> TokenOptions -> IO (Either OTError Token) Source #
Generate a token.
let options = tokenOpts { connectionData = "name:tim" } token <- generateToken ot options
Instances
Data Role Source # | |
Defined in OpenTok.Token gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Role -> c Role # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Role # dataTypeOf :: Role -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Role) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Role) # gmapT :: (forall b. Data b => b -> b) -> Role -> Role # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Role -> r # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Role -> r # gmapQ :: (forall d. Data d => d -> u) -> Role -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Role -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Role -> m Role # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Role -> m Role # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Role -> m Role # | |
Show Role Source # | |
data TokenOptions Source #
Information on user roles and other options can be found at https://tokbox.com/developer/guides/create-token/
TokenOptions | |
|
Instances
tokenOpts :: TokenOptions Source #
Default Token options
TokenOptions { _role = Publisher , _expireTime = Nothing , _connectionData = Nothing , _initialLayoutClassList = Nothing }
startArchive :: OpenTok -> ArchiveOptions -> IO (Either OTError Archive) Source #
Start recording an archive of an OpenTok session
startArchive ot archiveOpts { sessionId = "your_session_id" }
stopArchive :: OpenTok -> ArchiveId -> IO (Either OTError Archive) Source #
Stop recording an archive of an OpenTok session
stopArchive ot "your_session_id"
listArchives :: OpenTok -> ListArchiveOptions -> IO (Either OTError ArchiveCollection) Source #
Get a list of all archives for a project or a single session
listArchives ot listArchiveOpts { _forSessionId = "some_session_id" }