Class: CiscoWebex::WebexMeetings

Inherits:
Meetings
  • Object
show all
Defined in:
lib/Meetings/WebexMeetings.rb

Instance Method Summary collapse

Methods inherited from Meetings

#control_status, #head, #invitees, #me, #meetings, #participants, #post, #put, #qualities, #registrations, #session_types, #templates, #transcripts

Constructor Details

#initialize(token = nil) ⇒ WebexMeetings

initialize object with stored token



6
7
8
9
10
11
12
13
# File 'lib/Meetings/WebexMeetings.rb', line 6

def initialize(token=nil)
	if token == nil
		STDERR.puts "Must provide API key for CiscoWebex::Meetings::WebexMeetings"
		return false
	else
		@auth_token = token if token
	end
end

Instance Method Details

#create(params) ⇒ Object



85
86
87
88
89
90
91
92
# File 'lib/Meetings/WebexMeetings.rb', line 85

def create(params)
	if param.class != Hash || params.length() == 0
		STDERR.puts "CiscoWebex::Meetings::WebexMeetings.create() - require parameters as Hash"
		return false
	else
		return CiscoWebex::Rest.post(@auth_token, "/v1/meetings", params) rescue false
	end
end

#delete(id) ⇒ Object



94
95
96
# File 'lib/Meetings/WebexMeetings.rb', line 94

def delete(id)
	return CiscoWebex::Rest.delete(@auth_token, "/v1/meetings/#{id}") rescue false
end

#get(id, limit = 5000) ⇒ Object



64
65
66
# File 'lib/Meetings/WebexMeetings.rb', line 64

def get(id, limit=5000)
	return CiscoWebex::Rest.get(@auth_token, "/v1/meetings/#{id}", {}, limit) rescue false
end

#list(params = {}, limit = 5000) ⇒ Object



72
73
74
# File 'lib/Meetings/WebexMeetings.rb', line 72

def list(params={}, limit=5000)
	return CiscoWebex::Rest.get(@auth_token, "/v1/meetings", params, limit) rescue false
end

#patch(id, params) ⇒ Object



102
103
104
105
# File 'lib/Meetings/WebexMeetings.rb', line 102

def patch(id, params)
	STDERR.puts "CiscoWebex::Meetings::WebexMeetings.patch() - Metod not implemented"
	return false
end

#search(params = {}, limit = 5000) ⇒ Object



76
77
78
79
80
81
82
83
# File 'lib/Meetings/WebexMeetings.rb', line 76

def search(params={}, limit=5000)
	if param.class != Hash || params.length() == 0
		STDERR.puts "CiscoWebex::Meetings::WebexMeetings.search() - require parameters as Hash"
		return false
	else
		return CiscoWebex::Rest.get(@auth_token, "/v1/meetings", params, limit) rescue false				
	end
end

#series(id, limit = 5000) ⇒ Object



68
69
70
# File 'lib/Meetings/WebexMeetings.rb', line 68

def series(id, limit=5000)
	return CiscoWebex::Rest.get(@auth_token, "/v1/meetings?meetingSeriesId=#{id}", {}, limit) rescue false
end

#templateObject



19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
# File 'lib/Meetings/WebexMeetings.rb', line 19

def template()
	return {
			    "title"=> "",
			    "agenda"=> "",
			    "password"=> "",
			    "start"=> "",
			    "end"=> "",
			    "timezone"=> "",
			    "recurrence"=> "",
			    "enabledAutoRecordMeeting"=> false,
			    "allowAnyUserToBeCoHost"=> false,
			    "enabledJoinBeforeHost"=> false,
			    "enableConnectAudioBeforeHost"=> false,
			    "joinBeforeHostMinutes"=> 0,
			    "excludePassword"=> false,
			    "publicMeeting"=> false,
			    "reminderTime"=> 10,
			    "enableAutomaticLock"=> false,
			    "automaticLockMinutes"=> 0,
			    "allowFirstUserToBeCoHost"=> false,
			    "allowAuthenticatedDevices"=> false,
			    "invitees"=> [
			        {
			            "email"=> "",
			            "displayName"=> "",
			            "coHost"=> false
			        }
			    ],
			    "sendEmail"=> true,
			    "hostEmail"=> "",
			    "siteUrl"=> "",
			    "registration"=> {
			        "requireFirstName"=> "true",
			        "requireLastName"=> "true",
			        "requireEmail"=> "true",
			        "requireCompanyName"=> "true",
			        "requireCountryRegion"=> "true",
			        "requireWorkPhone"=> "true"
			    },
			    "integrationTags"=> [
			        ""
			    ]
			}
end

#thisObject



15
16
17
# File 'lib/Meetings/WebexMeetings.rb', line 15

def this()
	puts "CiscoWebex::Meetings::WebexMeetings"
end

#update(id, params) ⇒ Object



98
99
100
# File 'lib/Meetings/WebexMeetings.rb', line 98

def update(id, params)
	return CiscoWebex::Rest.put(@auth_token, "/v1/meetings/#{id}", params) rescue false
end