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

Update video via content owner #377

Merged
merged 4 commits into from Feb 7, 2020
Merged

Update video via content owner #377

merged 4 commits into from Feb 7, 2020

Conversation

kangkyu
Copy link
Contributor

@kangkyu kangkyu commented Feb 6, 2020

No description provided.

@coveralls
Copy link

coveralls commented Feb 6, 2020

Coverage Status

Coverage increased (+0.004%) to 86.538% when pulling 6f014d3 on co-video-update into b2ea040 on master.

# @see https://developers.google.com/youtube/v3/docs/videos/update
def update_params
super.tap do |params|
params[:params] = {on_behalf_of_content_owner: auth.owner_name} if auth.owner_name
Copy link
Contributor

Choose a reason for hiding this comment

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

What do you think about extending the pattern we have and adding video_params to ContentOwner and Account. That way this doesn't need to know or care what auth is, and can just look something like:

def update_params
  super.tap do |params|
    params[:params].merge!(auth.video_params)
  end
end

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Unrelated but params[:params] can be nil so we can params[:params] ||= {}

@kangkyu kangkyu requested a review from dgb February 7, 2020 00:45
@kangkyu kangkyu merged commit a171287 into master Feb 7, 2020
@kangkyu kangkyu deleted the co-video-update branch February 7, 2020 19:10
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.

None yet

3 participants