Wrapper Secure Video API[https://hub.securevideo.com/Knowledge/Index/0]
Add this line to your application's Gemfile:
gem 'securevideo-api'And then execute:
$ bundle
Or install it yourself as:
$ gem install securevideo-api
require 'securevideo/api'
Securevideo::Api.configure(KEY, SECRET)require 'securevideo/api'
Securevideo::Api.configure(KEY, SECRET) do |config|
config.response :logger, ::Logger.new(STDOUT), { bodies: true }
endEXCON_DEBUG=true [script].rbusers = Securevideo::Api::User.all.fetchSecurevideo::Api::User.find(user_id)user = Securevideo::Api::User.new(FullName: 'Test User',
TimeZoneWindowsId: "Pacific Standard Time",
EmailAddress: '[email protected]',
HelpNumber: '4084062331')
user.saveuser = Securevideo::Api::User.find(user_id)
user.FullName = 'Test User2'
user.saveuser = Securevideo::Api::User.find(user_id)
user.destroysessions = Securevideo::Api::Session.all(UserId: user_id).fetchsession = Securevideo::Api::Session.new(UserId: user_id, "ScheduleTs": "2016-04-16T15:00:00", "Participants":[{ "ParticipantFullName": "Trevor", "ParticipantEmailAddress": "[email protected]", "ParticipantSmsNumber": "3124455566", "ParticipantDefaultResolution": "default", "ParticipantTimeZoneWindowsId": "Hawaiian Standard Time", "ShouldAutoDeliverCode": "S"}])
session.savesession.reschedule("2017-02-04T22:00:00")session.destroyParticipant (https://hub.securevideo.com/Knowledge/Details/88)
Securevideo::Api::Participant.add(session_id, participant_options)Securevideo::Api::Participant.add(12344, { "SecureVideoUserId": "1122"})Securevideo::Api::Participant.add(35508, { "ParticipantFullName": "Trevor", "ParticipantEmailAddress": "[email protected]", "ParticipantSmsNumber": "13124456666", "ParticipantDefaultResolution": "high", "ParticipantTimeZoneWindowsId": "Eastern Standard Time", "ShouldAutoDeliverCode": "S",})Securevideo::Api::Participant.remove(participant_id)reports = Securevideo::Api::Session.usage('2015-03-01')Login & Logout (https://hub.securevideo.com/Knowledge/Details/89)
session = Securevideo::Api::Session.login(user_id,redirect_to_on_expiry)
return
{
"LoginGuid": "c1a714554134958fda34d32ebb4c070de1579430ba1471ba8d4c0b2b6e8ba8d6",
"RedirectToUriOnExpiry": "https://www.mywebsite.com/HandleSecureVideoLoginExpiration",
"LoginUri": "https://hub.securevideo.com/Account/Login?auto=c1a714554134958fda34d32ebb4c070de1579430ba1471ba8d4c0b2b6e8ba8d6"
}session = Securevideo::Api::Session.logout(LoginGuid)
session = Securevideo::Api::Session.logout("c1a714554134958fda34d32ebb4c070de1579430ba1471ba8d4c0b2b6e8ba8d6")Password API (https://hub.securevideo.com/Knowledge/Details/122)
user = Securevideo::Api::Session.find(user_id)
user.update_password(new_password)After checking out the repo, run bin/setup to install dependencies. Then, run bin/console for an interactive prompt that will allow you to experiment.
To install this gem onto your local machine, run bundle exec rake install. To release a new version, update the version number in version.rb, and then run bundle exec rake release to create a git tag for the version, push git commits and tags, and push the .gem file to rubygems.org.
- Fork it ( https://github.com/[my-github-username]/securevideo-api/fork )
- 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 a new Pull Request