Skip to content

Add mute feature #197

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 12 commits into from
Dec 14, 2021
Merged

Add mute feature #197

merged 12 commits into from
Dec 14, 2021

Conversation

geekchick
Copy link
Contributor

-For this Jira ticket

  • Added new active flag, excludedStreams, and excludedStreamIds to mute function, with a change in functionality in the mute function
  • Added new test for excludedStreams

@@ -1422,30 +1424,45 @@ def __init__(



def mute(self, session_id: str, stream_id: str= "", options: dict = {}) -> requests.Response:
def mute(self,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@geekchick Let's change this to two methods: mute_all(session_id, active, excludedStreamIds) and mute_stream(session_id, stream_id.

What is the data parameter? Can we remove it?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @jeffswartz the data parameter is the body or payload for the request. It gets defined as a dictionary in the method signature and used in the code to populate the request body.

@pardel pardel changed the base branch from 3.x-beta to dev December 6, 2021 17:48
pardel and others added 2 commits December 6, 2021 17:52
- Split the ForceMute into two functions: mute_all and mute_stream
- added return statements for the urls in the endpoints.py file
- added a new test for the single stream
@geekchick geekchick requested a review from jeffswartz December 7, 2021 20:20



def mute_stream(self, session_id: str, stream_id: str, options: dict = {}) -> requests.Response:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See my comment about the options parameter of the mute_all() method.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, will do!

session_id: str,
excludedStreamIds: Optional[List[str]],
active: bool= True,
options: dict = {}) -> requests.Response:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we remove this parameter? We do not include this options parameter in other methods. Can the method use a private variable internally that populates the options? I don't think we should include a parameter that the developer will not use.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @jeffswartz ! Sure, I can definitely remove the options parameter in the function.

- Removed options from mute_all
- Removed body from mute_stream
@geekchick geekchick requested a review from jeffswartz December 10, 2021 15:48
@geekchick geekchick merged commit fb5faa7 into dev Dec 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants