vzaar
A Ruby gem for the vzaar API.
Note: This version is a beta release.
Installation
Add this line to your application's Gemfile:
gem 'vzaar'
And then execute:
$ bundle
Usage
conn = Vzaar::Connection.new(:application_token => "API token", :login => "vzaar login")
api = Vzaar::Api.new(conn)
If your login and API token are correct, you should be able to fetch your login by calling:
api.whoami
=> "VZAAR LOGIN"
Endpoints:
Fetching account's type details:
api.account_type(account_type_id, )
Fetching user's details:
api.user_details("user login", )
Getting details from public video:
api.video_details(video_id, )
Getting details from private video (authentication required):
api.video_details(video_id, authenticated: true)
Fetching videos for a given user:
api.video_details("user login", )
Fetching videos for authenticated user (authentication required):
api.videos
Removing video from vzaar: (authentication required)
api.delete(video_id)
Updating existing video (authentication required):
api.edit_video(video_id, )
# options are: title, description, private and seo_url
Uploading new video to vzaar (authentication required):
api.upload_video()
# options are: path, url, title, description, profile, transcoding, replace_id,
# width and bitrate
#
# api.upload_video(path: "./path/to/video.mp4", title: "my video")
#
# For link upload use url param:
# api.upload_video(url: "http://example.com/video.mp4", title: "my video")
Uploading new thumbnail for video (authentication required):
api.upload_thumbnail(video_id, )
# api.upload_thumbnail(123456, path: "/path/to/image.jpg")
Generating new thumbnail based on given time value (authentication required):
api.generate_thumbnail(video_id, )
# api.generate_thumbnail(123456, time: 3)
Adding subtitle to the video (authentication required):
api.add_subtitle(video_id, )
# api.add_subtitle(123456, body: "1\n00:00:17,440 --> 00:01:20,375\n ......", language: "en")
Getting guid and aws signature (authentication required):
api.signature
Previous versions of vzaar gem
This version is not backwards compatible with any of the previous versions of vzaar gem (0.2.x series) 0.2.x series is no longer maintained.
Contributing
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request