CiscoWebex 0.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/lib/Admin/Admin.rb +84 -0
- data/lib/Admin/AuditEvents.rb +70 -0
- data/lib/Admin/Authorizations.rb +52 -0
- data/lib/Admin/Licenses.rb +50 -0
- data/lib/Admin/Organizations.rb +52 -0
- data/lib/Admin/People.rb +81 -0
- data/lib/Admin/ResourceGroups.rb +118 -0
- data/lib/Admin/Roles.rb +60 -0
- data/lib/Admin.rb +11 -0
- data/lib/CC/AddressBooks.rb +55 -0
- data/lib/CC/AgentProfiles.rb +71 -0
- data/lib/CC/Agents.rb +67 -0
- data/lib/CC/AuxiliaryCodes.rb +55 -0
- data/lib/CC/CC.rb +157 -0
- data/lib/CC/Captures.rb +30 -0
- data/lib/CC/DialPlans.rb +56 -0
- data/lib/CC/EntryPointMappings.rb +56 -0
- data/lib/CC/EntryPoints.rb +55 -0
- data/lib/CC/Journey/Actions.rb +41 -0
- data/lib/CC/Journey/Aliases.rb +28 -0
- data/lib/CC/Journey/Events.rb +37 -0
- data/lib/CC/Journey/Identities.rb +41 -0
- data/lib/CC/Journey/Journey.rb +84 -0
- data/lib/CC/Journey/ProfileViews.rb +24 -0
- data/lib/CC/Journey/Report.rb +24 -0
- data/lib/CC/Journey/Reports.rb +24 -0
- data/lib/CC/Journey/Streams.rb +41 -0
- data/lib/CC/Journey/Views.rb +80 -0
- data/lib/CC/Journey.rb +9 -0
- data/lib/CC/MultimediaProfiles.rb +52 -0
- data/lib/CC/OutboundANI.rb +56 -0
- data/lib/CC/Queues.rb +64 -0
- data/lib/CC/Sites.rb +51 -0
- data/lib/CC/SkillProfiles.rb +55 -0
- data/lib/CC/Skills.rb +55 -0
- data/lib/CC/Subscriptions.rb +55 -0
- data/lib/CC/Tasks.rb +37 -0
- data/lib/CC/Teams.rb +55 -0
- data/lib/CC/UserProfiles.rb +56 -0
- data/lib/CC/Users.rb +57 -0
- data/lib/CC.rb +26 -0
- data/lib/Calling/CallControl.rb +210 -0
- data/lib/Calling/Calling.rb +64 -0
- data/lib/Calling/Calls.rb +44 -0
- data/lib/Calling/Locations.rb +50 -0
- data/lib/Calling/Voicemail.rb +73 -0
- data/lib/Calling.rb +9 -0
- data/lib/CiscoWebex.rb +32 -0
- data/lib/Devices/Configurations.rb +52 -0
- data/lib/Devices/Devices.rb +66 -0
- data/lib/Devices/Endpoints.rb +51 -0
- data/lib/Devices/Workspaces.rb +51 -0
- data/lib/Devices/Xapi.rb +75 -0
- data/lib/Devices.rb +7 -0
- data/lib/Meetings/ControlStatus.rb +53 -0
- data/lib/Meetings/Invitees.rb +52 -0
- data/lib/Meetings/Meetings.rb +91 -0
- data/lib/Meetings/Participants.rb +52 -0
- data/lib/Meetings/Qualities.rb +55 -0
- data/lib/Meetings/Registrations.rb +116 -0
- data/lib/Meetings/SessionTypes.rb +57 -0
- data/lib/Meetings/Templates.rb +57 -0
- data/lib/Meetings/Transcripts.rb +98 -0
- data/lib/Meetings/WebexMeetings.rb +108 -0
- data/lib/Meetings.rb +13 -0
- data/lib/Messaging/Attachements.rb +60 -0
- data/lib/Messaging/Classifications.rb +64 -0
- data/lib/Messaging/Events.rb +60 -0
- data/lib/Messaging/Memberships.rb +59 -0
- data/lib/Messaging/Messages.rb +126 -0
- data/lib/Messaging/Messaging.rb +92 -0
- data/lib/Messaging/People.rb +81 -0
- data/lib/Messaging/Rooms.rb +121 -0
- data/lib/Messaging/Teams.rb +117 -0
- data/lib/Messaging/Webhooks.rb +63 -0
- data/lib/Messaging.rb +13 -0
- data/lib/REST/Rest.rb +213 -0
- data/lib/REST/RestCC.rb +242 -0
- data/lib/Toolbox/Toolbox.rb +78 -0
- data/lib/bersion.rb +3 -0
- metadata +122 -0
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
## Needs lots of work
|
|
2
|
+
|
|
3
|
+
module CiscoWebex
|
|
4
|
+
class Journey < ContactCenter
|
|
5
|
+
@auth_token = nil
|
|
6
|
+
@org_id = nil
|
|
7
|
+
|
|
8
|
+
def initialize(token=nil, org_id=nil)
|
|
9
|
+
if token == nil || org_id == nil
|
|
10
|
+
STDERR.puts "Must provde token and org_idwhen initiating CiscoWebex::CC::Journey"
|
|
11
|
+
return false
|
|
12
|
+
else
|
|
13
|
+
@org_id = org_id
|
|
14
|
+
@auth_token = token
|
|
15
|
+
|
|
16
|
+
@actions = Actions.new(@auth_token, @org_id)
|
|
17
|
+
@events = JourneyEvents.new(@auth_token, @org_id)
|
|
18
|
+
@identities = Identities.new(@auth_token, @org_id)
|
|
19
|
+
@aliases = Aliases.new(@auth_token, @org_id)
|
|
20
|
+
@profile_views = ProfileViews.new(@auth_token, @org_id)
|
|
21
|
+
@reports = Reports.new(@auth_token, @org_id)
|
|
22
|
+
@streams = Streams.new(@auth_token, @org_id)
|
|
23
|
+
@views = Views.new(@auth_token, @org_id)
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
def this()
|
|
28
|
+
puts "CiscoWebex::CC::Journey - Org:#{@org_id}"
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
# access to REST API
|
|
32
|
+
def get(uri, params=nil, limit=50000)
|
|
33
|
+
return CiscoWebex::RestCC.get(@auth_token, uri, params, limit)
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
# access to REST API
|
|
37
|
+
def head(uri, params=nil)
|
|
38
|
+
return CiscoWebex::RestCC.head(@auth_token, uri, params)
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
# access to REST API
|
|
42
|
+
def post(uri, params=nil)
|
|
43
|
+
return CiscoWebex::RestCC.post(@auth_token, uri, params)
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
# access to REST API
|
|
47
|
+
def put(uri, params=nil)
|
|
48
|
+
return CiscoWebex::RestCC.put(@auth_token, uri, params)
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
def actions()
|
|
52
|
+
return @actions
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
def events()
|
|
56
|
+
return @events
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
def identities()
|
|
60
|
+
return @identities
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
def aliases()
|
|
64
|
+
return @aliases
|
|
65
|
+
end
|
|
66
|
+
|
|
67
|
+
def profile_views()
|
|
68
|
+
return @profile_views
|
|
69
|
+
end
|
|
70
|
+
|
|
71
|
+
def reports()
|
|
72
|
+
return @reports
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
def streams()
|
|
76
|
+
return @streams
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
def views()
|
|
80
|
+
return @views
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
end
|
|
84
|
+
end
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
module CiscoWebex
|
|
2
|
+
class ProfileViews < Journey
|
|
3
|
+
@auth_token = nil
|
|
4
|
+
@org_id = nil
|
|
5
|
+
|
|
6
|
+
def initialize(token=nil, org_id=nil)
|
|
7
|
+
if token == nil || org_id == nil
|
|
8
|
+
STDERR.puts "Must provde token and org_idwhen initiating CiscoWebex::CC::Journey::ProfileView"
|
|
9
|
+
return false
|
|
10
|
+
else
|
|
11
|
+
@org_id = org_id
|
|
12
|
+
@auth_token = token
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
def this()
|
|
17
|
+
puts "CiscoWebex::CC::Journey::ProfileView - Org:#{@org_id}"
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
def create(params)
|
|
21
|
+
return CiscoWebex::RestCC.post(@auth_token, "/v1/journey/profileview", params)
|
|
22
|
+
end
|
|
23
|
+
end
|
|
24
|
+
end
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
module CiscoWebex
|
|
2
|
+
class Report < Journey
|
|
3
|
+
@auth_token = nil
|
|
4
|
+
@org_id = nil
|
|
5
|
+
|
|
6
|
+
def initialize(token=nil, org_id=nil)
|
|
7
|
+
if token == nil || org_id == nil
|
|
8
|
+
STDERR.puts "Must provde token and org_idwhen initiating CiscoWebex::CC::Journey::Report"
|
|
9
|
+
return false
|
|
10
|
+
else
|
|
11
|
+
@org_id = org_id
|
|
12
|
+
@auth_token = token
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
def this()
|
|
17
|
+
puts "CiscoWebex::CC::Journey::Report - Org:#{@org_id}"
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
def get(name)
|
|
21
|
+
return CiscoWebex::RestCC.get(@auth_token, "/v1/journey/report/#{name}")
|
|
22
|
+
end
|
|
23
|
+
end
|
|
24
|
+
end
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
module CiscoWebex
|
|
2
|
+
class Reports < Journey
|
|
3
|
+
@auth_token = nil
|
|
4
|
+
@org_id = nil
|
|
5
|
+
|
|
6
|
+
def initialize(token=nil, org_id=nil)
|
|
7
|
+
if token == nil || org_id == nil
|
|
8
|
+
STDERR.puts "Must provde token and org_idwhen initiating CiscoWebex::CC::Journey::Report"
|
|
9
|
+
return false
|
|
10
|
+
else
|
|
11
|
+
@org_id = org_id
|
|
12
|
+
@auth_token = token
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
def this()
|
|
17
|
+
puts "CiscoWebex::CC::Journey::Report - Org:#{@org_id}"
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
def get(name)
|
|
21
|
+
return CiscoWebex::RestCC.get(@auth_token, "/v1/journey/report/#{name}")
|
|
22
|
+
end
|
|
23
|
+
end
|
|
24
|
+
end
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
module CiscoWebex
|
|
2
|
+
class Streams < Journey
|
|
3
|
+
@auth_token = nil
|
|
4
|
+
@org_id = nil
|
|
5
|
+
|
|
6
|
+
def initialize(token=nil, org_id=nil)
|
|
7
|
+
if token == nil || org_id == nil
|
|
8
|
+
STDERR.puts "Must provde token and org_idwhen initiating CiscoWebex::CC::Journey::Stream"
|
|
9
|
+
return false
|
|
10
|
+
else
|
|
11
|
+
@org_id = org_id
|
|
12
|
+
@auth_token = token
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
def this()
|
|
17
|
+
puts "CiscoWebex::CC::Journey::Stream - Org:#{@org_id}"
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
def get(person_id)
|
|
21
|
+
return CiscoWebex::RestCC.get(@auth_token, "/v1/journey/steams/#{person_id}")['data']
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
def list()
|
|
25
|
+
return CiscoWebex::RestCC.get(@auth_token, "/v1/journey/steams")['data']
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
def search(params={})
|
|
29
|
+
params = { "applicationName"=> params } if params.class == String
|
|
30
|
+
return CiscoWebex::Toolbox.search(list(), params)
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
def historic()
|
|
34
|
+
return CiscoWebex::RestCC.get(@auth_token, "/v1/journey/steams/historic")
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
def historic_person(person_id)
|
|
38
|
+
return CiscoWebex::RestCC.get(@auth_token, "/v1/journey/steams/#{person_id}/historic")
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
end
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
require 'date'
|
|
2
|
+
module CiscoWebex
|
|
3
|
+
class Views < Journey
|
|
4
|
+
@auth_token = nil
|
|
5
|
+
@org_id = nil
|
|
6
|
+
|
|
7
|
+
def initialize(token=nil, org_id=nil)
|
|
8
|
+
if token == nil || org_id == nil
|
|
9
|
+
STDERR.puts "Must provde token and org_idwhen initiating CiscoWebex::CC::Journey::View"
|
|
10
|
+
return false
|
|
11
|
+
else
|
|
12
|
+
@org_id = org_id
|
|
13
|
+
@auth_token = token
|
|
14
|
+
@template = Template.new(@auth_token, @org_id)
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
def this()
|
|
19
|
+
puts "CiscoWebex::CC::Journey::View - Org:#{@org_id}"
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
def get(view_id=nil, instance_id=nil)
|
|
23
|
+
if view_id && instance_id
|
|
24
|
+
return CiscoWebex::RestCC.get(@auth_token, "/v1/journey/views", { "ViewId"=> view_id, "instanceId"=> instance_id })
|
|
25
|
+
else
|
|
26
|
+
STDERR.puts "CiscoWebex::CC::Journey::View - Required parameter 'ViewId' and 'instanceId' missing"
|
|
27
|
+
return false
|
|
28
|
+
end
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
def create(params)
|
|
32
|
+
if ! params.has_key?('ViewId')
|
|
33
|
+
STDERR.puts "CiscoWebex::CC::Journey::View - Required parameter 'ViewId' missing"
|
|
34
|
+
return False
|
|
35
|
+
end
|
|
36
|
+
return CiscoWebex::RestCC.post(@auth_token, "/v1/journey/views")
|
|
37
|
+
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
def template()
|
|
41
|
+
return @template
|
|
42
|
+
end
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
class Template < Views
|
|
46
|
+
@auth_token = nil
|
|
47
|
+
@org_id = nil
|
|
48
|
+
|
|
49
|
+
def initialize(token=nil, org_id=nil)
|
|
50
|
+
if token == nil || org_id == nil
|
|
51
|
+
STDERR.puts "Must provde token and org_id when initiating CiscoWebex::CC::Journey::View::Template"
|
|
52
|
+
return false
|
|
53
|
+
else
|
|
54
|
+
@org_id = org_id
|
|
55
|
+
@auth_token = token
|
|
56
|
+
end
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
def this()
|
|
60
|
+
puts "CiscoWebex::CC::Journey::View::Template - Org:#{@org_id}"
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
def list()
|
|
64
|
+
return CiscoWebex::RestCC.get(@auth_token, "/v1/journey/views/templates")
|
|
65
|
+
end
|
|
66
|
+
|
|
67
|
+
def get(id)
|
|
68
|
+
if id
|
|
69
|
+
return CiscoWebex::RestCC.get(@auth_token, "/v1/journey/views/templates/#{id}")
|
|
70
|
+
else
|
|
71
|
+
STDERR.puts "CiscoWebex::CC::Journey::View - Required parameter 'id'"
|
|
72
|
+
return false
|
|
73
|
+
end
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
def create(params)
|
|
77
|
+
return CiscoWebex::RestCC.post(@auth_token, "/v1/journey/views/templates", params)
|
|
78
|
+
end
|
|
79
|
+
end
|
|
80
|
+
end
|
data/lib/CC/Journey.rb
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
require_relative './Journey/Journey.rb'
|
|
2
|
+
require_relative './Journey/Actions.rb'
|
|
3
|
+
require_relative './Journey/Events.rb'
|
|
4
|
+
require_relative './Journey/Identities.rb'
|
|
5
|
+
require_relative './Journey/Aliases.rb'
|
|
6
|
+
require_relative './Journey/ProfileViews.rb'
|
|
7
|
+
require_relative './Journey/Reports.rb'
|
|
8
|
+
require_relative './Journey/Streams.rb'
|
|
9
|
+
require_relative './Journey/Views.rb'
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
module CiscoWebex
|
|
2
|
+
class MultimediaProfiles < ContactCenter
|
|
3
|
+
@auth_token = nil
|
|
4
|
+
@org_id = nil
|
|
5
|
+
|
|
6
|
+
# initialize object with stored token
|
|
7
|
+
def initialize(token=nil, org_id=nil)
|
|
8
|
+
if token == nil || org_id == nil
|
|
9
|
+
STDERR.puts "Must provide API key for CiscoWebex::ContactCenter::MultimediaProfile"
|
|
10
|
+
return false
|
|
11
|
+
else
|
|
12
|
+
@auth_token = token if token
|
|
13
|
+
@org_id = org_id
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
def this()
|
|
18
|
+
puts "CiscoWebex::ContactCenter::MultimediaProfile - Org:#{@org_id}"
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
def get(id, limit=5000)
|
|
22
|
+
return CiscoWebex::RestCC.get(@auth_token, "/organization/#{@org_id}/multimedia-profile/#{id}", {}, limit)['data'] rescue false
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
def list(params={}, limit=5000)
|
|
26
|
+
return CiscoWebex::RestCC.get(@auth_token, "/organization/#{@org_id}/multimedia-profile", {}, limit)['data'] rescue false
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
def search(params={})
|
|
30
|
+
params = { "name"=> params } if params.class == String
|
|
31
|
+
return CiscoWebex::Toolbox.search(list(), params)
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
def create(params)
|
|
35
|
+
return CiscoWebex::RestCC.post(@auth_token, "/organization/#{@org_id}/multimedia-profile", params) rescue false
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
def delete(id)
|
|
39
|
+
return CiscoWebex::RestCC.delete(@auth_token, "/organization/#{@org_id}/multimedia-profile/#{id}") rescue false
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
def update(id, params)
|
|
43
|
+
return CiscoWebex::RestCC.put(@auth_token, "/organization/#{@org_id}/multimedia-profile/#{id}", params) rescue false
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
def patch(id, params)
|
|
47
|
+
return False
|
|
48
|
+
# return CiscoWebex::RestCC.patch(@auth_token, "/organization/#{@org_id}/multimedia-profile/#{id}", params) rescue false
|
|
49
|
+
end
|
|
50
|
+
end
|
|
51
|
+
end
|
|
52
|
+
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
module CiscoWebex
|
|
2
|
+
class OutboundANI < ContactCenter
|
|
3
|
+
@auth_token = nil
|
|
4
|
+
@org_id = nil
|
|
5
|
+
|
|
6
|
+
# initialize object with stored token
|
|
7
|
+
def initialize(token=nil, org_id=nil)
|
|
8
|
+
if token == nil || org_id == nil
|
|
9
|
+
STDERR.puts "Must provide API key for CiscoWebex::ContactCenter::OutboundANI"
|
|
10
|
+
return false
|
|
11
|
+
else
|
|
12
|
+
@auth_token = token if token
|
|
13
|
+
@org_id = org_id # test token and store users profile
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
def this()
|
|
18
|
+
puts "CiscoWebex::ContactCenter::OutboundANI - Org:#{@org_id}"
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
def get(id, limit=5000)
|
|
22
|
+
return CiscoWebex::RestCC.get(@auth_token, "/organization/#{@org_id}/outbound-ani/#{id}", {}, limit)['data'] rescue false
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
def list(params={}, limit=5000)
|
|
26
|
+
return CiscoWebex::RestCC.get(@auth_token, "/organization/#{@org_id}/outbound-ani", {}, limit)['data'] rescue false
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
def search(params={})
|
|
30
|
+
params = { "name"=> params } if params.class == String
|
|
31
|
+
return CiscoWebex::Toolbox.search(list(), params)
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
def save(params={})
|
|
35
|
+
return CiscoWebex::RestCC.post(@auth_token, "/organization/#{@org_id}/outbound-ani/bulk", params) rescue false
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
def create(params)
|
|
39
|
+
return CiscoWebex::RestCC.post(@auth_token, "/organization/#{@org_id}/outbound-ani", params) rescue false
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
def delete(id)
|
|
43
|
+
return CiscoWebex::RestCC.delete(@auth_token, "/organization/#{@org_id}/outbound-ani/#{id}") rescue false
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
def update(id, params)
|
|
47
|
+
return CiscoWebex::RestCC.put(@auth_token, "/organization/#{@org_id}/outbound-ani/#{id}", params) rescue false
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
def patch(id, params)
|
|
51
|
+
STDERR.puts "PATCH not Implemented."
|
|
52
|
+
return False
|
|
53
|
+
end
|
|
54
|
+
end
|
|
55
|
+
end
|
|
56
|
+
|
data/lib/CC/Queues.rb
ADDED
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
module CiscoWebex
|
|
2
|
+
class Queues < ContactCenter
|
|
3
|
+
@auth_token = nil
|
|
4
|
+
@org_id = nil
|
|
5
|
+
|
|
6
|
+
# initialize object with stored token
|
|
7
|
+
def initialize(token=nil, org_id=nil)
|
|
8
|
+
if token == nil || org_id == nil
|
|
9
|
+
STDERR.puts "Must provide API key for CiscoWebex::ContactCenter::Queue"
|
|
10
|
+
return false
|
|
11
|
+
else
|
|
12
|
+
@auth_token = token if token
|
|
13
|
+
@org_id = org_id
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
def this()
|
|
18
|
+
puts "CiscoWebex::ContactCenter::Queue - Org:#{@org_id}"
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
def get(id, limit=5000)
|
|
22
|
+
return CiscoWebex::RestCC.get(@auth_token, "/organization/#{@org_id}/contact-service-queue/#{id}", {}, limit)['data'] rescue false
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
def list(params={}, limit=5000)
|
|
26
|
+
return CiscoWebex::RestCC.get(@auth_token, "/organization/#{@org_id}/contact-service-queue", {}, limit)['data'] rescue false
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
def search(params={})
|
|
30
|
+
params = { "name"=> params } if params.class == String
|
|
31
|
+
return CiscoWebex::Toolbox.search(list(), params)
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
def statistics(params)
|
|
35
|
+
if params.has_key?('from') && params.has_key?('to') && params.has_key?('interval')
|
|
36
|
+
return CiscoWebex::RestCC.post(@auth_token, "/v1/queues/statistics", params) rescue false
|
|
37
|
+
else
|
|
38
|
+
STDERR.puts("CiscoWebex::CC::Queue.statistics - Required fields 'from' 'to' 'interval' missing")
|
|
39
|
+
return false
|
|
40
|
+
end
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
def create(params)
|
|
44
|
+
return CiscoWebex::RestCC.post(@auth_token, "/organization/#{@org_id}/contact-service-queue", params) rescue false
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
def save(params={})
|
|
48
|
+
return CiscoWebex::RestCC.post(@auth_token, "/organization/#{@org_id}/contact-service-queue/bulk", params) rescue false
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
def delete(id)
|
|
52
|
+
return CiscoWebex::RestCC.delete(@auth_token, "/organization/#{@org_id}/contact-service-queue/#{id}") rescue false
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
def update(id, params)
|
|
56
|
+
return CiscoWebex::RestCC.put(@auth_token, "/organization/#{@org_id}/contact-service-queue/#{id}", params) rescue false
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
def patch(id, params)
|
|
60
|
+
return CiscoWebex::RestCC.patch(@auth_token, "/organization/#{@org_id}/contact-service-queue/#{id}", params) rescue false
|
|
61
|
+
end
|
|
62
|
+
end
|
|
63
|
+
end
|
|
64
|
+
|
data/lib/CC/Sites.rb
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
module CiscoWebex
|
|
2
|
+
class Sites < ContactCenter
|
|
3
|
+
@auth_token = nil
|
|
4
|
+
@org_id = nil
|
|
5
|
+
|
|
6
|
+
# initialize object with stored token
|
|
7
|
+
def initialize(token=nil, org_id=nil)
|
|
8
|
+
if token == nil || org_id == nil
|
|
9
|
+
STDERR.puts "Must provide API key for CiscoWebex::ContactCenter::Site"
|
|
10
|
+
return false
|
|
11
|
+
else
|
|
12
|
+
@auth_token = token if token
|
|
13
|
+
@org_id = org_id
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
def this()
|
|
18
|
+
puts "CiscoWebex::ContactCenter::Site - Org:#{@org_id}"
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
def get(id, limit=5000)
|
|
22
|
+
return CiscoWebex::RestCC.get(@auth_token, "/organization/#{@org_id}/site/#{id}", {}, limit)['data'] rescue false
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
def list(params={}, limit=5000)
|
|
26
|
+
return CiscoWebex::RestCC.get(@auth_token, "/organization/#{@org_id}/site", {}, limit)['data'] rescue false
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
def search(params={})
|
|
30
|
+
params = { "name"=> params } if params.class == String
|
|
31
|
+
return CiscoWebex::Toolbox.search(list(), params)
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
def create(params)
|
|
35
|
+
return CiscoWebex::RestCC.post(@auth_token, "/organization/#{@org_id}/site", params) rescue false
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
def delete(id)
|
|
39
|
+
return CiscoWebex::RestCC.delete(@auth_token, "/organization/#{@org_id}/site/#{id}") rescue false
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
def update(id, params)
|
|
43
|
+
return CiscoWebex::RestCC.put(@auth_token, "/organization/#{@org_id}/site/#{id}", params) rescue false
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
def patch(id, params)
|
|
47
|
+
return CiscoWebex::RestCC.patch(@auth_token, "/organization/#{@org_id}/site/#{id}", params) rescue false
|
|
48
|
+
end
|
|
49
|
+
end
|
|
50
|
+
end
|
|
51
|
+
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
module CiscoWebex
|
|
2
|
+
class SkillProfiles < ContactCenter
|
|
3
|
+
@auth_token = nil
|
|
4
|
+
@org_id = nil
|
|
5
|
+
|
|
6
|
+
# initialize object with stored token
|
|
7
|
+
def initialize(token=nil, org_id=nil)
|
|
8
|
+
if token == nil || org_id == nil
|
|
9
|
+
STDERR.puts "Must provide API key for CiscoWebex::ContactCenter::MultimediaProfile"
|
|
10
|
+
return false
|
|
11
|
+
else
|
|
12
|
+
@auth_token = token if token
|
|
13
|
+
@org_id = org_id
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
def this()
|
|
18
|
+
puts "CiscoWebex::ContactCenter::SkillProfile - Org:#{@org_id}"
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
def get(id, limit=5000)
|
|
22
|
+
return CiscoWebex::RestCC.get(@auth_token, "/organization/#{@org_id}/skill-profile/#{id}", {}, limit)['data'] rescue false
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
def list(params={}, limit=5000)
|
|
26
|
+
return CiscoWebex::RestCC.get(@auth_token, "/organization/#{@org_id}/skill-profile", {}, limit)['data'] rescue false
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
def search(params={})
|
|
30
|
+
params = { "name"=> params } if params.class == String
|
|
31
|
+
return CiscoWebex::Toolbox.search(list(), params)
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
def save(params={})
|
|
35
|
+
return CiscoWebex::RestCC.post(@auth_token, "/organization/#{@org_id}/skill-profile/bulk", params) rescue false
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
def create(params)
|
|
39
|
+
return CiscoWebex::RestCC.post(@auth_token, "/organization/#{@org_id}/skill-profile", params) rescue false
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
def delete(id)
|
|
43
|
+
return CiscoWebex::RestCC.delete(@auth_token, "/organization/#{@org_id}/skill-profile/#{id}") rescue false
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
def update(id, params)
|
|
47
|
+
return CiscoWebex::RestCC.put(@auth_token, "/organization/#{@org_id}/skill-profile/#{id}", params) rescue false
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
def patch(id, params)
|
|
51
|
+
return CiscoWebex::RestCC.patch(@auth_token, "/organization/#{@org_id}/skill-profile/#{id}", params) rescue false
|
|
52
|
+
end
|
|
53
|
+
end
|
|
54
|
+
end
|
|
55
|
+
|
data/lib/CC/Skills.rb
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
module CiscoWebex
|
|
2
|
+
class Skills < ContactCenter
|
|
3
|
+
@auth_token = nil
|
|
4
|
+
@org_id = nil
|
|
5
|
+
|
|
6
|
+
# initialize object with stored token
|
|
7
|
+
def initialize(token=nil, org_id=nil)
|
|
8
|
+
if token == nil || org_id == nil
|
|
9
|
+
STDERR.puts "Must provide API key for CiscoWebex::ContactCenter::skill"
|
|
10
|
+
return false
|
|
11
|
+
else
|
|
12
|
+
@auth_token = token if token
|
|
13
|
+
@org_id = org_id # test token and store users profile
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
def this()
|
|
18
|
+
puts "CiscoWebex::ContactCenter::Skill - Org:#{@org_id}"
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
def get(id, limit=5000)
|
|
22
|
+
return CiscoWebex::RestCC.get(@auth_token, "/organization/#{@org_id}/skill/#{id}", {}, limit)['data'] rescue false
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
def list(params={}, limit=5000)
|
|
26
|
+
return CiscoWebex::RestCC.get(@auth_token, "/organization/#{@org_id}/skill", {}, limit)['data'] rescue false
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
def search(params={})
|
|
30
|
+
params = { "name"=> params } if params.class == String
|
|
31
|
+
return CiscoWebex::Toolbox.search(list(), params)
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
def save(params={})
|
|
35
|
+
return CiscoWebex::RestCC.post(@auth_token, "/organization/#{@org_id}/skill/bulk", params) rescue false
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
def create(params)
|
|
39
|
+
return CiscoWebex::RestCC.post(@auth_token, "/organization/#{@org_id}/skill", params) rescue false
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
def delete(id)
|
|
43
|
+
return CiscoWebex::RestCC.delete(@auth_token, "/organization/#{@org_id}/skill/#{id}") rescue false
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
def update(id, params)
|
|
47
|
+
return CiscoWebex::RestCC.put(@auth_token, "/organization/#{@org_id}/skill/#{id}", params) rescue false
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
def patch(id, params)
|
|
51
|
+
return CiscoWebex::RestCC.patch(@auth_token, "/organization/#{@org_id}/skill/#{id}", params) rescue false
|
|
52
|
+
end
|
|
53
|
+
end
|
|
54
|
+
end
|
|
55
|
+
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
module CiscoWebex
|
|
2
|
+
class Subscriptions < ContactCenter
|
|
3
|
+
@auth_token = nil
|
|
4
|
+
@org_id = nil
|
|
5
|
+
|
|
6
|
+
# initialize object with stored token
|
|
7
|
+
def initialize(token=nil, org_id=nil)
|
|
8
|
+
if token == nil || org_id == nil
|
|
9
|
+
STDERR.puts "Must provide API key for CiscoWebex::ContactCenter::Suubscription"
|
|
10
|
+
return false
|
|
11
|
+
else
|
|
12
|
+
@auth_token = token if token
|
|
13
|
+
@org_id = org_id
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
def this()
|
|
18
|
+
puts "CiscoWebex::ContactCenter::Subscription - Org:#{@org_id}"
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
def get(id, limit=5000)
|
|
22
|
+
return CiscoWebex::RestCC.get(@auth_token, "/v1/subscriptions/#{id}", {}, limit)['data'] rescue false
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
def event_type(id, limit=5000)
|
|
26
|
+
return CiscoWebex::RestCC.get(@auth_token, "/v1/event-types?orgId=#{@org_id}", {}, limit)['data'] rescue false
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
def list(params={}, limit=5000)
|
|
30
|
+
return CiscoWebex::RestCC.get(@auth_token, "/v1/subscriptions?orgId=#{@org_id}", {}, limit)['data'] rescue false
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
def search(params={})
|
|
34
|
+
params = { "name"=> params } if params.class == String
|
|
35
|
+
return CiscoWebex::Toolbox.search(list(), params)
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
def create(params)
|
|
39
|
+
return CiscoWebex::RestCC.post(@auth_token, "/v1/subscriptions", params) rescue false
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
def delete(id)
|
|
43
|
+
return CiscoWebex::RestCC.delete(@auth_token, "/v1/subscriptions/id") rescue false
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
def update(id, params)
|
|
47
|
+
return CiscoWebex::RestCC.patch(@auth_token, "/v1/subscriptions/id", params) rescue false
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
def patch(id, params)
|
|
51
|
+
return CiscoWebex::RestCC.patch(@auth_token, "/v1/subscriptions/id", params) rescue false
|
|
52
|
+
end
|
|
53
|
+
end
|
|
54
|
+
end
|
|
55
|
+
|