carbon_ruby_sdk 0.2.7 → 0.2.8

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,246 @@
1
+ =begin
2
+ #Carbon
3
+
4
+ #Connect external data to LLMs, no matter the source.
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+ =end
8
+
9
+ require 'date'
10
+ require 'time'
11
+
12
+ module Carbon
13
+ class UserWebPagesRequest
14
+ attr_accessor :filters
15
+
16
+ attr_accessor :pagination
17
+
18
+ attr_accessor :order_by
19
+
20
+ attr_accessor :order_dir
21
+
22
+ # Attribute mapping from ruby-style variable name to JSON key.
23
+ def self.attribute_map
24
+ {
25
+ :'filters' => :'filters',
26
+ :'pagination' => :'pagination',
27
+ :'order_by' => :'order_by',
28
+ :'order_dir' => :'order_dir'
29
+ }
30
+ end
31
+
32
+ # Returns all the JSON keys this model knows about
33
+ def self.acceptable_attributes
34
+ attribute_map.values
35
+ end
36
+
37
+ # Attribute type mapping.
38
+ def self.openapi_types
39
+ {
40
+ :'filters' => :'UserWebPagesFilters',
41
+ :'pagination' => :'Pagination',
42
+ :'order_by' => :'UserWebPageOrderByTypes',
43
+ :'order_dir' => :'OrderDirV2'
44
+ }
45
+ end
46
+
47
+ # List of attributes with nullable: true
48
+ def self.openapi_nullable
49
+ Set.new([
50
+ ])
51
+ end
52
+
53
+ # Initializes the object
54
+ # @param [Hash] attributes Model attributes in the form of hash
55
+ def initialize(attributes = {})
56
+ if (!attributes.is_a?(Hash))
57
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Carbon::UserWebPagesRequest` initialize method"
58
+ end
59
+
60
+ # check to see if the attribute exists and convert string to symbol for hash key
61
+ attributes = attributes.each_with_object({}) { |(k, v), h|
62
+ if (!self.class.attribute_map.key?(k.to_sym))
63
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Carbon::UserWebPagesRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
64
+ end
65
+ h[k.to_sym] = v
66
+ }
67
+
68
+ if attributes.key?(:'filters')
69
+ self.filters = attributes[:'filters']
70
+ end
71
+
72
+ if attributes.key?(:'pagination')
73
+ self.pagination = attributes[:'pagination']
74
+ end
75
+
76
+ if attributes.key?(:'order_by')
77
+ self.order_by = attributes[:'order_by']
78
+ else
79
+ self.order_by = 'updated_at'
80
+ end
81
+
82
+ if attributes.key?(:'order_dir')
83
+ self.order_dir = attributes[:'order_dir']
84
+ else
85
+ self.order_dir = 'desc'
86
+ end
87
+ end
88
+
89
+ # Show invalid properties with the reasons. Usually used together with valid?
90
+ # @return Array for valid properties with the reasons
91
+ def list_invalid_properties
92
+ invalid_properties = Array.new
93
+ invalid_properties
94
+ end
95
+
96
+ # Check to see if the all the properties in the model are valid
97
+ # @return true if the model is valid
98
+ def valid?
99
+ true
100
+ end
101
+
102
+ # Checks equality by comparing each attribute.
103
+ # @param [Object] Object to be compared
104
+ def ==(o)
105
+ return true if self.equal?(o)
106
+ self.class == o.class &&
107
+ filters == o.filters &&
108
+ pagination == o.pagination &&
109
+ order_by == o.order_by &&
110
+ order_dir == o.order_dir
111
+ end
112
+
113
+ # @see the `==` method
114
+ # @param [Object] Object to be compared
115
+ def eql?(o)
116
+ self == o
117
+ end
118
+
119
+ # Calculates hash code according to all attributes.
120
+ # @return [Integer] Hash code
121
+ def hash
122
+ [filters, pagination, order_by, order_dir].hash
123
+ end
124
+
125
+ # Builds the object from hash
126
+ # @param [Hash] attributes Model attributes in the form of hash
127
+ # @return [Object] Returns the model itself
128
+ def self.build_from_hash(attributes)
129
+ new.build_from_hash(attributes)
130
+ end
131
+
132
+ # Builds the object from hash
133
+ # @param [Hash] attributes Model attributes in the form of hash
134
+ # @return [Object] Returns the model itself
135
+ def build_from_hash(attributes)
136
+ return nil unless attributes.is_a?(Hash)
137
+ attributes = attributes.transform_keys(&:to_sym)
138
+ self.class.openapi_types.each_pair do |key, type|
139
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
140
+ self.send("#{key}=", nil)
141
+ elsif type =~ /\AArray<(.*)>/i
142
+ # check to ensure the input is an array given that the attribute
143
+ # is documented as an array but the input is not
144
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
145
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
146
+ end
147
+ elsif !attributes[self.class.attribute_map[key]].nil?
148
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
149
+ end
150
+ end
151
+
152
+ self
153
+ end
154
+
155
+ # Deserializes the data based on type
156
+ # @param string type Data type
157
+ # @param string value Value to be deserialized
158
+ # @return [Object] Deserialized data
159
+ def _deserialize(type, value)
160
+ case type.to_sym
161
+ when :Time
162
+ Time.parse(value)
163
+ when :Date
164
+ Date.parse(value)
165
+ when :String
166
+ value.to_s
167
+ when :Integer
168
+ value.to_i
169
+ when :Float
170
+ value.to_f
171
+ when :Boolean
172
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
173
+ true
174
+ else
175
+ false
176
+ end
177
+ when :Object
178
+ # generic object (usually a Hash), return directly
179
+ value
180
+ when /\AArray<(?<inner_type>.+)>\z/
181
+ inner_type = Regexp.last_match[:inner_type]
182
+ value.map { |v| _deserialize(inner_type, v) }
183
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
184
+ k_type = Regexp.last_match[:k_type]
185
+ v_type = Regexp.last_match[:v_type]
186
+ {}.tap do |hash|
187
+ value.each do |k, v|
188
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
189
+ end
190
+ end
191
+ else # model
192
+ # models (e.g. Pet) or oneOf
193
+ klass = Carbon.const_get(type)
194
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
195
+ end
196
+ end
197
+
198
+ # Returns the string representation of the object
199
+ # @return [String] String presentation of the object
200
+ def to_s
201
+ to_hash.to_s
202
+ end
203
+
204
+ # to_body is an alias to to_hash (backward compatibility)
205
+ # @return [Hash] Returns the object in the form of hash
206
+ def to_body
207
+ to_hash
208
+ end
209
+
210
+ # Returns the object in the form of hash
211
+ # @return [Hash] Returns the object in the form of hash
212
+ def to_hash
213
+ hash = {}
214
+ self.class.attribute_map.each_pair do |attr, param|
215
+ value = self.send(attr)
216
+ if value.nil?
217
+ is_nullable = self.class.openapi_nullable.include?(attr)
218
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
219
+ end
220
+
221
+ hash[param] = _to_hash(value)
222
+ end
223
+ hash
224
+ end
225
+
226
+ # Outputs non-array value in the form of hash
227
+ # For object, use to_hash. Otherwise, just return the value
228
+ # @param [Object] value Any valid value
229
+ # @return [Hash] Returns the value in the form of hash
230
+ def _to_hash(value)
231
+ if value.is_a?(Array)
232
+ value.compact.map { |v| _to_hash(v) }
233
+ elsif value.is_a?(Hash)
234
+ {}.tap do |hash|
235
+ value.each { |k, v| hash[k] = _to_hash(v) }
236
+ end
237
+ elsif value.respond_to? :to_hash
238
+ value.to_hash
239
+ else
240
+ value
241
+ end
242
+ end
243
+
244
+ end
245
+
246
+ end
@@ -7,5 +7,5 @@ The version of the OpenAPI document: 1.0.0
7
7
  =end
8
8
 
9
9
  module Carbon
10
- VERSION = '0.2.7'
10
+ VERSION = '0.2.8'
11
11
  end
@@ -49,6 +49,7 @@ require 'carbon_ruby_sdk/models/embeddings_and_chunks_response'
49
49
  require 'carbon_ruby_sdk/models/external_file_sync_statuses'
50
50
  require 'carbon_ruby_sdk/models/external_source_item'
51
51
  require 'carbon_ruby_sdk/models/external_source_items_order_by'
52
+ require 'carbon_ruby_sdk/models/fetch_urls_request'
52
53
  require 'carbon_ruby_sdk/models/fetch_urls_response'
53
54
  require 'carbon_ruby_sdk/models/file_content_types'
54
55
  require 'carbon_ruby_sdk/models/file_content_types_nullable'
@@ -137,6 +138,9 @@ require 'carbon_ruby_sdk/models/user_file'
137
138
  require 'carbon_ruby_sdk/models/user_files_v2'
138
139
  require 'carbon_ruby_sdk/models/user_request_content'
139
140
  require 'carbon_ruby_sdk/models/user_response'
141
+ require 'carbon_ruby_sdk/models/user_web_page_order_by_types'
142
+ require 'carbon_ruby_sdk/models/user_web_pages_filters'
143
+ require 'carbon_ruby_sdk/models/user_web_pages_request'
140
144
  require 'carbon_ruby_sdk/models/validation_error'
141
145
  require 'carbon_ruby_sdk/models/webhook'
142
146
  require 'carbon_ruby_sdk/models/webhook_filters'
@@ -156,7 +160,6 @@ require 'carbon_ruby_sdk/api/auth_api'
156
160
  require 'carbon_ruby_sdk/api/data_sources_api'
157
161
  require 'carbon_ruby_sdk/api/embeddings_api'
158
162
  require 'carbon_ruby_sdk/api/files_api'
159
- require 'carbon_ruby_sdk/api/health_api'
160
163
  require 'carbon_ruby_sdk/api/integrations_api'
161
164
  require 'carbon_ruby_sdk/api/organizations_api'
162
165
  require 'carbon_ruby_sdk/api/users_api'
@@ -223,7 +226,6 @@ module Carbon
223
226
  attr_reader :data_sources
224
227
  attr_reader :embeddings
225
228
  attr_reader :files
226
- attr_reader :health
227
229
  attr_reader :integrations
228
230
  attr_reader :organizations
229
231
  attr_reader :users
@@ -236,7 +238,6 @@ module Carbon
236
238
  @data_sources = Carbon::DataSourcesApi.new(@api_client)
237
239
  @embeddings = Carbon::EmbeddingsApi.new(@api_client)
238
240
  @files = Carbon::FilesApi.new(@api_client)
239
- @health = Carbon::HealthApi.new(@api_client)
240
241
  @integrations = Carbon::IntegrationsApi.new(@api_client)
241
242
  @organizations = Carbon::OrganizationsApi.new(@api_client)
242
243
  @users = Carbon::UsersApi.new(@api_client)
@@ -38,6 +38,17 @@ describe 'UtilitiesApi' do
38
38
  end
39
39
  end
40
40
 
41
+ # unit tests for fetch_webpage
42
+ # Fetch Urls V2
43
+ # @param fetch_urls_request
44
+ # @param [Hash] opts the optional parameters
45
+ # @return [Object]
46
+ describe 'fetch_webpage test' do
47
+ it 'should work' do
48
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
49
+ end
50
+ end
51
+
41
52
  # unit tests for fetch_youtube_transcripts
42
53
  # Fetch Youtube Transcripts
43
54
  # Fetches english transcripts from YouTube videos. Args: id (str): The ID of the YouTube video. raw (bool): Whether to return the raw transcript or not. Defaults to False. Returns: dict: A dictionary with the transcript of the YouTube video.
@@ -99,4 +110,15 @@ describe 'UtilitiesApi' do
99
110
  end
100
111
  end
101
112
 
113
+ # unit tests for user_webpages
114
+ # User Web Pages
115
+ # @param user_web_pages_request
116
+ # @param [Hash] opts the optional parameters
117
+ # @return [Object]
118
+ describe 'user_webpages test' do
119
+ it 'should work' do
120
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
121
+ end
122
+ end
123
+
102
124
  end
@@ -0,0 +1,28 @@
1
+ =begin
2
+ #Carbon
3
+
4
+ #Connect external data to LLMs, no matter the source.
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+ =end
8
+
9
+ require 'spec_helper'
10
+ require 'json'
11
+ require 'date'
12
+
13
+ # Unit tests for Carbon::FetchURLsRequest
14
+ describe Carbon::FetchURLsRequest do
15
+ let(:instance) { Carbon::FetchURLsRequest.new }
16
+
17
+ describe 'test an instance of FetchURLsRequest' do
18
+ it 'should create an instance of FetchURLsRequest' do
19
+ expect(instance).to be_instance_of(Carbon::FetchURLsRequest)
20
+ end
21
+ end
22
+ describe 'test attribute "url"' do
23
+ it 'should work' do
24
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
25
+ end
26
+ end
27
+
28
+ end
@@ -0,0 +1,22 @@
1
+ =begin
2
+ #Carbon
3
+
4
+ #Connect external data to LLMs, no matter the source.
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+ =end
8
+
9
+ require 'spec_helper'
10
+ require 'json'
11
+ require 'date'
12
+
13
+ # Unit tests for Carbon::UserWebPageOrderByTypes
14
+ describe Carbon::UserWebPageOrderByTypes do
15
+ let(:instance) { Carbon::UserWebPageOrderByTypes.new }
16
+
17
+ describe 'test an instance of UserWebPageOrderByTypes' do
18
+ it 'should create an instance of UserWebPageOrderByTypes' do
19
+ expect(instance).to be_instance_of(Carbon::UserWebPageOrderByTypes)
20
+ end
21
+ end
22
+ end
@@ -0,0 +1,28 @@
1
+ =begin
2
+ #Carbon
3
+
4
+ #Connect external data to LLMs, no matter the source.
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+ =end
8
+
9
+ require 'spec_helper'
10
+ require 'json'
11
+ require 'date'
12
+
13
+ # Unit tests for Carbon::UserWebPagesFilters
14
+ describe Carbon::UserWebPagesFilters do
15
+ let(:instance) { Carbon::UserWebPagesFilters.new }
16
+
17
+ describe 'test an instance of UserWebPagesFilters' do
18
+ it 'should create an instance of UserWebPagesFilters' do
19
+ expect(instance).to be_instance_of(Carbon::UserWebPagesFilters)
20
+ end
21
+ end
22
+ describe 'test attribute "ids"' do
23
+ it 'should work' do
24
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
25
+ end
26
+ end
27
+
28
+ end
@@ -0,0 +1,46 @@
1
+ =begin
2
+ #Carbon
3
+
4
+ #Connect external data to LLMs, no matter the source.
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+ =end
8
+
9
+ require 'spec_helper'
10
+ require 'json'
11
+ require 'date'
12
+
13
+ # Unit tests for Carbon::UserWebPagesRequest
14
+ describe Carbon::UserWebPagesRequest do
15
+ let(:instance) { Carbon::UserWebPagesRequest.new }
16
+
17
+ describe 'test an instance of UserWebPagesRequest' do
18
+ it 'should create an instance of UserWebPagesRequest' do
19
+ expect(instance).to be_instance_of(Carbon::UserWebPagesRequest)
20
+ end
21
+ end
22
+ describe 'test attribute "filters"' do
23
+ it 'should work' do
24
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
25
+ end
26
+ end
27
+
28
+ describe 'test attribute "pagination"' do
29
+ it 'should work' do
30
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
31
+ end
32
+ end
33
+
34
+ describe 'test attribute "order_by"' do
35
+ it 'should work' do
36
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
37
+ end
38
+ end
39
+
40
+ describe 'test attribute "order_dir"' do
41
+ it 'should work' do
42
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
43
+ end
44
+ end
45
+
46
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: carbon_ruby_sdk
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.7
4
+ version: 0.2.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Konfig
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-06-18 00:00:00.000000000 Z
11
+ date: 2024-06-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -88,7 +88,6 @@ files:
88
88
  - lib/carbon_ruby_sdk/api/data_sources_api.rb
89
89
  - lib/carbon_ruby_sdk/api/embeddings_api.rb
90
90
  - lib/carbon_ruby_sdk/api/files_api.rb
91
- - lib/carbon_ruby_sdk/api/health_api.rb
92
91
  - lib/carbon_ruby_sdk/api/integrations_api.rb
93
92
  - lib/carbon_ruby_sdk/api/organizations_api.rb
94
93
  - lib/carbon_ruby_sdk/api/users_api.rb
@@ -132,6 +131,7 @@ files:
132
131
  - lib/carbon_ruby_sdk/models/external_file_sync_statuses.rb
133
132
  - lib/carbon_ruby_sdk/models/external_source_item.rb
134
133
  - lib/carbon_ruby_sdk/models/external_source_items_order_by.rb
134
+ - lib/carbon_ruby_sdk/models/fetch_urls_request.rb
135
135
  - lib/carbon_ruby_sdk/models/fetch_urls_response.rb
136
136
  - lib/carbon_ruby_sdk/models/file_content_types.rb
137
137
  - lib/carbon_ruby_sdk/models/file_content_types_nullable.rb
@@ -220,6 +220,9 @@ files:
220
220
  - lib/carbon_ruby_sdk/models/user_files_v2.rb
221
221
  - lib/carbon_ruby_sdk/models/user_request_content.rb
222
222
  - lib/carbon_ruby_sdk/models/user_response.rb
223
+ - lib/carbon_ruby_sdk/models/user_web_page_order_by_types.rb
224
+ - lib/carbon_ruby_sdk/models/user_web_pages_filters.rb
225
+ - lib/carbon_ruby_sdk/models/user_web_pages_request.rb
223
226
  - lib/carbon_ruby_sdk/models/validation_error.rb
224
227
  - lib/carbon_ruby_sdk/models/webhook.rb
225
228
  - lib/carbon_ruby_sdk/models/webhook_filters.rb
@@ -238,7 +241,6 @@ files:
238
241
  - spec/api/data_sources_api_spec.rb
239
242
  - spec/api/embeddings_api_spec.rb
240
243
  - spec/api/files_api_spec.rb
241
- - spec/api/health_api_spec.rb
242
244
  - spec/api/integrations_api_spec.rb
243
245
  - spec/api/organizations_api_spec.rb
244
246
  - spec/api/users_api_spec.rb
@@ -281,6 +283,7 @@ files:
281
283
  - spec/models/external_file_sync_statuses_spec.rb
282
284
  - spec/models/external_source_item_spec.rb
283
285
  - spec/models/external_source_items_order_by_spec.rb
286
+ - spec/models/fetch_urls_request_spec.rb
284
287
  - spec/models/fetch_urls_response_spec.rb
285
288
  - spec/models/file_content_types_nullable_spec.rb
286
289
  - spec/models/file_content_types_spec.rb
@@ -369,6 +372,9 @@ files:
369
372
  - spec/models/user_files_v2_spec.rb
370
373
  - spec/models/user_request_content_spec.rb
371
374
  - spec/models/user_response_spec.rb
375
+ - spec/models/user_web_page_order_by_types_spec.rb
376
+ - spec/models/user_web_pages_filters_spec.rb
377
+ - spec/models/user_web_pages_request_spec.rb
372
378
  - spec/models/validation_error_spec.rb
373
379
  - spec/models/webhook_filters_spec.rb
374
380
  - spec/models/webhook_no_key_spec.rb
@@ -410,7 +416,6 @@ specification_version: 4
410
416
  summary: Carbon Ruby Gem
411
417
  test_files:
412
418
  - spec/api/auth_api_spec.rb
413
- - spec/api/health_api_spec.rb
414
419
  - spec/api/organizations_api_spec.rb
415
420
  - spec/api/integrations_api_spec.rb
416
421
  - spec/api/webhooks_api_spec.rb
@@ -438,6 +443,7 @@ test_files:
438
443
  - spec/models/github_fetch_repos_request_spec.rb
439
444
  - spec/models/list_data_source_items_response_spec.rb
440
445
  - spec/models/github_authentication_spec.rb
446
+ - spec/models/user_web_pages_filters_spec.rb
441
447
  - spec/models/chunk_properties_nullable_spec.rb
442
448
  - spec/models/gitbook_connect_request_spec.rb
443
449
  - spec/models/slack_sync_request_spec.rb
@@ -447,6 +453,7 @@ test_files:
447
453
  - spec/models/update_organization_input_spec.rb
448
454
  - spec/models/user_request_content_spec.rb
449
455
  - spec/models/gmail_sync_input_spec.rb
456
+ - spec/models/fetch_urls_request_spec.rb
450
457
  - spec/models/embedding_model_spec.rb
451
458
  - spec/models/delete_files_query_input_spec.rb
452
459
  - spec/models/webhook_query_input_spec.rb
@@ -474,6 +481,7 @@ test_files:
474
481
  - spec/models/authentication_property_spec.rb
475
482
  - spec/models/validation_error_spec.rb
476
483
  - spec/models/presigned_url_response_spec.rb
484
+ - spec/models/user_web_pages_request_spec.rb
477
485
  - spec/models/webhook_order_by_columns_spec.rb
478
486
  - spec/models/user_files_v2_spec.rb
479
487
  - spec/models/organization_user_files_to_sync_filters_spec.rb
@@ -499,6 +507,7 @@ test_files:
499
507
  - spec/models/chunks_and_embeddings_spec.rb
500
508
  - spec/models/sync_files_ids_spec.rb
501
509
  - spec/models/s3_get_file_input_spec.rb
510
+ - spec/models/user_web_page_order_by_types_spec.rb
502
511
  - spec/models/upload_file_from_url_input_spec.rb
503
512
  - spec/models/gitbook_sync_request_spec.rb
504
513
  - spec/models/list_items_filters_nullable_spec.rb
@@ -1,92 +0,0 @@
1
- =begin
2
- #Carbon
3
-
4
- #Connect external data to LLMs, no matter the source.
5
-
6
- The version of the OpenAPI document: 1.0.0
7
- =end
8
-
9
- require 'cgi'
10
-
11
- module Carbon
12
- class HealthApi
13
- attr_accessor :api_client
14
-
15
- def initialize(api_client = ApiClient.default)
16
- @api_client = api_client
17
- end
18
-
19
- # Health
20
- #
21
- # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
22
- def check(extra: {})
23
- api_response = check_with_http_info_impl(extra)
24
- api_response.data
25
- end
26
-
27
- # Health
28
- #
29
- # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
30
- def check_with_http_info(extra: {})
31
- check_with_http_info_impl(extra)
32
- end
33
-
34
- # Health
35
- # @param [Hash] opts the optional parameters
36
- # @return [Object]
37
- private def check_impl(opts = {})
38
- data, _status_code, _headers = check_with_http_info(opts)
39
- data
40
- end
41
-
42
- # Health
43
- # @param [Hash] opts the optional parameters
44
- # @return [APIResponse] data is Object, status code, headers and response
45
- private def check_with_http_info_impl(opts = {})
46
- if @api_client.config.debugging
47
- @api_client.config.logger.debug 'Calling API: HealthApi.check ...'
48
- end
49
- # resource path
50
- local_var_path = '/health'
51
-
52
- # query parameters
53
- query_params = opts[:query_params] || {}
54
-
55
- # header parameters
56
- header_params = opts[:header_params] || {}
57
- # HTTP header 'Accept' (if needed)
58
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
59
-
60
- # form parameters
61
- form_params = opts[:form_params] || {}
62
-
63
- # http body (model)
64
- post_body = opts[:debug_body]
65
-
66
- # return_type
67
- return_type = opts[:debug_return_type] || 'Object'
68
-
69
- # auth_names
70
- auth_names = opts[:debug_auth_names] || []
71
-
72
- new_options = opts.merge(
73
- :operation => :"HealthApi.check",
74
- :header_params => header_params,
75
- :query_params => query_params,
76
- :form_params => form_params,
77
- :body => post_body,
78
- :auth_names => auth_names,
79
- :return_type => return_type
80
- )
81
-
82
- data, status_code, headers, response = @api_client.call_api(:GET, local_var_path, new_options)
83
- if @api_client.config.debugging
84
- @api_client.config.logger.debug "API called: HealthApi#check\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
85
- end
86
- APIResponse::new(data, status_code, headers, response)
87
- end
88
- end
89
-
90
- # top-level client access to avoid having the user to insantiate their own API instances
91
- Health = HealthApi::new
92
- end
@@ -1,39 +0,0 @@
1
- =begin
2
- #Carbon
3
-
4
- #Connect external data to LLMs, no matter the source.
5
-
6
- The version of the OpenAPI document: 1.0.0
7
- =end
8
-
9
- require 'spec_helper'
10
- require 'json'
11
-
12
- # Unit tests for Carbon::HealthApi
13
- describe 'HealthApi' do
14
- before do
15
- # run before each test
16
- @api_instance = Carbon::HealthApi.new
17
- end
18
-
19
- after do
20
- # run after each test
21
- end
22
-
23
- describe 'test an instance of HealthApi' do
24
- it 'should create an instance of HealthApi' do
25
- expect(@api_instance).to be_instance_of(Carbon::HealthApi)
26
- end
27
- end
28
-
29
- # unit tests for check
30
- # Health
31
- # @param [Hash] opts the optional parameters
32
- # @return [Object]
33
- describe 'check test' do
34
- it 'should work' do
35
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
36
- end
37
- end
38
-
39
- end