Skip to content

Commit 9f07b5d

Browse files
authored
Update README.rst
Indicates how to instance the new opentok top entity(Client).
1 parent ea69c83 commit 9f07b5d

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

README.rst

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,13 @@ Initializing
3939
~~~~~~~~~~~~
4040

4141
Import the package at the top of any file where you will use it. At the very least you will need the
42-
``OpenTok`` class. Then initialize an OpenTok instance with your own API Key and API Secret.
42+
``Client`` class from the opentok module. Then initialize an opentok Client instance with your own API Key and API Secret.
4343

4444
.. code:: python
4545
46-
from opentok import OpenTok
46+
from opentok import Client
4747
48-
opentok = OpenTok(api_key, api_secret)
48+
opentok = Client(api_key, api_secret)
4949
5050
Creating Sessions
5151
~~~~~~~~~~~~~~~~~
@@ -238,7 +238,7 @@ For more information on archiving, see the
238238
Sending Signals
239239
~~~~~~~~~~~~~~~~~~~~~
240240

241-
Once a Session is created, you can send signals to everyone in the session or to a specific connection. You can send a signal by calling the ``signal(session_id, payload)`` method of the ``OpenTok`` class. The ``payload`` parameter is a dictionary used to set the ``type``, ``data`` fields. Ỳou can also call the method with the parameter ``connection_id`` to send a signal to a specific connection ``signal(session_id, data, connection_id)``.
241+
Once a Session is created, you can send signals to everyone in the session or to a specific connection. You can send a signal by calling the ``signal(session_id, payload)`` method of the ``Client`` class. The ``payload`` parameter is a dictionary used to set the ``type``, ``data`` fields. Ỳou can also call the method with the parameter ``connection_id`` to send a signal to a specific connection ``signal(session_id, data, connection_id)``.
242242

243243
.. code:: python
244244
@@ -259,7 +259,7 @@ Once a Session is created, you can send signals to everyone in the session or to
259259
Working with Streams
260260
~~~~~~~~~~~~~~~~~~~~~
261261

262-
You can get information about a stream by calling the `get_stream(session_id, stream_id)` method of the `OpenTok` class.
262+
You can get information about a stream by calling the `get_stream(session_id, stream_id)` method of the `Client` class.
263263

264264
The method returns a Stream object that contains information of an OpenTok stream:
265265

@@ -282,7 +282,7 @@ The method returns a Stream object that contains information of an OpenTok strea
282282
print stream.name #stream name
283283
print stream.layoutClassList #['full']
284284
285-
Also, you can get information about all the streams in a session by calling the `list_streams(session_id)` method of the `OpenTok` class.
285+
Also, you can get information about all the streams in a session by calling the `list_streams(session_id)` method of the `Client` class.
286286

287287
The method returns a StreamList object that contains a list of all the streams
288288

@@ -324,7 +324,7 @@ For more information see
324324
Force Disconnect
325325
~~~~~~~~~~~~~~~~~~~~~
326326

327-
Your application server can disconnect a client from an OpenTok session by calling the force_disconnect(session_id, connection_id) method of the OpenTok class, or the force_disconnect(connection_id) method of the Session class.
327+
Your application server can disconnect a client from an OpenTok session by calling the force_disconnect(session_id, connection_id) method of the Client class, or the force_disconnect(connection_id) method of the Session class.
328328

329329
.. code:: python
330330
@@ -473,13 +473,13 @@ For more information about OpenTok live streaming broadcasts, see the
473473

474474
Configuring Timeout
475475
-------
476-
Timeout is passed in the OpenTok constructor:
476+
Timeout is passed in the Client constructor:
477477

478478
``self.timeout = timeout``
479479

480480
In order to configure timeout, first create an instance:
481481

482-
``opentok = OpenTok(...., timeout=value)``
482+
``opentok = Client(...., timeout=value)``
483483

484484
And then proceed to change the value with
485485

@@ -527,7 +527,7 @@ session uses the OpenTok TURN server to relay audio-video streams.
527527

528528
This version of the SDK includes support for working with OpenTok archives.
529529

530-
The OpenTok.create_session() method now includes a media_mode parameter, instead of a p2p parameter.
530+
The Client.create_session() method now includes a media_mode parameter, instead of a p2p parameter.
531531

532532
For details, see the reference documentation at
533533
http://www.tokbox.com/opentok/libraries/server/python/reference/index.html.

0 commit comments

Comments
 (0)