Skip to content

Add perm option to the get_all_recordings and get_recording APIs #10

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Sep 26, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions client/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ aiohttp>=3.7.4
aiofiles>=0.7.0
aiohttp-retry>=2.4.6
certifi>=2021.10.8
Deprecated
12 changes: 12 additions & 0 deletions client/src/dolbyio_rest_apis/communications/monitor/recordings.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
This module contains the functions to work with the monitor API related to recordings.
"""

from deprecated import deprecated
from dolbyio_rest_apis.communications.internal.http_context import CommunicationsHttpContext
from dolbyio_rest_apis.communications.internal.urls import get_monitor_url
from dolbyio_rest_apis.communications.monitor.models import GetRecordingsResponse, Recording, DolbyVoiceRecording
Expand All @@ -16,6 +17,7 @@ async def get_recordings(
tr_to: int=9999999999999,
maximum: int=100,
start: str=None,
perm: bool=False,
) -> GetRecordingsResponse:
r"""
Get recording details
Expand All @@ -35,6 +37,7 @@ async def get_recordings(
start: When the results span multiple pages, use this option to navigate through pages.
By default, only the max number of results is displayed. To see the next results,
set the start parameter to the value of the next key returned in the previous response.
perm: When set to true, the URL is replaced with a monitor API signed URL with unlimited validity.

Returns:
A :class:`GetRecordingsResponse` object.
Expand All @@ -49,6 +52,7 @@ async def get_recordings(
'from': tr_from,
'to': tr_to,
'max': maximum,
'perm': str(perm).lower(),
}

if not start is None:
Expand All @@ -68,6 +72,7 @@ async def get_all_recordings(
tr_from: int=0,
tr_to: int=9999999999999,
page_size: int=100,
perm: bool=False,
) -> List[Recording]:
r"""
Get all recording details
Expand All @@ -83,6 +88,7 @@ async def get_all_recordings(
tr_from: The beginning of the time range (in milliseconds that have elapsed since epoch).
tr_to: The end of the time range (in milliseconds that have elapsed since epoch).
page_size: (Optional) Number of elements to return per page.
perm: When set to true, the URL is replaced with a monitor API signed URL with unlimited validity.

Returns:
A list of :class:`Recording` objects.
Expand All @@ -97,6 +103,7 @@ async def get_all_recordings(
'from': tr_from,
'to': tr_to,
'max': page_size,
'perm': str(perm).lower(),
}

recordings = []
Expand All @@ -123,6 +130,7 @@ async def get_recording(
tr_from: int=0,
tr_to: int=9999999999999,
page_size: int=100,
perm: bool=False,
) -> GetRecordingsResponse:
r"""
Get the recording of a specific conference
Expand All @@ -139,6 +147,7 @@ async def get_recording(
tr_from: The beginning of the time range (in milliseconds that have elapsed since epoch).
tr_to: The end of the time range (in milliseconds that have elapsed since epoch).
page_size: (Optional) Number of elements to return per page.
perm: When set to true, the URL is replaced with a monitor API signed URL with unlimited validity.

Returns:
A :class:`GetRecordingsResponse` object.
Expand All @@ -153,6 +162,7 @@ async def get_recording(
'from': tr_from,
'to': tr_to,
'max': page_size,
'perm': str(perm).lower(),
}

recordings = []
Expand Down Expand Up @@ -237,6 +247,7 @@ async def get_dolby_voice_recordings(

return DolbyVoiceRecording(json_response)

@deprecated(reason='This API is no longer applicable on the Dolby.io Communications APIs platform.')
async def download_mp4_recording(
access_token: str,
conference_id: str,
Expand Down Expand Up @@ -270,6 +281,7 @@ async def download_mp4_recording(
file_path=file_path,
)

@deprecated(reason='This API is no longer applicable on the Dolby.io Communications APIs platform.')
async def download_mp3_recording(
access_token: str,
conference_id: str,
Expand Down