0.0
No commit activity in last 3 years
No release in over 3 years
api
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.8
>= 0.10.1, ~> 0.10
~> 10.0
>= 3.2.0, ~> 3.2
>= 0.7.1, ~> 0.7
>= 2.9.3, ~> 2.9
>= 1.20.4, ~> 1.20

Runtime

~> 0.44.4
>= 0.9.1, ~> 0.9
>= 0.9.1, ~> 0.9
~> 0.7.3
>= 2.12.1, ~> 2.12
 Project Readme

Securevideo::Api

Wrapper Secure Video API[https://hub.securevideo.com/Knowledge/Index/0]

Installation

Add this line to your application's Gemfile:

gem 'securevideo-api'

And then execute:

$ bundle

Or install it yourself as:

$ gem install securevideo-api

Usage

Config client

require 'securevideo/api'
Securevideo::Api.configure(KEY, SECRET)

debug mode

require 'securevideo/api'
Securevideo::Api.configure(KEY, SECRET) do |config|
  config.response :logger, ::Logger.new(STDOUT), { bodies: true }
end
EXCON_DEBUG=true [script].rb

API

get users

users = Securevideo::Api::User.all.fetch

get user

Securevideo::Api::User.find(user_id)

create user

user = Securevideo::Api::User.new(FullName: 'Test User',
    TimeZoneWindowsId: "Pacific Standard Time",
    EmailAddress: 'test@test.com',
    HelpNumber: '4084062331')
user.save

update user

user = Securevideo::Api::User.find(user_id)
user.FullName = 'Test User2'
user.save

delete user

user = Securevideo::Api::User.find(user_id)
user.destroy

Get sessions of user

sessions = Securevideo::Api::Session.all(UserId: user_id).fetch

Create a new session

session = Securevideo::Api::Session.new(UserId: user_id, "ScheduleTs": "2016-04-16T15:00:00", "Participants":[{ "ParticipantFullName": "Trevor", "ParticipantEmailAddress": "trevor@geemail.com", "ParticipantSmsNumber": "3124455566", "ParticipantDefaultResolution": "default", "ParticipantTimeZoneWindowsId": "Hawaiian Standard Time", "ShouldAutoDeliverCode": "S"}])
session.save

Reschedule a Session

session.reschedule("2017-02-04T22:00:00")

Cancel a Session

session.destroy

Add Participant to exist Session

Securevideo::Api::Participant.add(session_id, participant_options)
Securevideo::Api::Participant.add(12344, { "SecureVideoUserId": "1122"})
Securevideo::Api::Participant.add(35508, { "ParticipantFullName": "Trevor", "ParticipantEmailAddress": "trevor28@geemail.com", "ParticipantSmsNumber": "13124456666", "ParticipantDefaultResolution": "high", "ParticipantTimeZoneWindowsId": "Eastern Standard Time", "ShouldAutoDeliverCode": "S",})

Remove Participant from exist Session

Securevideo::Api::Participant.remove(participant_id)

How can I view session usage via the API?

reports = Securevideo::Api::Session.usage('2015-03-01')

Login API

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"
    }

Logout API

session = Securevideo::Api::Session.logout(LoginGuid)
session = Securevideo::Api::Session.logout("c1a714554134958fda34d32ebb4c070de1579430ba1471ba8d4c0b2b6e8ba8d6")

Set a User Password

user = Securevideo::Api::Session.find(user_id)
user.update_password(new_password)

Development

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.

Contributing

  1. Fork it ( https://github.com/[my-github-username]/securevideo-api/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request