bo-oz / vimeo_me2

Vimeo API v3 wrapper for Ruby

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

upload_video no longer returns the new video id

glappen opened this issue · comments

Here's my code that was working after I submitted last pull request:

def upload_hosted_file                                                                                                                                                                                         
      if video_file                                                                                                                                                                                                
        vimeo_client = VimeoMe2::User.new(Rails.application.config.vimeo_token)                                                                                                                                    
        vid_id = vimeo_client.upload_video(video_file)                                                                                                                                                             
        update_column(:vimeo_video_id, vid_id)                                                                                                                                                                     
      end                                                                                                                                                                                                          
    end  

It now seems that upload_video(video_file) returns nil instead of the video id. I see that the upload_video implementation changed, so is there a new way to get the video id now?

commented

I’ll add this tomorrow, didn’t realize that t was no longer returning the actual video.

commented

Quick fix: d543148

The quick fix worked, thank you! I noticed it is now returning a hash for the file, not just the uri, but that is fine.

commented

Yes, they changed the way the api behaves. so i had to change the return object. I could narrow it down to only the uri, but I guess it makes more sense to keep it like this, as it offers more possibilities.

commented

Ok to close?

Yes, closing!