-
Notifications
You must be signed in to change notification settings - Fork 9
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
Add delete_attribute(s)/2. Move attributes API to the ExSDP module. #40
Conversation
lib/ex_sdp/media.ex
Outdated
@spec delete_attribute(media :: t(), key :: module() | atom() | binary()) :: t() | ||
def delete_attribute(media, key), do: Utils.delete_attribute(media, key) | ||
|
||
@spec delete_attributes(media :: t(), [key :: module() | atom() | binary()]) :: t() | ||
def delete_attributes(media, keys), do: Utils.delete_attributes(media, keys) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if we should instead put everything in ExSDP and instead of distinguisng between ExSDP.add/get/delete_attribute
and ExSDP.Media.add/get/delete_attribute
, always have ExSDP.add/get/delete_attribute
🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
imo yes, in general the distinction between ExSDP.get_attribute()
and ExSDP.Media.get_attribute()
is weird and prone to mistakes.
lib/ex_sdp/media.ex
Outdated
@spec delete_attribute(media :: t(), key :: module() | atom() | binary()) :: t() | ||
def delete_attribute(media, key), do: Utils.delete_attribute(media, key) | ||
|
||
@spec delete_attributes(media :: t(), [key :: module() | atom() | binary()]) :: t() | ||
def delete_attributes(media, keys), do: Utils.delete_attributes(media, keys) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
imo yes, in general the distinction between ExSDP.get_attribute()
and ExSDP.Media.get_attribute()
is weird and prone to mistakes.
No description provided.