Skip to content
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

Merged
merged 5 commits into from
Dec 14, 2023

Conversation

mickel8
Copy link
Member

@mickel8 mickel8 commented Dec 13, 2023

No description provided.

Comment on lines 80 to 84
@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)
Copy link
Member Author

@mickel8 mickel8 Dec 13, 2023

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 🤔

Copy link
Member

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.

@mickel8 mickel8 requested a review from LVala December 13, 2023 17:34
Comment on lines 80 to 84
@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)
Copy link
Member

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.

@mickel8 mickel8 changed the title Add delete_attribute(s)/2 Add delete_attribute(s)/2. Move attributes API to the ExSDP module. Dec 14, 2023
@mickel8 mickel8 merged commit 97db6bd into master Dec 14, 2023
1 of 3 checks passed
@mickel8 mickel8 deleted the delete-attr branch December 14, 2023 13:08
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