forked from stephenlb/python-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add demo for create and delete bridge
- Loading branch information
1 parent
e513268
commit 83977d0
Showing
1 changed file
with
55 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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() |