src/OpenTok/Util/Client.php
public function startArchive($sessionId, $options)
    {
        // set up the request
        $request = new Request('POST', '/v2/project/'.$this->apiKey.'/archive');

        try {
            $response = $this->client->send($request, [
                'debug' => $this->isDebug(),
                'json' => array_merge(
                    array( 'sessionId' => $sessionId ),
                    $options
                )
            ]);
            $archiveJson = json_decode($response->getBody(), true);
        } catch (\Exception $e) {
            $this->handleArchiveException($e);
        }
        return $archiveJson;
    }
public function startArchive($sessionId, $options)
    {
        // set up the request
        $request = new Request('POST', '/v2/project/'.$this->apiKey.'/archive');

        try {
            $response = $this->client->send($request, [
                'debug' => $this->isDebug(),
                'json' => array_merge(
                    array( 'sessionId' => $sessionId ),
                    $options
                )
            ]);
            $archiveJson = json_decode($response->getBody(), true);
        } catch (\Exception $e) {
            $this->handleArchiveException($e);
        }
        return $archiveJson;
    }
public function startArchive ( $ sessionId , $ options ) { // set up the request $ request = new Request ( 'POST' , '/v2/project/' . $ this -> apiKey . '/archive' ) ; try { $ response = $ this -> client -> send ( $ request , [ 'debug' => $ this -> isDebug ( ) , 'json' => array_merge ( array ( 'sessionId' => $ sessionId ) , $ options ) ] ) ; $ archiveJson = json_decode ( $ response -> getBody ( ) , true ) ; } catch ( \ Exception $ e ) { $ this -> handleArchiveException ( $ e ) ; } return $ archiveJson ; }
Archiving API Requests
Archiving API Requests