Install the gem and add to the application's Gemfile by executing:
bundle add streamsb
If bundler is not being used to manage dependencies, install the gem by executing:
gem install streamsb
Alternatively, you can opt for Github's installation, add this to your gem file:
gem 'streamsb', github: 'ochiengotieno304/streamsb-ruby'
require "streamsb"
@client = Streamsb::Client.new(api_key: ENV['STREAMSB_API_KEY'])Make API calls using the @client object
account_info = @client.account_infoaccount_info = @client.account_statsfile_info = @client.file_info(file_code)file_code: file codeREQUIRED
rename_file = @client.rename_file(file_code, title, name)file_code: file codeREQUIREDtitle: new file titleREQUIREDname: new file nameREQUIRED
clone_info = @client.clone_file(file_code)file_code: file codeREQUIRED
file_list = @client.list_files(page, per_page, fld_id, is_public, created, title)page: page numberOPTIONAL,per_page: results per pageOPTIONALfld_id: folder idOPTIONALis_public: show public (1) or private (0) files onlyOPTIONALcreated: show only files uploaded after timestampOPTIONALtitle: filter video titlesOPTIONAL
direct_all = @client.get_direct_all(file_code)file_code: file codeREQUIRED
direct_quality = @client.get_direct_quality(file_code, quality)file_code: file codeREQUIREDquality: video quality if exist, possible values:n,h,lOPTIONAL
set_folder = @client.set_folder(file_code, folder_id)file_code: file codeREQUIREDfolder_id: folder idREQUIRED
files = @client.folder_list(folder_id)folder_id: folder idREQUIRED
folder = @client.create_folder(name, folder_id)name: folder nameREQUIREDfolder_id: parent folder idOPTIONAL
upload_server = @client.upload_serverNote: Will be in later realeases
url = @client.add_url(url)url: upload urlREQUIRED
urls = @client.list_urlstatus = @client.url_status(file_code)file_code: file_codeREQUIRED
Note: Will be in later releases
Bug reports and pull requests are welcome on GitHub at https://github.com/ochiengotieno304/streamsb-ruby. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the code of conduct.
The gem is available as open source under the terms of the MIT License.
Everyone interacting in the Streamsb project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.