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

Upload progress #38

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/vimeo_me2/base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ def initialize token, api_version = "3.4"
get_object
end

["get", "post", "delete", "put","patch"].each do |method|
["get", "post", "delete", "put","patch", "head"].each do |method|
define_method(method) do |url, **params|
params[:method] = "#{method}"
request request_uri(url), params
Expand Down
11 changes: 7 additions & 4 deletions lib/vimeo_me2/user/upload.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,15 @@ module VimeoMe2
module UserMethods
module Upload

# Upload a video object to the authenticated account
#
# @param [File] video A File that contains a valid video format
def upload_video video, name: nil

def create video
@video = video
@ticket = create_video
return @ticket
end
# Upload a video object to the authenticated account
# @param [File] video A File that contains a valid video format
def upload_video name: nil
start_upload
video = change_name_and_get_video(name)
return video
Expand Down