Skip to content

Commit

Permalink
Add demo for create and delete bridge
Browse files Browse the repository at this point in the history
  • Loading branch information
SushilMallRC committed May 9, 2024
1 parent e513268 commit 83977d0
Showing 1 changed file with 55 additions and 0 deletions.
55 changes: 55 additions & 0 deletions ringcentral/demos/demo_platform.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
from ringcentral import SDK
from dotenv import dotenv_values, find_dotenv

env = dotenv_values(find_dotenv())

def create_delete_bridge(platform):
body = {
"name": "Weekly Meeting with Sushil",
"type": "Instant",
"security": {
"passwordProtected": True,
"password": "Wq123ygs15",
"noGuests": False,
"sameAccount": False,
"e2ee": False
},
"preferences": {
"join": {
"audioMuted": False,
"videoMuted": False,
"waitingRoomRequired": "Nobody",
"pstn": {
"promptAnnouncement": True,
"promptParticipants": True
}
},
"playTones": "Off",
"musicOnHold": True,
"joinBeforeHost": True,
"screenSharing": True,
"recordingsMode": "User",
"transcriptionsMode": "User",
"recordings": {
"everyoneCanControl": {
"enabled": True
},
"autoShared": {
"enabled": True
}
},
"allowEveryoneTranscribeMeetings": True
}
}
create_respone = platform.post(url='/rcvideo/v2/account/~/extension/~/bridges', body=body)
print("Id = "+create_respone.json().id)
print("Meeting Name = "+create_respone.json().name)
platform.delete(url="/rcvideo/v2/bridges/" + str(create_respone.json().id))

def main():
sdk = SDK(env['RINGCENTRAL_CLIENT_ID'], env['RINGCENTRAL_CLIENT_SECRET'], env['RINGCENTRAL_SERVER_URL'])
platform = sdk.platform()
platform.login(jwt = env['RINGCENTRAL_JWT_TOKEN'])
create_delete_bridge(platform)
if __name__ == '__main__':
main()

0 comments on commit 83977d0

Please sign in to comment.