-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathclient.rb
More file actions
95 lines (79 loc) · 2.52 KB
/
Copy pathclient.rb
File metadata and controls
95 lines (79 loc) · 2.52 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
# frozen_string_literal: true
module Vapi
class Client
# @param base_url [String, nil]
# @param token [String]
#
# @return [void]
def initialize(token:, base_url: nil)
@raw_client = Vapi::Internal::Http::RawClient.new(
base_url: base_url || Vapi::Environment::DEFAULT,
headers: {
"User-Agent" => "vapi_server_sdk/2.0.1",
"X-Fern-Language" => "Ruby",
Authorization: "Bearer #{token}"
}
)
end
# @return [Vapi::Assistants::Client]
def assistants
@assistants ||= Vapi::Assistants::Client.new(client: @raw_client)
end
# @return [Vapi::Squads::Client]
def squads
@squads ||= Vapi::Squads::Client.new(client: @raw_client)
end
# @return [Vapi::Calls::Client]
def calls
@calls ||= Vapi::Calls::Client.new(client: @raw_client)
end
# @return [Vapi::Chats::Client]
def chats
@chats ||= Vapi::Chats::Client.new(client: @raw_client)
end
# @return [Vapi::Campaigns::Client]
def campaigns
@campaigns ||= Vapi::Campaigns::Client.new(client: @raw_client)
end
# @return [Vapi::Sessions::Client]
def sessions
@sessions ||= Vapi::Sessions::Client.new(client: @raw_client)
end
# @return [Vapi::PhoneNumbers::Client]
def phone_numbers
@phone_numbers ||= Vapi::PhoneNumbers::Client.new(client: @raw_client)
end
# @return [Vapi::Tools::Client]
def tools
@tools ||= Vapi::Tools::Client.new(client: @raw_client)
end
# @return [Vapi::Files::Client]
def files
@files ||= Vapi::Files::Client.new(client: @raw_client)
end
# @return [Vapi::StructuredOutputs::Client]
def structured_outputs
@structured_outputs ||= Vapi::StructuredOutputs::Client.new(client: @raw_client)
end
# @return [Vapi::Insight::Client]
def insight
@insight ||= Vapi::Insight::Client.new(client: @raw_client)
end
# @return [Vapi::Eval::Client]
def eval
@eval ||= Vapi::Eval::Client.new(client: @raw_client)
end
# @return [Vapi::ObservabilityScorecard::Client]
def observability_scorecard
@observability_scorecard ||= Vapi::ObservabilityScorecard::Client.new(client: @raw_client)
end
# @return [Vapi::ProviderResources::Client]
def provider_resources
@provider_resources ||= Vapi::ProviderResources::Client.new(client: @raw_client)
end
# @return [Vapi::Analytics::Client]
def analytics
@analytics ||= Vapi::Analytics::Client.new(client: @raw_client)
end
end
end