diff --git a/.github/workflows/release-github-pages.yml b/.github/workflows/release-github-pages.yml index 3ed988a..645799a 100644 --- a/.github/workflows/release-github-pages.yml +++ b/.github/workflows/release-github-pages.yml @@ -1,4 +1,3 @@ - name: Generate Python Docs on: @@ -22,11 +21,6 @@ jobs: python-version: ${{ matrix.python-version }} - name: Generate Docs - env: - RINGCENTRAL_SERVER_URL: ${{secrets.RINGCENTRAL_SERVER_URL}} - RINGCENTRAL_CLIENT_ID: ${{secrets.RINGCENTRAL_CLIENT_ID}} - RINGCENTRAL_CLIENT_SECRET: ${{secrets.RINGCENTRAL_CLIENT_SECRET}} - RINGCENTRAL_JWT_TOKEN: ${{secrets.RINGCENTRAL_JWT_TOKEN}} run: | #Create virtual environment python -m venv venv diff --git a/.github/workflows/release-with-tag.yml b/.github/workflows/release-with-tag.yml index 96c7da8..07c3d47 100644 --- a/.github/workflows/release-with-tag.yml +++ b/.github/workflows/release-with-tag.yml @@ -6,7 +6,7 @@ name: Release on: push: tags: - - '*' + - "*" jobs: release: @@ -23,11 +23,6 @@ jobs: python-version: ${{ matrix.python-version }} - name: Test with pytest - env: - RINGCENTRAL_SERVER_URL: ${{secrets.RINGCENTRAL_SERVER_URL}} - RINGCENTRAL_CLIENT_ID: ${{secrets.RINGCENTRAL_CLIENT_ID}} - RINGCENTRAL_CLIENT_SECRET: ${{secrets.RINGCENTRAL_CLIENT_SECRET}} - RINGCENTRAL_JWT_TOKEN: ${{secrets.RINGCENTRAL_JWT_TOKEN}} run: | #Create virtual environment python -m venv venv diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml index e13d94a..5929035 100644 --- a/.github/workflows/unit-tests.yml +++ b/.github/workflows/unit-tests.yml @@ -20,11 +20,6 @@ jobs: python-version: ${{ matrix.python-version }} - name: Test with pytest - env: - RINGCENTRAL_SERVER_URL: ${{secrets.RINGCENTRAL_SERVER_URL}} - RINGCENTRAL_CLIENT_ID: ${{secrets.RINGCENTRAL_CLIENT_ID}} - RINGCENTRAL_CLIENT_SECRET: ${{secrets.RINGCENTRAL_CLIENT_SECRET}} - RINGCENTRAL_JWT_TOKEN: ${{secrets.RINGCENTRAL_JWT_TOKEN}} run: | #Create virtual environment python -m venv venv diff --git a/ringcentral/demos/demo_subscription.py b/ringcentral/demos/demo_subscription.py index 1dd2dbb..a39a08d 100755 --- a/ringcentral/demos/demo_subscription.py +++ b/ringcentral/demos/demo_subscription.py @@ -2,6 +2,7 @@ import asyncio import sys import os +import json sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..'))) # Add the project root to sys.path from ringcentral.websocket.events import WebSocketEvents from ringcentral import SDK @@ -19,6 +20,10 @@ def on_ws_created(web_socket_client): print("\n New WebSocket connection created:") print(web_socket_client.get_connection_info()) +def on_message(message): + print("\n WebSocket message:\n") + print(json.loads(message)) + async def main(): load_dotenv(override=True) sdk = SDK( @@ -31,6 +36,7 @@ async def main(): try: web_socket_client = sdk.create_web_socket_client() + web_socket_client.on(WebSocketEvents.receiveMessage, on_message) web_socket_client.on(WebSocketEvents.connectionCreated, on_ws_created) web_socket_client.on(WebSocketEvents.subscriptionCreated, on_sub_created) web_socket_client.on(WebSocketEvents.receiveSubscriptionNotification, on_notification) diff --git a/setup.py b/setup.py index 64eaff5..afa1f31 100644 --- a/setup.py +++ b/setup.py @@ -1,6 +1,6 @@ from setuptools import setup, find_packages -VERSION = '0.9.1' +VERSION = '0.9.2' setup( name='ringcentral',