trieve_ruby_client 0.3.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/Gemfile +9 -0
- data/LICENSE +21 -0
- data/README.md +240 -0
- data/Rakefile +10 -0
- data/docs/AddChunkToGroupData.md +18 -0
- data/docs/ApiKeyDTO.md +28 -0
- data/docs/AuthApi.md +274 -0
- data/docs/BookmarkData.md +22 -0
- data/docs/BookmarkGroupResult.md +20 -0
- data/docs/ChatMessageProxy.md +20 -0
- data/docs/ChunkApi.md +955 -0
- data/docs/ChunkFilter.md +22 -0
- data/docs/ChunkGroup.md +30 -0
- data/docs/ChunkGroupAndFile.md +32 -0
- data/docs/ChunkGroupApi.md +1262 -0
- data/docs/ChunkMetadata.md +42 -0
- data/docs/ChunkMetadataWithFileData.md +44 -0
- data/docs/ClientDatasetConfiguration.md +38 -0
- data/docs/CreateChunkData.md +42 -0
- data/docs/CreateChunkGroupData.md +22 -0
- data/docs/CreateDatasetRequest.md +24 -0
- data/docs/CreateMessageData.md +28 -0
- data/docs/CreateOrganizationData.md +18 -0
- data/docs/CreateTopicData.md +22 -0
- data/docs/Dataset.md +30 -0
- data/docs/DatasetAndUsage.md +20 -0
- data/docs/DatasetApi.md +480 -0
- data/docs/DatasetDTO.md +28 -0
- data/docs/DatasetUsageCount.md +22 -0
- data/docs/DeleteDatasetRequest.md +18 -0
- data/docs/DeleteTopicData.md +18 -0
- data/docs/DeleteUserApiKeyRequest.md +18 -0
- data/docs/EditMessageData.md +30 -0
- data/docs/ErrorResponseBody.md +18 -0
- data/docs/Event.md +28 -0
- data/docs/EventReturn.md +20 -0
- data/docs/EventsApi.md +86 -0
- data/docs/FieldCondition.md +22 -0
- data/docs/File.md +36 -0
- data/docs/FileApi.md +326 -0
- data/docs/FileDTO.md +32 -0
- data/docs/GenerateChunksRequest.md +26 -0
- data/docs/GetGroupsForChunksData.md +18 -0
- data/docs/GroupData.md +20 -0
- data/docs/GroupScoreChunkDTO.md +20 -0
- data/docs/HealthApi.md +66 -0
- data/docs/InvitationApi.md +85 -0
- data/docs/InvitationData.md +26 -0
- data/docs/MatchCondition.md +49 -0
- data/docs/Message.md +38 -0
- data/docs/MessageApi.md +322 -0
- data/docs/Organization.md +26 -0
- data/docs/OrganizationApi.md +479 -0
- data/docs/OrganizationUsageCount.md +28 -0
- data/docs/Range.md +24 -0
- data/docs/ReccomendGroupChunksRequest.md +30 -0
- data/docs/RecommendChunksRequest.md +28 -0
- data/docs/RegenerateMessageData.md +26 -0
- data/docs/ReturnQueuedChunk.md +20 -0
- data/docs/ScoreChunkDTO.md +20 -0
- data/docs/SearchChunkData.md +38 -0
- data/docs/SearchChunkQueryResponseBody.md +20 -0
- data/docs/SearchGroupsResult.md +22 -0
- data/docs/SearchOverGroupsData.md +36 -0
- data/docs/SearchOverGroupsResponseBody.md +20 -0
- data/docs/SearchWithinGroupData.md +40 -0
- data/docs/SetUserApiKeyRequest.md +20 -0
- data/docs/SetUserApiKeyResponse.md +18 -0
- data/docs/SlimGroup.md +24 -0
- data/docs/SlimUser.md +32 -0
- data/docs/StripeApi.md +285 -0
- data/docs/StripePlan.md +38 -0
- data/docs/StripeSubscription.md +30 -0
- data/docs/SuggestedQueriesRequest.md +18 -0
- data/docs/SuggestedQueriesResponse.md +18 -0
- data/docs/Topic.md +30 -0
- data/docs/TopicApi.md +321 -0
- data/docs/UpdateChunkByTrackingIdData.md +32 -0
- data/docs/UpdateChunkData.md +34 -0
- data/docs/UpdateChunkGroupData.md +24 -0
- data/docs/UpdateDatasetRequest.md +24 -0
- data/docs/UpdateGroupByTrackingIDData.md +22 -0
- data/docs/UpdateOrganizationData.md +20 -0
- data/docs/UpdateTopicData.md +20 -0
- data/docs/UpdateUserData.md +30 -0
- data/docs/UploadFileData.md +34 -0
- data/docs/UploadFileResult.md +18 -0
- data/docs/UserApi.md +238 -0
- data/docs/UserOrganization.md +28 -0
- data/git_push.sh +57 -0
- data/lib/trieve_ruby_client/api/auth_api.rb +262 -0
- data/lib/trieve_ruby_client/api/chunk_api.rb +906 -0
- data/lib/trieve_ruby_client/api/chunk_group_api.rb +1230 -0
- data/lib/trieve_ruby_client/api/dataset_api.rb +458 -0
- data/lib/trieve_ruby_client/api/events_api.rb +92 -0
- data/lib/trieve_ruby_client/api/file_api.rb +324 -0
- data/lib/trieve_ruby_client/api/health_api.rb +75 -0
- data/lib/trieve_ruby_client/api/invitation_api.rb +97 -0
- data/lib/trieve_ruby_client/api/message_api.rb +317 -0
- data/lib/trieve_ruby_client/api/organization_api.rb +445 -0
- data/lib/trieve_ruby_client/api/stripe_api.rb +278 -0
- data/lib/trieve_ruby_client/api/topic_api.rb +317 -0
- data/lib/trieve_ruby_client/api/user_api.rb +226 -0
- data/lib/trieve_ruby_client/api_client.rb +394 -0
- data/lib/trieve_ruby_client/api_error.rb +58 -0
- data/lib/trieve_ruby_client/configuration.rb +305 -0
- data/lib/trieve_ruby_client/models/add_chunk_to_group_data.rb +222 -0
- data/lib/trieve_ruby_client/models/api_key_dto.rb +301 -0
- data/lib/trieve_ruby_client/models/bookmark_data.rb +255 -0
- data/lib/trieve_ruby_client/models/bookmark_group_result.rb +239 -0
- data/lib/trieve_ruby_client/models/chat_message_proxy.rb +237 -0
- data/lib/trieve_ruby_client/models/chunk_filter.rb +244 -0
- data/lib/trieve_ruby_client/models/chunk_group.rb +311 -0
- data/lib/trieve_ruby_client/models/chunk_group_and_file.rb +321 -0
- data/lib/trieve_ruby_client/models/chunk_metadata.rb +371 -0
- data/lib/trieve_ruby_client/models/chunk_metadata_with_file_data.rb +381 -0
- data/lib/trieve_ruby_client/models/client_dataset_configuration.rb +336 -0
- data/lib/trieve_ruby_client/models/create_chunk_data.rb +356 -0
- data/lib/trieve_ruby_client/models/create_chunk_group_data.rb +250 -0
- data/lib/trieve_ruby_client/models/create_dataset_request.rb +265 -0
- data/lib/trieve_ruby_client/models/create_message_data.rb +285 -0
- data/lib/trieve_ruby_client/models/create_organization_data.rb +222 -0
- data/lib/trieve_ruby_client/models/create_topic_data.rb +238 -0
- data/lib/trieve_ruby_client/models/dataset.rb +309 -0
- data/lib/trieve_ruby_client/models/dataset_and_usage.rb +237 -0
- data/lib/trieve_ruby_client/models/dataset_dto.rb +297 -0
- data/lib/trieve_ruby_client/models/dataset_usage_count.rb +253 -0
- data/lib/trieve_ruby_client/models/delete_dataset_request.rb +222 -0
- data/lib/trieve_ruby_client/models/delete_topic_data.rb +222 -0
- data/lib/trieve_ruby_client/models/delete_user_api_key_request.rb +222 -0
- data/lib/trieve_ruby_client/models/edit_message_data.rb +302 -0
- data/lib/trieve_ruby_client/models/error_response_body.rb +221 -0
- data/lib/trieve_ruby_client/models/event.rb +297 -0
- data/lib/trieve_ruby_client/models/event_return.rb +239 -0
- data/lib/trieve_ruby_client/models/field_condition.rb +245 -0
- data/lib/trieve_ruby_client/models/file.rb +341 -0
- data/lib/trieve_ruby_client/models/file_dto.rb +321 -0
- data/lib/trieve_ruby_client/models/generate_chunks_request.rb +276 -0
- data/lib/trieve_ruby_client/models/get_groups_for_chunks_data.rb +223 -0
- data/lib/trieve_ruby_client/models/group_data.rb +239 -0
- data/lib/trieve_ruby_client/models/group_score_chunk_dto.rb +239 -0
- data/lib/trieve_ruby_client/models/invitation_data.rb +290 -0
- data/lib/trieve_ruby_client/models/match_condition.rb +105 -0
- data/lib/trieve_ruby_client/models/message.rb +369 -0
- data/lib/trieve_ruby_client/models/organization.rb +279 -0
- data/lib/trieve_ruby_client/models/organization_usage_count.rb +301 -0
- data/lib/trieve_ruby_client/models/range.rb +245 -0
- data/lib/trieve_ruby_client/models/reccomend_group_chunks_request.rb +319 -0
- data/lib/trieve_ruby_client/models/recommend_chunks_request.rb +293 -0
- data/lib/trieve_ruby_client/models/regenerate_message_data.rb +268 -0
- data/lib/trieve_ruby_client/models/return_queued_chunk.rb +237 -0
- data/lib/trieve_ruby_client/models/score_chunk_dto.rb +239 -0
- data/lib/trieve_ruby_client/models/search_chunk_data.rb +369 -0
- data/lib/trieve_ruby_client/models/search_chunk_query_response_body.rb +239 -0
- data/lib/trieve_ruby_client/models/search_groups_result.rb +255 -0
- data/lib/trieve_ruby_client/models/search_over_groups_data.rb +372 -0
- data/lib/trieve_ruby_client/models/search_over_groups_response_body.rb +239 -0
- data/lib/trieve_ruby_client/models/search_within_group_data.rb +380 -0
- data/lib/trieve_ruby_client/models/set_user_api_key_request.rb +239 -0
- data/lib/trieve_ruby_client/models/set_user_api_key_response.rb +222 -0
- data/lib/trieve_ruby_client/models/slim_group.rb +269 -0
- data/lib/trieve_ruby_client/models/slim_user.rb +319 -0
- data/lib/trieve_ruby_client/models/stripe_plan.rb +381 -0
- data/lib/trieve_ruby_client/models/stripe_subscription.rb +311 -0
- data/lib/trieve_ruby_client/models/suggested_queries_request.rb +222 -0
- data/lib/trieve_ruby_client/models/suggested_queries_response.rb +223 -0
- data/lib/trieve_ruby_client/models/topic.rb +317 -0
- data/lib/trieve_ruby_client/models/update_chunk_by_tracking_id_data.rb +303 -0
- data/lib/trieve_ruby_client/models/update_chunk_data.rb +308 -0
- data/lib/trieve_ruby_client/models/update_chunk_group_data.rb +249 -0
- data/lib/trieve_ruby_client/models/update_dataset_request.rb +255 -0
- data/lib/trieve_ruby_client/models/update_group_by_tracking_id_data.rb +244 -0
- data/lib/trieve_ruby_client/models/update_organization_data.rb +233 -0
- data/lib/trieve_ruby_client/models/update_topic_data.rb +239 -0
- data/lib/trieve_ruby_client/models/update_user_data.rb +288 -0
- data/lib/trieve_ruby_client/models/upload_file_data.rb +324 -0
- data/lib/trieve_ruby_client/models/upload_file_result.rb +221 -0
- data/lib/trieve_ruby_client/models/user_organization.rb +301 -0
- data/lib/trieve_ruby_client/version.rb +15 -0
- data/lib/trieve_ruby_client.rb +124 -0
- data/openapi-generator.yaml +9 -0
- data/openapi.json +6530 -0
- data/openapitools.json +7 -0
- data/spec/api/auth_api_spec.rb +82 -0
- data/spec/api/chunk_api_spec.rb +191 -0
- data/spec/api/chunk_group_api_spec.rb +242 -0
- data/spec/api/dataset_api_spec.rb +113 -0
- data/spec/api/events_api_spec.rb +48 -0
- data/spec/api/file_api_spec.rb +89 -0
- data/spec/api/health_api_spec.rb +44 -0
- data/spec/api/invitation_api_spec.rb +48 -0
- data/spec/api/message_api_spec.rb +87 -0
- data/spec/api/organization_api_spec.rb +112 -0
- data/spec/api/stripe_api_spec.rb +78 -0
- data/spec/api/topic_api_spec.rb +87 -0
- data/spec/api/user_api_spec.rb +71 -0
- data/spec/models/add_chunk_to_group_data_spec.rb +36 -0
- data/spec/models/api_key_dto_spec.rb +66 -0
- data/spec/models/bookmark_data_spec.rb +48 -0
- data/spec/models/bookmark_group_result_spec.rb +42 -0
- data/spec/models/chat_message_proxy_spec.rb +42 -0
- data/spec/models/chunk_filter_spec.rb +48 -0
- data/spec/models/chunk_group_and_file_spec.rb +78 -0
- data/spec/models/chunk_group_spec.rb +72 -0
- data/spec/models/chunk_metadata_spec.rb +108 -0
- data/spec/models/chunk_metadata_with_file_data_spec.rb +114 -0
- data/spec/models/client_dataset_configuration_spec.rb +96 -0
- data/spec/models/create_chunk_data_spec.rb +108 -0
- data/spec/models/create_chunk_group_data_spec.rb +48 -0
- data/spec/models/create_dataset_request_spec.rb +54 -0
- data/spec/models/create_message_data_spec.rb +66 -0
- data/spec/models/create_organization_data_spec.rb +36 -0
- data/spec/models/create_topic_data_spec.rb +48 -0
- data/spec/models/dataset_and_usage_spec.rb +42 -0
- data/spec/models/dataset_dto_spec.rb +66 -0
- data/spec/models/dataset_spec.rb +72 -0
- data/spec/models/dataset_usage_count_spec.rb +48 -0
- data/spec/models/delete_dataset_request_spec.rb +36 -0
- data/spec/models/delete_topic_data_spec.rb +36 -0
- data/spec/models/delete_user_api_key_request_spec.rb +36 -0
- data/spec/models/edit_message_data_spec.rb +72 -0
- data/spec/models/error_response_body_spec.rb +36 -0
- data/spec/models/event_return_spec.rb +42 -0
- data/spec/models/event_spec.rb +66 -0
- data/spec/models/field_condition_spec.rb +48 -0
- data/spec/models/file_dto_spec.rb +78 -0
- data/spec/models/file_spec.rb +90 -0
- data/spec/models/generate_chunks_request_spec.rb +60 -0
- data/spec/models/get_groups_for_chunks_data_spec.rb +36 -0
- data/spec/models/group_data_spec.rb +42 -0
- data/spec/models/group_score_chunk_dto_spec.rb +42 -0
- data/spec/models/invitation_data_spec.rb +60 -0
- data/spec/models/match_condition_spec.rb +32 -0
- data/spec/models/message_spec.rb +96 -0
- data/spec/models/organization_spec.rb +60 -0
- data/spec/models/organization_usage_count_spec.rb +66 -0
- data/spec/models/range_spec.rb +54 -0
- data/spec/models/reccomend_group_chunks_request_spec.rb +72 -0
- data/spec/models/recommend_chunks_request_spec.rb +66 -0
- data/spec/models/regenerate_message_data_spec.rb +60 -0
- data/spec/models/return_queued_chunk_spec.rb +42 -0
- data/spec/models/score_chunk_dto_spec.rb +42 -0
- data/spec/models/search_chunk_data_spec.rb +96 -0
- data/spec/models/search_chunk_query_response_body_spec.rb +42 -0
- data/spec/models/search_groups_result_spec.rb +48 -0
- data/spec/models/search_over_groups_data_spec.rb +90 -0
- data/spec/models/search_over_groups_response_body_spec.rb +42 -0
- data/spec/models/search_within_group_data_spec.rb +102 -0
- data/spec/models/set_user_api_key_request_spec.rb +42 -0
- data/spec/models/set_user_api_key_response_spec.rb +36 -0
- data/spec/models/slim_group_spec.rb +54 -0
- data/spec/models/slim_user_spec.rb +78 -0
- data/spec/models/stripe_plan_spec.rb +96 -0
- data/spec/models/stripe_subscription_spec.rb +72 -0
- data/spec/models/suggested_queries_request_spec.rb +36 -0
- data/spec/models/suggested_queries_response_spec.rb +36 -0
- data/spec/models/topic_spec.rb +72 -0
- data/spec/models/update_chunk_by_tracking_id_data_spec.rb +66 -0
- data/spec/models/update_chunk_data_spec.rb +72 -0
- data/spec/models/update_chunk_group_data_spec.rb +48 -0
- data/spec/models/update_dataset_request_spec.rb +54 -0
- data/spec/models/update_group_by_tracking_id_data_spec.rb +48 -0
- data/spec/models/update_organization_data_spec.rb +42 -0
- data/spec/models/update_topic_data_spec.rb +42 -0
- data/spec/models/update_user_data_spec.rb +72 -0
- data/spec/models/upload_file_data_spec.rb +84 -0
- data/spec/models/upload_file_result_spec.rb +36 -0
- data/spec/models/user_organization_spec.rb +66 -0
- data/spec/spec_helper.rb +111 -0
- data/trieve_ruby_client.gemspec +39 -0
- metadata +439 -0
@@ -0,0 +1,1230 @@
|
|
1
|
+
=begin
|
2
|
+
#Trieve API
|
3
|
+
|
4
|
+
#Trieve OpenAPI Specification. This document describes all of the operations available through the Trieve API.
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 0.3.4
|
7
|
+
Contact: developers@trieve.ai
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
Generator version: 7.4.0
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'cgi'
|
14
|
+
|
15
|
+
module TrieveRubyClient
|
16
|
+
class ChunkGroupApi
|
17
|
+
attr_accessor :api_client
|
18
|
+
|
19
|
+
def initialize(api_client = ApiClient.default)
|
20
|
+
@api_client = api_client
|
21
|
+
end
|
22
|
+
# add_chunk_to_group
|
23
|
+
# add_chunk_to_group Route to add a chunk to a group
|
24
|
+
# @param tr_dataset [String] The dataset id to use for the request
|
25
|
+
# @param group_id [String] Id of the group to add the chunk to as a bookmark
|
26
|
+
# @param add_chunk_to_group_data [AddChunkToGroupData] JSON request payload to add a chunk to a group (bookmark it)
|
27
|
+
# @param [Hash] opts the optional parameters
|
28
|
+
# @return [nil]
|
29
|
+
def add_chunk_to_group(tr_dataset, group_id, add_chunk_to_group_data, opts = {})
|
30
|
+
add_chunk_to_group_with_http_info(tr_dataset, group_id, add_chunk_to_group_data, opts)
|
31
|
+
nil
|
32
|
+
end
|
33
|
+
|
34
|
+
# add_chunk_to_group
|
35
|
+
# add_chunk_to_group Route to add a chunk to a group
|
36
|
+
# @param tr_dataset [String] The dataset id to use for the request
|
37
|
+
# @param group_id [String] Id of the group to add the chunk to as a bookmark
|
38
|
+
# @param add_chunk_to_group_data [AddChunkToGroupData] JSON request payload to add a chunk to a group (bookmark it)
|
39
|
+
# @param [Hash] opts the optional parameters
|
40
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
41
|
+
def add_chunk_to_group_with_http_info(tr_dataset, group_id, add_chunk_to_group_data, opts = {})
|
42
|
+
if @api_client.config.debugging
|
43
|
+
@api_client.config.logger.debug 'Calling API: ChunkGroupApi.add_chunk_to_group ...'
|
44
|
+
end
|
45
|
+
# verify the required parameter 'tr_dataset' is set
|
46
|
+
if @api_client.config.client_side_validation && tr_dataset.nil?
|
47
|
+
fail ArgumentError, "Missing the required parameter 'tr_dataset' when calling ChunkGroupApi.add_chunk_to_group"
|
48
|
+
end
|
49
|
+
# verify the required parameter 'group_id' is set
|
50
|
+
if @api_client.config.client_side_validation && group_id.nil?
|
51
|
+
fail ArgumentError, "Missing the required parameter 'group_id' when calling ChunkGroupApi.add_chunk_to_group"
|
52
|
+
end
|
53
|
+
# verify the required parameter 'add_chunk_to_group_data' is set
|
54
|
+
if @api_client.config.client_side_validation && add_chunk_to_group_data.nil?
|
55
|
+
fail ArgumentError, "Missing the required parameter 'add_chunk_to_group_data' when calling ChunkGroupApi.add_chunk_to_group"
|
56
|
+
end
|
57
|
+
# resource path
|
58
|
+
local_var_path = '/api/chunk_group/chunk/{group_id}'.sub('{' + 'group_id' + '}', CGI.escape(group_id.to_s))
|
59
|
+
|
60
|
+
# query parameters
|
61
|
+
query_params = opts[:query_params] || {}
|
62
|
+
|
63
|
+
# header parameters
|
64
|
+
header_params = opts[:header_params] || {}
|
65
|
+
# HTTP header 'Accept' (if needed)
|
66
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
67
|
+
# HTTP header 'Content-Type'
|
68
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
69
|
+
if !content_type.nil?
|
70
|
+
header_params['Content-Type'] = content_type
|
71
|
+
end
|
72
|
+
header_params[:'TR-Dataset'] = tr_dataset
|
73
|
+
|
74
|
+
# form parameters
|
75
|
+
form_params = opts[:form_params] || {}
|
76
|
+
|
77
|
+
# http body (model)
|
78
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(add_chunk_to_group_data)
|
79
|
+
|
80
|
+
# return_type
|
81
|
+
return_type = opts[:debug_return_type]
|
82
|
+
|
83
|
+
# auth_names
|
84
|
+
auth_names = opts[:debug_auth_names] || ['Cookie', 'ApiKey']
|
85
|
+
|
86
|
+
new_options = opts.merge(
|
87
|
+
:operation => :"ChunkGroupApi.add_chunk_to_group",
|
88
|
+
:header_params => header_params,
|
89
|
+
:query_params => query_params,
|
90
|
+
:form_params => form_params,
|
91
|
+
:body => post_body,
|
92
|
+
:auth_names => auth_names,
|
93
|
+
:return_type => return_type
|
94
|
+
)
|
95
|
+
|
96
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
97
|
+
if @api_client.config.debugging
|
98
|
+
@api_client.config.logger.debug "API called: ChunkGroupApi#add_chunk_to_group\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
99
|
+
end
|
100
|
+
return data, status_code, headers
|
101
|
+
end
|
102
|
+
|
103
|
+
# add_chunk_to_group_by_tracking_id
|
104
|
+
# add_chunk_to_group_by_tracking_id Route to add a chunk to a group by tracking id. Think of a bookmark as a chunk which is a member of a group.
|
105
|
+
# @param tr_dataset [String] The dataset id to use for the request
|
106
|
+
# @param tracking_id [String] Id of the group to add the chunk to as a bookmark
|
107
|
+
# @param add_chunk_to_group_data [AddChunkToGroupData] JSON request payload to add a chunk to a group (bookmark it)
|
108
|
+
# @param [Hash] opts the optional parameters
|
109
|
+
# @return [nil]
|
110
|
+
def add_chunk_to_group_by_tracking_id(tr_dataset, tracking_id, add_chunk_to_group_data, opts = {})
|
111
|
+
add_chunk_to_group_by_tracking_id_with_http_info(tr_dataset, tracking_id, add_chunk_to_group_data, opts)
|
112
|
+
nil
|
113
|
+
end
|
114
|
+
|
115
|
+
# add_chunk_to_group_by_tracking_id
|
116
|
+
# add_chunk_to_group_by_tracking_id Route to add a chunk to a group by tracking id. Think of a bookmark as a chunk which is a member of a group.
|
117
|
+
# @param tr_dataset [String] The dataset id to use for the request
|
118
|
+
# @param tracking_id [String] Id of the group to add the chunk to as a bookmark
|
119
|
+
# @param add_chunk_to_group_data [AddChunkToGroupData] JSON request payload to add a chunk to a group (bookmark it)
|
120
|
+
# @param [Hash] opts the optional parameters
|
121
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
122
|
+
def add_chunk_to_group_by_tracking_id_with_http_info(tr_dataset, tracking_id, add_chunk_to_group_data, opts = {})
|
123
|
+
if @api_client.config.debugging
|
124
|
+
@api_client.config.logger.debug 'Calling API: ChunkGroupApi.add_chunk_to_group_by_tracking_id ...'
|
125
|
+
end
|
126
|
+
# verify the required parameter 'tr_dataset' is set
|
127
|
+
if @api_client.config.client_side_validation && tr_dataset.nil?
|
128
|
+
fail ArgumentError, "Missing the required parameter 'tr_dataset' when calling ChunkGroupApi.add_chunk_to_group_by_tracking_id"
|
129
|
+
end
|
130
|
+
# verify the required parameter 'tracking_id' is set
|
131
|
+
if @api_client.config.client_side_validation && tracking_id.nil?
|
132
|
+
fail ArgumentError, "Missing the required parameter 'tracking_id' when calling ChunkGroupApi.add_chunk_to_group_by_tracking_id"
|
133
|
+
end
|
134
|
+
# verify the required parameter 'add_chunk_to_group_data' is set
|
135
|
+
if @api_client.config.client_side_validation && add_chunk_to_group_data.nil?
|
136
|
+
fail ArgumentError, "Missing the required parameter 'add_chunk_to_group_data' when calling ChunkGroupApi.add_chunk_to_group_by_tracking_id"
|
137
|
+
end
|
138
|
+
# resource path
|
139
|
+
local_var_path = '/api/chunk_group/tracking_id/{tracking_id}'.sub('{' + 'tracking_id' + '}', CGI.escape(tracking_id.to_s))
|
140
|
+
|
141
|
+
# query parameters
|
142
|
+
query_params = opts[:query_params] || {}
|
143
|
+
|
144
|
+
# header parameters
|
145
|
+
header_params = opts[:header_params] || {}
|
146
|
+
# HTTP header 'Accept' (if needed)
|
147
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
148
|
+
# HTTP header 'Content-Type'
|
149
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
150
|
+
if !content_type.nil?
|
151
|
+
header_params['Content-Type'] = content_type
|
152
|
+
end
|
153
|
+
header_params[:'TR-Dataset'] = tr_dataset
|
154
|
+
|
155
|
+
# form parameters
|
156
|
+
form_params = opts[:form_params] || {}
|
157
|
+
|
158
|
+
# http body (model)
|
159
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(add_chunk_to_group_data)
|
160
|
+
|
161
|
+
# return_type
|
162
|
+
return_type = opts[:debug_return_type]
|
163
|
+
|
164
|
+
# auth_names
|
165
|
+
auth_names = opts[:debug_auth_names] || ['Cookie', 'ApiKey']
|
166
|
+
|
167
|
+
new_options = opts.merge(
|
168
|
+
:operation => :"ChunkGroupApi.add_chunk_to_group_by_tracking_id",
|
169
|
+
:header_params => header_params,
|
170
|
+
:query_params => query_params,
|
171
|
+
:form_params => form_params,
|
172
|
+
:body => post_body,
|
173
|
+
:auth_names => auth_names,
|
174
|
+
:return_type => return_type
|
175
|
+
)
|
176
|
+
|
177
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
178
|
+
if @api_client.config.debugging
|
179
|
+
@api_client.config.logger.debug "API called: ChunkGroupApi#add_chunk_to_group_by_tracking_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
180
|
+
end
|
181
|
+
return data, status_code, headers
|
182
|
+
end
|
183
|
+
|
184
|
+
# create_chunk_group
|
185
|
+
# create_chunk_group Create a new chunk_group.
|
186
|
+
# @param tr_dataset [String] The dataset id to use for the request
|
187
|
+
# @param create_chunk_group_data [CreateChunkGroupData] JSON request payload to cretea a chunkGroup
|
188
|
+
# @param [Hash] opts the optional parameters
|
189
|
+
# @return [ChunkGroup]
|
190
|
+
def create_chunk_group(tr_dataset, create_chunk_group_data, opts = {})
|
191
|
+
data, _status_code, _headers = create_chunk_group_with_http_info(tr_dataset, create_chunk_group_data, opts)
|
192
|
+
data
|
193
|
+
end
|
194
|
+
|
195
|
+
# create_chunk_group
|
196
|
+
# create_chunk_group Create a new chunk_group.
|
197
|
+
# @param tr_dataset [String] The dataset id to use for the request
|
198
|
+
# @param create_chunk_group_data [CreateChunkGroupData] JSON request payload to cretea a chunkGroup
|
199
|
+
# @param [Hash] opts the optional parameters
|
200
|
+
# @return [Array<(ChunkGroup, Integer, Hash)>] ChunkGroup data, response status code and response headers
|
201
|
+
def create_chunk_group_with_http_info(tr_dataset, create_chunk_group_data, opts = {})
|
202
|
+
if @api_client.config.debugging
|
203
|
+
@api_client.config.logger.debug 'Calling API: ChunkGroupApi.create_chunk_group ...'
|
204
|
+
end
|
205
|
+
# verify the required parameter 'tr_dataset' is set
|
206
|
+
if @api_client.config.client_side_validation && tr_dataset.nil?
|
207
|
+
fail ArgumentError, "Missing the required parameter 'tr_dataset' when calling ChunkGroupApi.create_chunk_group"
|
208
|
+
end
|
209
|
+
# verify the required parameter 'create_chunk_group_data' is set
|
210
|
+
if @api_client.config.client_side_validation && create_chunk_group_data.nil?
|
211
|
+
fail ArgumentError, "Missing the required parameter 'create_chunk_group_data' when calling ChunkGroupApi.create_chunk_group"
|
212
|
+
end
|
213
|
+
# resource path
|
214
|
+
local_var_path = '/api/chunk_group'
|
215
|
+
|
216
|
+
# query parameters
|
217
|
+
query_params = opts[:query_params] || {}
|
218
|
+
|
219
|
+
# header parameters
|
220
|
+
header_params = opts[:header_params] || {}
|
221
|
+
# HTTP header 'Accept' (if needed)
|
222
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
223
|
+
# HTTP header 'Content-Type'
|
224
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
225
|
+
if !content_type.nil?
|
226
|
+
header_params['Content-Type'] = content_type
|
227
|
+
end
|
228
|
+
header_params[:'TR-Dataset'] = tr_dataset
|
229
|
+
|
230
|
+
# form parameters
|
231
|
+
form_params = opts[:form_params] || {}
|
232
|
+
|
233
|
+
# http body (model)
|
234
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(create_chunk_group_data)
|
235
|
+
|
236
|
+
# return_type
|
237
|
+
return_type = opts[:debug_return_type] || 'ChunkGroup'
|
238
|
+
|
239
|
+
# auth_names
|
240
|
+
auth_names = opts[:debug_auth_names] || ['Cookie', 'ApiKey']
|
241
|
+
|
242
|
+
new_options = opts.merge(
|
243
|
+
:operation => :"ChunkGroupApi.create_chunk_group",
|
244
|
+
:header_params => header_params,
|
245
|
+
:query_params => query_params,
|
246
|
+
:form_params => form_params,
|
247
|
+
:body => post_body,
|
248
|
+
:auth_names => auth_names,
|
249
|
+
:return_type => return_type
|
250
|
+
)
|
251
|
+
|
252
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
253
|
+
if @api_client.config.debugging
|
254
|
+
@api_client.config.logger.debug "API called: ChunkGroupApi#create_chunk_group\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
255
|
+
end
|
256
|
+
return data, status_code, headers
|
257
|
+
end
|
258
|
+
|
259
|
+
# delete_chunk_group
|
260
|
+
# delete_chunk_group This will delete a chunk_group. This will not delete the chunks that are in the group. We will soon support deleting a chunk_group along with its member chunks.
|
261
|
+
# @param tr_dataset [String] The dataset id to use for the request
|
262
|
+
# @param group_id [Uuid] Id of the group you want to fetch. This can be either the group_id or the tracking_id. If both are provided, the group_id will be used.
|
263
|
+
# @param tracking_or_chunk [String] The type of id you are using to search for the group. This can be either 'chunk' or 'tracking_id'
|
264
|
+
# @param delete_chunks [Boolean] Delete the chunks within the group
|
265
|
+
# @param [Hash] opts the optional parameters
|
266
|
+
# @return [nil]
|
267
|
+
def delete_chunk_group(tr_dataset, group_id, tracking_or_chunk, delete_chunks, opts = {})
|
268
|
+
delete_chunk_group_with_http_info(tr_dataset, group_id, tracking_or_chunk, delete_chunks, opts)
|
269
|
+
nil
|
270
|
+
end
|
271
|
+
|
272
|
+
# delete_chunk_group
|
273
|
+
# delete_chunk_group This will delete a chunk_group. This will not delete the chunks that are in the group. We will soon support deleting a chunk_group along with its member chunks.
|
274
|
+
# @param tr_dataset [String] The dataset id to use for the request
|
275
|
+
# @param group_id [Uuid] Id of the group you want to fetch. This can be either the group_id or the tracking_id. If both are provided, the group_id will be used.
|
276
|
+
# @param tracking_or_chunk [String] The type of id you are using to search for the group. This can be either 'chunk' or 'tracking_id'
|
277
|
+
# @param delete_chunks [Boolean] Delete the chunks within the group
|
278
|
+
# @param [Hash] opts the optional parameters
|
279
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
280
|
+
def delete_chunk_group_with_http_info(tr_dataset, group_id, tracking_or_chunk, delete_chunks, opts = {})
|
281
|
+
if @api_client.config.debugging
|
282
|
+
@api_client.config.logger.debug 'Calling API: ChunkGroupApi.delete_chunk_group ...'
|
283
|
+
end
|
284
|
+
# verify the required parameter 'tr_dataset' is set
|
285
|
+
if @api_client.config.client_side_validation && tr_dataset.nil?
|
286
|
+
fail ArgumentError, "Missing the required parameter 'tr_dataset' when calling ChunkGroupApi.delete_chunk_group"
|
287
|
+
end
|
288
|
+
# verify the required parameter 'tracking_or_chunk' is set
|
289
|
+
if @api_client.config.client_side_validation && tracking_or_chunk.nil?
|
290
|
+
fail ArgumentError, "Missing the required parameter 'tracking_or_chunk' when calling ChunkGroupApi.delete_chunk_group"
|
291
|
+
end
|
292
|
+
# verify the required parameter 'delete_chunks' is set
|
293
|
+
if @api_client.config.client_side_validation && delete_chunks.nil?
|
294
|
+
fail ArgumentError, "Missing the required parameter 'delete_chunks' when calling ChunkGroupApi.delete_chunk_group"
|
295
|
+
end
|
296
|
+
# resource path
|
297
|
+
local_var_path = '/api/{tracking_or_chunk}/{group_id}'.sub('{' + 'group_id' + '}', CGI.escape(group_id.to_s)).sub('{' + 'tracking_or_chunk' + '}', CGI.escape(tracking_or_chunk.to_s))
|
298
|
+
|
299
|
+
# query parameters
|
300
|
+
query_params = opts[:query_params] || {}
|
301
|
+
query_params[:'delete_chunks'] = delete_chunks
|
302
|
+
|
303
|
+
# header parameters
|
304
|
+
header_params = opts[:header_params] || {}
|
305
|
+
# HTTP header 'Accept' (if needed)
|
306
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
307
|
+
header_params[:'TR-Dataset'] = tr_dataset
|
308
|
+
|
309
|
+
# form parameters
|
310
|
+
form_params = opts[:form_params] || {}
|
311
|
+
|
312
|
+
# http body (model)
|
313
|
+
post_body = opts[:debug_body]
|
314
|
+
|
315
|
+
# return_type
|
316
|
+
return_type = opts[:debug_return_type]
|
317
|
+
|
318
|
+
# auth_names
|
319
|
+
auth_names = opts[:debug_auth_names] || ['Cookie', 'ApiKey']
|
320
|
+
|
321
|
+
new_options = opts.merge(
|
322
|
+
:operation => :"ChunkGroupApi.delete_chunk_group",
|
323
|
+
:header_params => header_params,
|
324
|
+
:query_params => query_params,
|
325
|
+
:form_params => form_params,
|
326
|
+
:body => post_body,
|
327
|
+
:auth_names => auth_names,
|
328
|
+
:return_type => return_type
|
329
|
+
)
|
330
|
+
|
331
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
332
|
+
if @api_client.config.debugging
|
333
|
+
@api_client.config.logger.debug "API called: ChunkGroupApi#delete_chunk_group\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
334
|
+
end
|
335
|
+
return data, status_code, headers
|
336
|
+
end
|
337
|
+
|
338
|
+
# @param tr_dataset [String] The dataset id to use for the request
|
339
|
+
# @param tracking_id [String] Tracking id of the chunk_group to delete
|
340
|
+
# @param [Hash] opts the optional parameters
|
341
|
+
# @return [nil]
|
342
|
+
def delete_group_by_tracking_id(tr_dataset, tracking_id, opts = {})
|
343
|
+
delete_group_by_tracking_id_with_http_info(tr_dataset, tracking_id, opts)
|
344
|
+
nil
|
345
|
+
end
|
346
|
+
|
347
|
+
# @param tr_dataset [String] The dataset id to use for the request
|
348
|
+
# @param tracking_id [String] Tracking id of the chunk_group to delete
|
349
|
+
# @param [Hash] opts the optional parameters
|
350
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
351
|
+
def delete_group_by_tracking_id_with_http_info(tr_dataset, tracking_id, opts = {})
|
352
|
+
if @api_client.config.debugging
|
353
|
+
@api_client.config.logger.debug 'Calling API: ChunkGroupApi.delete_group_by_tracking_id ...'
|
354
|
+
end
|
355
|
+
# verify the required parameter 'tr_dataset' is set
|
356
|
+
if @api_client.config.client_side_validation && tr_dataset.nil?
|
357
|
+
fail ArgumentError, "Missing the required parameter 'tr_dataset' when calling ChunkGroupApi.delete_group_by_tracking_id"
|
358
|
+
end
|
359
|
+
# verify the required parameter 'tracking_id' is set
|
360
|
+
if @api_client.config.client_side_validation && tracking_id.nil?
|
361
|
+
fail ArgumentError, "Missing the required parameter 'tracking_id' when calling ChunkGroupApi.delete_group_by_tracking_id"
|
362
|
+
end
|
363
|
+
# resource path
|
364
|
+
local_var_path = '/api/chunk_group/tracking_id/{tracking_id}'.sub('{' + 'tracking_id' + '}', CGI.escape(tracking_id.to_s))
|
365
|
+
|
366
|
+
# query parameters
|
367
|
+
query_params = opts[:query_params] || {}
|
368
|
+
|
369
|
+
# header parameters
|
370
|
+
header_params = opts[:header_params] || {}
|
371
|
+
# HTTP header 'Accept' (if needed)
|
372
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
373
|
+
header_params[:'TR-Dataset'] = tr_dataset
|
374
|
+
|
375
|
+
# form parameters
|
376
|
+
form_params = opts[:form_params] || {}
|
377
|
+
|
378
|
+
# http body (model)
|
379
|
+
post_body = opts[:debug_body]
|
380
|
+
|
381
|
+
# return_type
|
382
|
+
return_type = opts[:debug_return_type]
|
383
|
+
|
384
|
+
# auth_names
|
385
|
+
auth_names = opts[:debug_auth_names] || ['Cookie', 'ApiKey']
|
386
|
+
|
387
|
+
new_options = opts.merge(
|
388
|
+
:operation => :"ChunkGroupApi.delete_group_by_tracking_id",
|
389
|
+
:header_params => header_params,
|
390
|
+
:query_params => query_params,
|
391
|
+
:form_params => form_params,
|
392
|
+
:body => post_body,
|
393
|
+
:auth_names => auth_names,
|
394
|
+
:return_type => return_type
|
395
|
+
)
|
396
|
+
|
397
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
398
|
+
if @api_client.config.debugging
|
399
|
+
@api_client.config.logger.debug "API called: ChunkGroupApi#delete_group_by_tracking_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
400
|
+
end
|
401
|
+
return data, status_code, headers
|
402
|
+
end
|
403
|
+
|
404
|
+
# get_chunks_in_group
|
405
|
+
# get_chunks_in_group Route to get all chunks for a group. The response is paginated, with each page containing 10 chunks. Support for custom page size is coming soon.
|
406
|
+
# @param tr_dataset [String] The dataset id to use for the request
|
407
|
+
# @param group_id [Uuid] Id of the group you want to fetch. This can be either the group_id or the tracking_id. If both are provided, the group_id will be used.
|
408
|
+
# @param tracking_or_chunk [String] The type of id you are using to search for the group. This can be either 'chunk' or 'tracking_id'
|
409
|
+
# @param page [Integer] The page of chunks to get from the group
|
410
|
+
# @param [Hash] opts the optional parameters
|
411
|
+
# @return [BookmarkData]
|
412
|
+
def get_chunks_in_group(tr_dataset, group_id, tracking_or_chunk, page, opts = {})
|
413
|
+
data, _status_code, _headers = get_chunks_in_group_with_http_info(tr_dataset, group_id, tracking_or_chunk, page, opts)
|
414
|
+
data
|
415
|
+
end
|
416
|
+
|
417
|
+
# get_chunks_in_group
|
418
|
+
# get_chunks_in_group Route to get all chunks for a group. The response is paginated, with each page containing 10 chunks. Support for custom page size is coming soon.
|
419
|
+
# @param tr_dataset [String] The dataset id to use for the request
|
420
|
+
# @param group_id [Uuid] Id of the group you want to fetch. This can be either the group_id or the tracking_id. If both are provided, the group_id will be used.
|
421
|
+
# @param tracking_or_chunk [String] The type of id you are using to search for the group. This can be either 'chunk' or 'tracking_id'
|
422
|
+
# @param page [Integer] The page of chunks to get from the group
|
423
|
+
# @param [Hash] opts the optional parameters
|
424
|
+
# @return [Array<(BookmarkData, Integer, Hash)>] BookmarkData data, response status code and response headers
|
425
|
+
def get_chunks_in_group_with_http_info(tr_dataset, group_id, tracking_or_chunk, page, opts = {})
|
426
|
+
if @api_client.config.debugging
|
427
|
+
@api_client.config.logger.debug 'Calling API: ChunkGroupApi.get_chunks_in_group ...'
|
428
|
+
end
|
429
|
+
# verify the required parameter 'tr_dataset' is set
|
430
|
+
if @api_client.config.client_side_validation && tr_dataset.nil?
|
431
|
+
fail ArgumentError, "Missing the required parameter 'tr_dataset' when calling ChunkGroupApi.get_chunks_in_group"
|
432
|
+
end
|
433
|
+
# verify the required parameter 'tracking_or_chunk' is set
|
434
|
+
if @api_client.config.client_side_validation && tracking_or_chunk.nil?
|
435
|
+
fail ArgumentError, "Missing the required parameter 'tracking_or_chunk' when calling ChunkGroupApi.get_chunks_in_group"
|
436
|
+
end
|
437
|
+
# verify the required parameter 'page' is set
|
438
|
+
if @api_client.config.client_side_validation && page.nil?
|
439
|
+
fail ArgumentError, "Missing the required parameter 'page' when calling ChunkGroupApi.get_chunks_in_group"
|
440
|
+
end
|
441
|
+
if @api_client.config.client_side_validation && page < 0
|
442
|
+
fail ArgumentError, 'invalid value for "page" when calling ChunkGroupApi.get_chunks_in_group, must be greater than or equal to 0.'
|
443
|
+
end
|
444
|
+
|
445
|
+
# resource path
|
446
|
+
local_var_path = '/api/chunk_group/{tracking_or_chunk}/{group_id}/{page}'.sub('{' + 'group_id' + '}', CGI.escape(group_id.to_s)).sub('{' + 'tracking_or_chunk' + '}', CGI.escape(tracking_or_chunk.to_s)).sub('{' + 'page' + '}', CGI.escape(page.to_s))
|
447
|
+
|
448
|
+
# query parameters
|
449
|
+
query_params = opts[:query_params] || {}
|
450
|
+
|
451
|
+
# header parameters
|
452
|
+
header_params = opts[:header_params] || {}
|
453
|
+
# HTTP header 'Accept' (if needed)
|
454
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
455
|
+
header_params[:'TR-Dataset'] = tr_dataset
|
456
|
+
|
457
|
+
# form parameters
|
458
|
+
form_params = opts[:form_params] || {}
|
459
|
+
|
460
|
+
# http body (model)
|
461
|
+
post_body = opts[:debug_body]
|
462
|
+
|
463
|
+
# return_type
|
464
|
+
return_type = opts[:debug_return_type] || 'BookmarkData'
|
465
|
+
|
466
|
+
# auth_names
|
467
|
+
auth_names = opts[:debug_auth_names] || ['Cookie', 'ApiKey']
|
468
|
+
|
469
|
+
new_options = opts.merge(
|
470
|
+
:operation => :"ChunkGroupApi.get_chunks_in_group",
|
471
|
+
:header_params => header_params,
|
472
|
+
:query_params => query_params,
|
473
|
+
:form_params => form_params,
|
474
|
+
:body => post_body,
|
475
|
+
:auth_names => auth_names,
|
476
|
+
:return_type => return_type
|
477
|
+
)
|
478
|
+
|
479
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
480
|
+
if @api_client.config.debugging
|
481
|
+
@api_client.config.logger.debug "API called: ChunkGroupApi#get_chunks_in_group\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
482
|
+
end
|
483
|
+
return data, status_code, headers
|
484
|
+
end
|
485
|
+
|
486
|
+
# get_chunks_in_group_by_tracking_id
|
487
|
+
# get_chunks_in_group_by_tracking_id Route to get all chunks for a group. The response is paginated, with each page containing 10 chunks. Support for custom page size is coming soon.
|
488
|
+
# @param tr_dataset [String] The dataset id to use for the request
|
489
|
+
# @param group_tracking_id [String] The id of the group to get the chunks from
|
490
|
+
# @param page [Integer] The page of chunks to get from the group
|
491
|
+
# @param [Hash] opts the optional parameters
|
492
|
+
# @return [BookmarkData]
|
493
|
+
def get_chunks_in_group_by_tracking_id(tr_dataset, group_tracking_id, page, opts = {})
|
494
|
+
data, _status_code, _headers = get_chunks_in_group_by_tracking_id_with_http_info(tr_dataset, group_tracking_id, page, opts)
|
495
|
+
data
|
496
|
+
end
|
497
|
+
|
498
|
+
# get_chunks_in_group_by_tracking_id
|
499
|
+
# get_chunks_in_group_by_tracking_id Route to get all chunks for a group. The response is paginated, with each page containing 10 chunks. Support for custom page size is coming soon.
|
500
|
+
# @param tr_dataset [String] The dataset id to use for the request
|
501
|
+
# @param group_tracking_id [String] The id of the group to get the chunks from
|
502
|
+
# @param page [Integer] The page of chunks to get from the group
|
503
|
+
# @param [Hash] opts the optional parameters
|
504
|
+
# @return [Array<(BookmarkData, Integer, Hash)>] BookmarkData data, response status code and response headers
|
505
|
+
def get_chunks_in_group_by_tracking_id_with_http_info(tr_dataset, group_tracking_id, page, opts = {})
|
506
|
+
if @api_client.config.debugging
|
507
|
+
@api_client.config.logger.debug 'Calling API: ChunkGroupApi.get_chunks_in_group_by_tracking_id ...'
|
508
|
+
end
|
509
|
+
# verify the required parameter 'tr_dataset' is set
|
510
|
+
if @api_client.config.client_side_validation && tr_dataset.nil?
|
511
|
+
fail ArgumentError, "Missing the required parameter 'tr_dataset' when calling ChunkGroupApi.get_chunks_in_group_by_tracking_id"
|
512
|
+
end
|
513
|
+
# verify the required parameter 'group_tracking_id' is set
|
514
|
+
if @api_client.config.client_side_validation && group_tracking_id.nil?
|
515
|
+
fail ArgumentError, "Missing the required parameter 'group_tracking_id' when calling ChunkGroupApi.get_chunks_in_group_by_tracking_id"
|
516
|
+
end
|
517
|
+
# verify the required parameter 'page' is set
|
518
|
+
if @api_client.config.client_side_validation && page.nil?
|
519
|
+
fail ArgumentError, "Missing the required parameter 'page' when calling ChunkGroupApi.get_chunks_in_group_by_tracking_id"
|
520
|
+
end
|
521
|
+
if @api_client.config.client_side_validation && page < 0
|
522
|
+
fail ArgumentError, 'invalid value for "page" when calling ChunkGroupApi.get_chunks_in_group_by_tracking_id, must be greater than or equal to 0.'
|
523
|
+
end
|
524
|
+
|
525
|
+
# resource path
|
526
|
+
local_var_path = '/api/chunk_group/tracking_id/{group_tracking_id}/{page}'.sub('{' + 'group_tracking_id' + '}', CGI.escape(group_tracking_id.to_s)).sub('{' + 'page' + '}', CGI.escape(page.to_s))
|
527
|
+
|
528
|
+
# query parameters
|
529
|
+
query_params = opts[:query_params] || {}
|
530
|
+
|
531
|
+
# header parameters
|
532
|
+
header_params = opts[:header_params] || {}
|
533
|
+
# HTTP header 'Accept' (if needed)
|
534
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
535
|
+
header_params[:'TR-Dataset'] = tr_dataset
|
536
|
+
|
537
|
+
# form parameters
|
538
|
+
form_params = opts[:form_params] || {}
|
539
|
+
|
540
|
+
# http body (model)
|
541
|
+
post_body = opts[:debug_body]
|
542
|
+
|
543
|
+
# return_type
|
544
|
+
return_type = opts[:debug_return_type] || 'BookmarkData'
|
545
|
+
|
546
|
+
# auth_names
|
547
|
+
auth_names = opts[:debug_auth_names] || ['Cookie', 'ApiKey']
|
548
|
+
|
549
|
+
new_options = opts.merge(
|
550
|
+
:operation => :"ChunkGroupApi.get_chunks_in_group_by_tracking_id",
|
551
|
+
:header_params => header_params,
|
552
|
+
:query_params => query_params,
|
553
|
+
:form_params => form_params,
|
554
|
+
:body => post_body,
|
555
|
+
:auth_names => auth_names,
|
556
|
+
:return_type => return_type
|
557
|
+
)
|
558
|
+
|
559
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
560
|
+
if @api_client.config.debugging
|
561
|
+
@api_client.config.logger.debug "API called: ChunkGroupApi#get_chunks_in_group_by_tracking_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
562
|
+
end
|
563
|
+
return data, status_code, headers
|
564
|
+
end
|
565
|
+
|
566
|
+
# get_group_by_tracking_id
|
567
|
+
# get_group_by_tracking_id
|
568
|
+
# @param tr_dataset [String] The dataset id to use for the request
|
569
|
+
# @param tracking_id [String] The tracking id of the group to fetch.
|
570
|
+
# @param [Hash] opts the optional parameters
|
571
|
+
# @return [ChunkGroup]
|
572
|
+
def get_group_by_tracking_id(tr_dataset, tracking_id, opts = {})
|
573
|
+
data, _status_code, _headers = get_group_by_tracking_id_with_http_info(tr_dataset, tracking_id, opts)
|
574
|
+
data
|
575
|
+
end
|
576
|
+
|
577
|
+
# get_group_by_tracking_id
|
578
|
+
# get_group_by_tracking_id
|
579
|
+
# @param tr_dataset [String] The dataset id to use for the request
|
580
|
+
# @param tracking_id [String] The tracking id of the group to fetch.
|
581
|
+
# @param [Hash] opts the optional parameters
|
582
|
+
# @return [Array<(ChunkGroup, Integer, Hash)>] ChunkGroup data, response status code and response headers
|
583
|
+
def get_group_by_tracking_id_with_http_info(tr_dataset, tracking_id, opts = {})
|
584
|
+
if @api_client.config.debugging
|
585
|
+
@api_client.config.logger.debug 'Calling API: ChunkGroupApi.get_group_by_tracking_id ...'
|
586
|
+
end
|
587
|
+
# verify the required parameter 'tr_dataset' is set
|
588
|
+
if @api_client.config.client_side_validation && tr_dataset.nil?
|
589
|
+
fail ArgumentError, "Missing the required parameter 'tr_dataset' when calling ChunkGroupApi.get_group_by_tracking_id"
|
590
|
+
end
|
591
|
+
# verify the required parameter 'tracking_id' is set
|
592
|
+
if @api_client.config.client_side_validation && tracking_id.nil?
|
593
|
+
fail ArgumentError, "Missing the required parameter 'tracking_id' when calling ChunkGroupApi.get_group_by_tracking_id"
|
594
|
+
end
|
595
|
+
# resource path
|
596
|
+
local_var_path = '/api/chunk_group/tracking_id/{tracking_id}'.sub('{' + 'tracking_id' + '}', CGI.escape(tracking_id.to_s))
|
597
|
+
|
598
|
+
# query parameters
|
599
|
+
query_params = opts[:query_params] || {}
|
600
|
+
|
601
|
+
# header parameters
|
602
|
+
header_params = opts[:header_params] || {}
|
603
|
+
# HTTP header 'Accept' (if needed)
|
604
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
605
|
+
header_params[:'TR-Dataset'] = tr_dataset
|
606
|
+
|
607
|
+
# form parameters
|
608
|
+
form_params = opts[:form_params] || {}
|
609
|
+
|
610
|
+
# http body (model)
|
611
|
+
post_body = opts[:debug_body]
|
612
|
+
|
613
|
+
# return_type
|
614
|
+
return_type = opts[:debug_return_type] || 'ChunkGroup'
|
615
|
+
|
616
|
+
# auth_names
|
617
|
+
auth_names = opts[:debug_auth_names] || ['Cookie', 'ApiKey']
|
618
|
+
|
619
|
+
new_options = opts.merge(
|
620
|
+
:operation => :"ChunkGroupApi.get_group_by_tracking_id",
|
621
|
+
:header_params => header_params,
|
622
|
+
:query_params => query_params,
|
623
|
+
:form_params => form_params,
|
624
|
+
:body => post_body,
|
625
|
+
:auth_names => auth_names,
|
626
|
+
:return_type => return_type
|
627
|
+
)
|
628
|
+
|
629
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
630
|
+
if @api_client.config.debugging
|
631
|
+
@api_client.config.logger.debug "API called: ChunkGroupApi#get_group_by_tracking_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
632
|
+
end
|
633
|
+
return data, status_code, headers
|
634
|
+
end
|
635
|
+
|
636
|
+
# @param tr_dataset [String] The dataset id to use for the request
|
637
|
+
# @param get_groups_for_chunks_data [GetGroupsForChunksData] JSON request payload to get the groups that a chunk is in
|
638
|
+
# @param [Hash] opts the optional parameters
|
639
|
+
# @return [Array<BookmarkGroupResult>]
|
640
|
+
def get_groups_chunk_is_in(tr_dataset, get_groups_for_chunks_data, opts = {})
|
641
|
+
data, _status_code, _headers = get_groups_chunk_is_in_with_http_info(tr_dataset, get_groups_for_chunks_data, opts)
|
642
|
+
data
|
643
|
+
end
|
644
|
+
|
645
|
+
# @param tr_dataset [String] The dataset id to use for the request
|
646
|
+
# @param get_groups_for_chunks_data [GetGroupsForChunksData] JSON request payload to get the groups that a chunk is in
|
647
|
+
# @param [Hash] opts the optional parameters
|
648
|
+
# @return [Array<(Array<BookmarkGroupResult>, Integer, Hash)>] Array<BookmarkGroupResult> data, response status code and response headers
|
649
|
+
def get_groups_chunk_is_in_with_http_info(tr_dataset, get_groups_for_chunks_data, opts = {})
|
650
|
+
if @api_client.config.debugging
|
651
|
+
@api_client.config.logger.debug 'Calling API: ChunkGroupApi.get_groups_chunk_is_in ...'
|
652
|
+
end
|
653
|
+
# verify the required parameter 'tr_dataset' is set
|
654
|
+
if @api_client.config.client_side_validation && tr_dataset.nil?
|
655
|
+
fail ArgumentError, "Missing the required parameter 'tr_dataset' when calling ChunkGroupApi.get_groups_chunk_is_in"
|
656
|
+
end
|
657
|
+
# verify the required parameter 'get_groups_for_chunks_data' is set
|
658
|
+
if @api_client.config.client_side_validation && get_groups_for_chunks_data.nil?
|
659
|
+
fail ArgumentError, "Missing the required parameter 'get_groups_for_chunks_data' when calling ChunkGroupApi.get_groups_chunk_is_in"
|
660
|
+
end
|
661
|
+
# resource path
|
662
|
+
local_var_path = '/api/chunk_group/chunks'
|
663
|
+
|
664
|
+
# query parameters
|
665
|
+
query_params = opts[:query_params] || {}
|
666
|
+
|
667
|
+
# header parameters
|
668
|
+
header_params = opts[:header_params] || {}
|
669
|
+
# HTTP header 'Accept' (if needed)
|
670
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
671
|
+
# HTTP header 'Content-Type'
|
672
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
673
|
+
if !content_type.nil?
|
674
|
+
header_params['Content-Type'] = content_type
|
675
|
+
end
|
676
|
+
header_params[:'TR-Dataset'] = tr_dataset
|
677
|
+
|
678
|
+
# form parameters
|
679
|
+
form_params = opts[:form_params] || {}
|
680
|
+
|
681
|
+
# http body (model)
|
682
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(get_groups_for_chunks_data)
|
683
|
+
|
684
|
+
# return_type
|
685
|
+
return_type = opts[:debug_return_type] || 'Array<BookmarkGroupResult>'
|
686
|
+
|
687
|
+
# auth_names
|
688
|
+
auth_names = opts[:debug_auth_names] || ['Cookie', 'ApiKey']
|
689
|
+
|
690
|
+
new_options = opts.merge(
|
691
|
+
:operation => :"ChunkGroupApi.get_groups_chunk_is_in",
|
692
|
+
:header_params => header_params,
|
693
|
+
:query_params => query_params,
|
694
|
+
:form_params => form_params,
|
695
|
+
:body => post_body,
|
696
|
+
:auth_names => auth_names,
|
697
|
+
:return_type => return_type
|
698
|
+
)
|
699
|
+
|
700
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
701
|
+
if @api_client.config.debugging
|
702
|
+
@api_client.config.logger.debug "API called: ChunkGroupApi#get_groups_chunk_is_in\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
703
|
+
end
|
704
|
+
return data, status_code, headers
|
705
|
+
end
|
706
|
+
|
707
|
+
# @param tr_dataset [String] The dataset id to use for the request
|
708
|
+
# @param reccomend_group_chunks_request [ReccomendGroupChunksRequest] JSON request payload to get recommendations of chunks similar to the chunks in the request
|
709
|
+
# @param [Hash] opts the optional parameters
|
710
|
+
# @return [Array<GroupScoreChunkDTO>]
|
711
|
+
def get_recommended_groups(tr_dataset, reccomend_group_chunks_request, opts = {})
|
712
|
+
data, _status_code, _headers = get_recommended_groups_with_http_info(tr_dataset, reccomend_group_chunks_request, opts)
|
713
|
+
data
|
714
|
+
end
|
715
|
+
|
716
|
+
# @param tr_dataset [String] The dataset id to use for the request
|
717
|
+
# @param reccomend_group_chunks_request [ReccomendGroupChunksRequest] JSON request payload to get recommendations of chunks similar to the chunks in the request
|
718
|
+
# @param [Hash] opts the optional parameters
|
719
|
+
# @return [Array<(Array<GroupScoreChunkDTO>, Integer, Hash)>] Array<GroupScoreChunkDTO> data, response status code and response headers
|
720
|
+
def get_recommended_groups_with_http_info(tr_dataset, reccomend_group_chunks_request, opts = {})
|
721
|
+
if @api_client.config.debugging
|
722
|
+
@api_client.config.logger.debug 'Calling API: ChunkGroupApi.get_recommended_groups ...'
|
723
|
+
end
|
724
|
+
# verify the required parameter 'tr_dataset' is set
|
725
|
+
if @api_client.config.client_side_validation && tr_dataset.nil?
|
726
|
+
fail ArgumentError, "Missing the required parameter 'tr_dataset' when calling ChunkGroupApi.get_recommended_groups"
|
727
|
+
end
|
728
|
+
# verify the required parameter 'reccomend_group_chunks_request' is set
|
729
|
+
if @api_client.config.client_side_validation && reccomend_group_chunks_request.nil?
|
730
|
+
fail ArgumentError, "Missing the required parameter 'reccomend_group_chunks_request' when calling ChunkGroupApi.get_recommended_groups"
|
731
|
+
end
|
732
|
+
# resource path
|
733
|
+
local_var_path = '/api/chunk_group/recommend'
|
734
|
+
|
735
|
+
# query parameters
|
736
|
+
query_params = opts[:query_params] || {}
|
737
|
+
|
738
|
+
# header parameters
|
739
|
+
header_params = opts[:header_params] || {}
|
740
|
+
# HTTP header 'Accept' (if needed)
|
741
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
742
|
+
# HTTP header 'Content-Type'
|
743
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
744
|
+
if !content_type.nil?
|
745
|
+
header_params['Content-Type'] = content_type
|
746
|
+
end
|
747
|
+
header_params[:'TR-Dataset'] = tr_dataset
|
748
|
+
|
749
|
+
# form parameters
|
750
|
+
form_params = opts[:form_params] || {}
|
751
|
+
|
752
|
+
# http body (model)
|
753
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(reccomend_group_chunks_request)
|
754
|
+
|
755
|
+
# return_type
|
756
|
+
return_type = opts[:debug_return_type] || 'Array<GroupScoreChunkDTO>'
|
757
|
+
|
758
|
+
# auth_names
|
759
|
+
auth_names = opts[:debug_auth_names] || ['Cookie', 'ApiKey']
|
760
|
+
|
761
|
+
new_options = opts.merge(
|
762
|
+
:operation => :"ChunkGroupApi.get_recommended_groups",
|
763
|
+
:header_params => header_params,
|
764
|
+
:query_params => query_params,
|
765
|
+
:form_params => form_params,
|
766
|
+
:body => post_body,
|
767
|
+
:auth_names => auth_names,
|
768
|
+
:return_type => return_type
|
769
|
+
)
|
770
|
+
|
771
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
772
|
+
if @api_client.config.debugging
|
773
|
+
@api_client.config.logger.debug "API called: ChunkGroupApi#get_recommended_groups\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
774
|
+
end
|
775
|
+
return data, status_code, headers
|
776
|
+
end
|
777
|
+
|
778
|
+
# get_dataset_groups
|
779
|
+
# get_dataset_groups Fetch the groups which belong to a dataset specified by its id.
|
780
|
+
# @param tr_dataset [String] The dataset id to use for the request
|
781
|
+
# @param dataset_id [String] The id of the dataset to fetch groups for.
|
782
|
+
# @param page [Integer] The page of groups to fetch. Each page contains 10 groups. Support for custom page size is coming soon.
|
783
|
+
# @param [Hash] opts the optional parameters
|
784
|
+
# @return [GroupData]
|
785
|
+
def get_specific_dataset_chunk_groups(tr_dataset, dataset_id, page, opts = {})
|
786
|
+
data, _status_code, _headers = get_specific_dataset_chunk_groups_with_http_info(tr_dataset, dataset_id, page, opts)
|
787
|
+
data
|
788
|
+
end
|
789
|
+
|
790
|
+
# get_dataset_groups
|
791
|
+
# get_dataset_groups Fetch the groups which belong to a dataset specified by its id.
|
792
|
+
# @param tr_dataset [String] The dataset id to use for the request
|
793
|
+
# @param dataset_id [String] The id of the dataset to fetch groups for.
|
794
|
+
# @param page [Integer] The page of groups to fetch. Each page contains 10 groups. Support for custom page size is coming soon.
|
795
|
+
# @param [Hash] opts the optional parameters
|
796
|
+
# @return [Array<(GroupData, Integer, Hash)>] GroupData data, response status code and response headers
|
797
|
+
def get_specific_dataset_chunk_groups_with_http_info(tr_dataset, dataset_id, page, opts = {})
|
798
|
+
if @api_client.config.debugging
|
799
|
+
@api_client.config.logger.debug 'Calling API: ChunkGroupApi.get_specific_dataset_chunk_groups ...'
|
800
|
+
end
|
801
|
+
# verify the required parameter 'tr_dataset' is set
|
802
|
+
if @api_client.config.client_side_validation && tr_dataset.nil?
|
803
|
+
fail ArgumentError, "Missing the required parameter 'tr_dataset' when calling ChunkGroupApi.get_specific_dataset_chunk_groups"
|
804
|
+
end
|
805
|
+
# verify the required parameter 'dataset_id' is set
|
806
|
+
if @api_client.config.client_side_validation && dataset_id.nil?
|
807
|
+
fail ArgumentError, "Missing the required parameter 'dataset_id' when calling ChunkGroupApi.get_specific_dataset_chunk_groups"
|
808
|
+
end
|
809
|
+
# verify the required parameter 'page' is set
|
810
|
+
if @api_client.config.client_side_validation && page.nil?
|
811
|
+
fail ArgumentError, "Missing the required parameter 'page' when calling ChunkGroupApi.get_specific_dataset_chunk_groups"
|
812
|
+
end
|
813
|
+
# resource path
|
814
|
+
local_var_path = '/api/dataset/groups/{dataset_id}/{page}'.sub('{' + 'dataset_id' + '}', CGI.escape(dataset_id.to_s)).sub('{' + 'page' + '}', CGI.escape(page.to_s))
|
815
|
+
|
816
|
+
# query parameters
|
817
|
+
query_params = opts[:query_params] || {}
|
818
|
+
|
819
|
+
# header parameters
|
820
|
+
header_params = opts[:header_params] || {}
|
821
|
+
# HTTP header 'Accept' (if needed)
|
822
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
823
|
+
header_params[:'TR-Dataset'] = tr_dataset
|
824
|
+
|
825
|
+
# form parameters
|
826
|
+
form_params = opts[:form_params] || {}
|
827
|
+
|
828
|
+
# http body (model)
|
829
|
+
post_body = opts[:debug_body]
|
830
|
+
|
831
|
+
# return_type
|
832
|
+
return_type = opts[:debug_return_type] || 'GroupData'
|
833
|
+
|
834
|
+
# auth_names
|
835
|
+
auth_names = opts[:debug_auth_names] || ['Cookie', 'ApiKey']
|
836
|
+
|
837
|
+
new_options = opts.merge(
|
838
|
+
:operation => :"ChunkGroupApi.get_specific_dataset_chunk_groups",
|
839
|
+
:header_params => header_params,
|
840
|
+
:query_params => query_params,
|
841
|
+
:form_params => form_params,
|
842
|
+
:body => post_body,
|
843
|
+
:auth_names => auth_names,
|
844
|
+
:return_type => return_type
|
845
|
+
)
|
846
|
+
|
847
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
848
|
+
if @api_client.config.debugging
|
849
|
+
@api_client.config.logger.debug "API called: ChunkGroupApi#get_specific_dataset_chunk_groups\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
850
|
+
end
|
851
|
+
return data, status_code, headers
|
852
|
+
end
|
853
|
+
|
854
|
+
# remove_chunk_from_group
|
855
|
+
# remove_chunk_from_group Route to remove a chunk from a group.
|
856
|
+
# @param tr_dataset [String] The dataset id to use for the request
|
857
|
+
# @param group_id [String] Id of the group to remove the bookmark'ed chunk from
|
858
|
+
# @param create_chunk_group_data [CreateChunkGroupData] JSON request payload to cretea a chunkGroup
|
859
|
+
# @param [Hash] opts the optional parameters
|
860
|
+
# @return [nil]
|
861
|
+
def remove_chunk_from_group(tr_dataset, group_id, create_chunk_group_data, opts = {})
|
862
|
+
remove_chunk_from_group_with_http_info(tr_dataset, group_id, create_chunk_group_data, opts)
|
863
|
+
nil
|
864
|
+
end
|
865
|
+
|
866
|
+
# remove_chunk_from_group
|
867
|
+
# remove_chunk_from_group Route to remove a chunk from a group.
|
868
|
+
# @param tr_dataset [String] The dataset id to use for the request
|
869
|
+
# @param group_id [String] Id of the group to remove the bookmark'ed chunk from
|
870
|
+
# @param create_chunk_group_data [CreateChunkGroupData] JSON request payload to cretea a chunkGroup
|
871
|
+
# @param [Hash] opts the optional parameters
|
872
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
873
|
+
def remove_chunk_from_group_with_http_info(tr_dataset, group_id, create_chunk_group_data, opts = {})
|
874
|
+
if @api_client.config.debugging
|
875
|
+
@api_client.config.logger.debug 'Calling API: ChunkGroupApi.remove_chunk_from_group ...'
|
876
|
+
end
|
877
|
+
# verify the required parameter 'tr_dataset' is set
|
878
|
+
if @api_client.config.client_side_validation && tr_dataset.nil?
|
879
|
+
fail ArgumentError, "Missing the required parameter 'tr_dataset' when calling ChunkGroupApi.remove_chunk_from_group"
|
880
|
+
end
|
881
|
+
# verify the required parameter 'group_id' is set
|
882
|
+
if @api_client.config.client_side_validation && group_id.nil?
|
883
|
+
fail ArgumentError, "Missing the required parameter 'group_id' when calling ChunkGroupApi.remove_chunk_from_group"
|
884
|
+
end
|
885
|
+
# verify the required parameter 'create_chunk_group_data' is set
|
886
|
+
if @api_client.config.client_side_validation && create_chunk_group_data.nil?
|
887
|
+
fail ArgumentError, "Missing the required parameter 'create_chunk_group_data' when calling ChunkGroupApi.remove_chunk_from_group"
|
888
|
+
end
|
889
|
+
# resource path
|
890
|
+
local_var_path = '/api/chunk_group/chunk/{group_id}'.sub('{' + 'group_id' + '}', CGI.escape(group_id.to_s))
|
891
|
+
|
892
|
+
# query parameters
|
893
|
+
query_params = opts[:query_params] || {}
|
894
|
+
|
895
|
+
# header parameters
|
896
|
+
header_params = opts[:header_params] || {}
|
897
|
+
# HTTP header 'Accept' (if needed)
|
898
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
899
|
+
# HTTP header 'Content-Type'
|
900
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
901
|
+
if !content_type.nil?
|
902
|
+
header_params['Content-Type'] = content_type
|
903
|
+
end
|
904
|
+
header_params[:'TR-Dataset'] = tr_dataset
|
905
|
+
|
906
|
+
# form parameters
|
907
|
+
form_params = opts[:form_params] || {}
|
908
|
+
|
909
|
+
# http body (model)
|
910
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(create_chunk_group_data)
|
911
|
+
|
912
|
+
# return_type
|
913
|
+
return_type = opts[:debug_return_type]
|
914
|
+
|
915
|
+
# auth_names
|
916
|
+
auth_names = opts[:debug_auth_names] || ['Cookie', 'ApiKey']
|
917
|
+
|
918
|
+
new_options = opts.merge(
|
919
|
+
:operation => :"ChunkGroupApi.remove_chunk_from_group",
|
920
|
+
:header_params => header_params,
|
921
|
+
:query_params => query_params,
|
922
|
+
:form_params => form_params,
|
923
|
+
:body => post_body,
|
924
|
+
:auth_names => auth_names,
|
925
|
+
:return_type => return_type
|
926
|
+
)
|
927
|
+
|
928
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
929
|
+
if @api_client.config.debugging
|
930
|
+
@api_client.config.logger.debug "API called: ChunkGroupApi#remove_chunk_from_group\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
931
|
+
end
|
932
|
+
return data, status_code, headers
|
933
|
+
end
|
934
|
+
|
935
|
+
# group_oriented_search
|
936
|
+
# group_oriented_search This route allows you to get groups as results instead of chunks. Each group returned will have the matching chunks sorted by similarity within the group. This is useful for when you want to get groups of chunks which are similar to the search query. If choosing hybrid search, the results will be re-ranked using BAAI/bge-reranker-large. Compatible with semantic, fulltext, or hybrid search modes.
|
937
|
+
# @param search_over_groups_data [SearchOverGroupsData] JSON request payload to semantically search over groups
|
938
|
+
# @param [Hash] opts the optional parameters
|
939
|
+
# @return [SearchOverGroupsResponseBody]
|
940
|
+
def search_over_groups(search_over_groups_data, opts = {})
|
941
|
+
data, _status_code, _headers = search_over_groups_with_http_info(search_over_groups_data, opts)
|
942
|
+
data
|
943
|
+
end
|
944
|
+
|
945
|
+
# group_oriented_search
|
946
|
+
# group_oriented_search This route allows you to get groups as results instead of chunks. Each group returned will have the matching chunks sorted by similarity within the group. This is useful for when you want to get groups of chunks which are similar to the search query. If choosing hybrid search, the results will be re-ranked using BAAI/bge-reranker-large. Compatible with semantic, fulltext, or hybrid search modes.
|
947
|
+
# @param search_over_groups_data [SearchOverGroupsData] JSON request payload to semantically search over groups
|
948
|
+
# @param [Hash] opts the optional parameters
|
949
|
+
# @return [Array<(SearchOverGroupsResponseBody, Integer, Hash)>] SearchOverGroupsResponseBody data, response status code and response headers
|
950
|
+
def search_over_groups_with_http_info(search_over_groups_data, opts = {})
|
951
|
+
if @api_client.config.debugging
|
952
|
+
@api_client.config.logger.debug 'Calling API: ChunkGroupApi.search_over_groups ...'
|
953
|
+
end
|
954
|
+
# verify the required parameter 'search_over_groups_data' is set
|
955
|
+
if @api_client.config.client_side_validation && search_over_groups_data.nil?
|
956
|
+
fail ArgumentError, "Missing the required parameter 'search_over_groups_data' when calling ChunkGroupApi.search_over_groups"
|
957
|
+
end
|
958
|
+
# resource path
|
959
|
+
local_var_path = '/api/chunk_group/group_oriented_search'
|
960
|
+
|
961
|
+
# query parameters
|
962
|
+
query_params = opts[:query_params] || {}
|
963
|
+
|
964
|
+
# header parameters
|
965
|
+
header_params = opts[:header_params] || {}
|
966
|
+
# HTTP header 'Accept' (if needed)
|
967
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
968
|
+
# HTTP header 'Content-Type'
|
969
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
970
|
+
if !content_type.nil?
|
971
|
+
header_params['Content-Type'] = content_type
|
972
|
+
end
|
973
|
+
|
974
|
+
# form parameters
|
975
|
+
form_params = opts[:form_params] || {}
|
976
|
+
|
977
|
+
# http body (model)
|
978
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(search_over_groups_data)
|
979
|
+
|
980
|
+
# return_type
|
981
|
+
return_type = opts[:debug_return_type] || 'SearchOverGroupsResponseBody'
|
982
|
+
|
983
|
+
# auth_names
|
984
|
+
auth_names = opts[:debug_auth_names] || []
|
985
|
+
|
986
|
+
new_options = opts.merge(
|
987
|
+
:operation => :"ChunkGroupApi.search_over_groups",
|
988
|
+
:header_params => header_params,
|
989
|
+
:query_params => query_params,
|
990
|
+
:form_params => form_params,
|
991
|
+
:body => post_body,
|
992
|
+
:auth_names => auth_names,
|
993
|
+
:return_type => return_type
|
994
|
+
)
|
995
|
+
|
996
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
997
|
+
if @api_client.config.debugging
|
998
|
+
@api_client.config.logger.debug "API called: ChunkGroupApi#search_over_groups\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
999
|
+
end
|
1000
|
+
return data, status_code, headers
|
1001
|
+
end
|
1002
|
+
|
1003
|
+
# search_within_group
|
1004
|
+
# search_within_group This route allows you to search only within a group. This is useful for when you only want search results to contain chunks which are members of a specific group. If choosing hybrid search, the results will be re-ranked using BAAI/bge-reranker-large.
|
1005
|
+
# @param tr_dataset [String] The dataset id to use for the request
|
1006
|
+
# @param search_within_group_data [SearchWithinGroupData] JSON request payload to semantically search a group
|
1007
|
+
# @param [Hash] opts the optional parameters
|
1008
|
+
# @return [SearchGroupsResult]
|
1009
|
+
def search_within_group(tr_dataset, search_within_group_data, opts = {})
|
1010
|
+
data, _status_code, _headers = search_within_group_with_http_info(tr_dataset, search_within_group_data, opts)
|
1011
|
+
data
|
1012
|
+
end
|
1013
|
+
|
1014
|
+
# search_within_group
|
1015
|
+
# search_within_group This route allows you to search only within a group. This is useful for when you only want search results to contain chunks which are members of a specific group. If choosing hybrid search, the results will be re-ranked using BAAI/bge-reranker-large.
|
1016
|
+
# @param tr_dataset [String] The dataset id to use for the request
|
1017
|
+
# @param search_within_group_data [SearchWithinGroupData] JSON request payload to semantically search a group
|
1018
|
+
# @param [Hash] opts the optional parameters
|
1019
|
+
# @return [Array<(SearchGroupsResult, Integer, Hash)>] SearchGroupsResult data, response status code and response headers
|
1020
|
+
def search_within_group_with_http_info(tr_dataset, search_within_group_data, opts = {})
|
1021
|
+
if @api_client.config.debugging
|
1022
|
+
@api_client.config.logger.debug 'Calling API: ChunkGroupApi.search_within_group ...'
|
1023
|
+
end
|
1024
|
+
# verify the required parameter 'tr_dataset' is set
|
1025
|
+
if @api_client.config.client_side_validation && tr_dataset.nil?
|
1026
|
+
fail ArgumentError, "Missing the required parameter 'tr_dataset' when calling ChunkGroupApi.search_within_group"
|
1027
|
+
end
|
1028
|
+
# verify the required parameter 'search_within_group_data' is set
|
1029
|
+
if @api_client.config.client_side_validation && search_within_group_data.nil?
|
1030
|
+
fail ArgumentError, "Missing the required parameter 'search_within_group_data' when calling ChunkGroupApi.search_within_group"
|
1031
|
+
end
|
1032
|
+
# resource path
|
1033
|
+
local_var_path = '/api/chunk_group/search'
|
1034
|
+
|
1035
|
+
# query parameters
|
1036
|
+
query_params = opts[:query_params] || {}
|
1037
|
+
|
1038
|
+
# header parameters
|
1039
|
+
header_params = opts[:header_params] || {}
|
1040
|
+
# HTTP header 'Accept' (if needed)
|
1041
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
1042
|
+
# HTTP header 'Content-Type'
|
1043
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
1044
|
+
if !content_type.nil?
|
1045
|
+
header_params['Content-Type'] = content_type
|
1046
|
+
end
|
1047
|
+
header_params[:'TR-Dataset'] = tr_dataset
|
1048
|
+
|
1049
|
+
# form parameters
|
1050
|
+
form_params = opts[:form_params] || {}
|
1051
|
+
|
1052
|
+
# http body (model)
|
1053
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(search_within_group_data)
|
1054
|
+
|
1055
|
+
# return_type
|
1056
|
+
return_type = opts[:debug_return_type] || 'SearchGroupsResult'
|
1057
|
+
|
1058
|
+
# auth_names
|
1059
|
+
auth_names = opts[:debug_auth_names] || ['Cookie', 'ApiKey']
|
1060
|
+
|
1061
|
+
new_options = opts.merge(
|
1062
|
+
:operation => :"ChunkGroupApi.search_within_group",
|
1063
|
+
:header_params => header_params,
|
1064
|
+
:query_params => query_params,
|
1065
|
+
:form_params => form_params,
|
1066
|
+
:body => post_body,
|
1067
|
+
:auth_names => auth_names,
|
1068
|
+
:return_type => return_type
|
1069
|
+
)
|
1070
|
+
|
1071
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
1072
|
+
if @api_client.config.debugging
|
1073
|
+
@api_client.config.logger.debug "API called: ChunkGroupApi#search_within_group\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1074
|
+
end
|
1075
|
+
return data, status_code, headers
|
1076
|
+
end
|
1077
|
+
|
1078
|
+
# update_chunk_group
|
1079
|
+
# update_chunk_group Update a chunk_group.
|
1080
|
+
# @param tr_dataset [String] The dataset id to use for the request
|
1081
|
+
# @param update_chunk_group_data [UpdateChunkGroupData] JSON request payload to update a chunkGroup
|
1082
|
+
# @param [Hash] opts the optional parameters
|
1083
|
+
# @return [nil]
|
1084
|
+
def update_chunk_group(tr_dataset, update_chunk_group_data, opts = {})
|
1085
|
+
update_chunk_group_with_http_info(tr_dataset, update_chunk_group_data, opts)
|
1086
|
+
nil
|
1087
|
+
end
|
1088
|
+
|
1089
|
+
# update_chunk_group
|
1090
|
+
# update_chunk_group Update a chunk_group.
|
1091
|
+
# @param tr_dataset [String] The dataset id to use for the request
|
1092
|
+
# @param update_chunk_group_data [UpdateChunkGroupData] JSON request payload to update a chunkGroup
|
1093
|
+
# @param [Hash] opts the optional parameters
|
1094
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
1095
|
+
def update_chunk_group_with_http_info(tr_dataset, update_chunk_group_data, opts = {})
|
1096
|
+
if @api_client.config.debugging
|
1097
|
+
@api_client.config.logger.debug 'Calling API: ChunkGroupApi.update_chunk_group ...'
|
1098
|
+
end
|
1099
|
+
# verify the required parameter 'tr_dataset' is set
|
1100
|
+
if @api_client.config.client_side_validation && tr_dataset.nil?
|
1101
|
+
fail ArgumentError, "Missing the required parameter 'tr_dataset' when calling ChunkGroupApi.update_chunk_group"
|
1102
|
+
end
|
1103
|
+
# verify the required parameter 'update_chunk_group_data' is set
|
1104
|
+
if @api_client.config.client_side_validation && update_chunk_group_data.nil?
|
1105
|
+
fail ArgumentError, "Missing the required parameter 'update_chunk_group_data' when calling ChunkGroupApi.update_chunk_group"
|
1106
|
+
end
|
1107
|
+
# resource path
|
1108
|
+
local_var_path = '/api/chunk_group'
|
1109
|
+
|
1110
|
+
# query parameters
|
1111
|
+
query_params = opts[:query_params] || {}
|
1112
|
+
|
1113
|
+
# header parameters
|
1114
|
+
header_params = opts[:header_params] || {}
|
1115
|
+
# HTTP header 'Accept' (if needed)
|
1116
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
1117
|
+
# HTTP header 'Content-Type'
|
1118
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
1119
|
+
if !content_type.nil?
|
1120
|
+
header_params['Content-Type'] = content_type
|
1121
|
+
end
|
1122
|
+
header_params[:'TR-Dataset'] = tr_dataset
|
1123
|
+
|
1124
|
+
# form parameters
|
1125
|
+
form_params = opts[:form_params] || {}
|
1126
|
+
|
1127
|
+
# http body (model)
|
1128
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(update_chunk_group_data)
|
1129
|
+
|
1130
|
+
# return_type
|
1131
|
+
return_type = opts[:debug_return_type]
|
1132
|
+
|
1133
|
+
# auth_names
|
1134
|
+
auth_names = opts[:debug_auth_names] || ['Cookie', 'ApiKey']
|
1135
|
+
|
1136
|
+
new_options = opts.merge(
|
1137
|
+
:operation => :"ChunkGroupApi.update_chunk_group",
|
1138
|
+
:header_params => header_params,
|
1139
|
+
:query_params => query_params,
|
1140
|
+
:form_params => form_params,
|
1141
|
+
:body => post_body,
|
1142
|
+
:auth_names => auth_names,
|
1143
|
+
:return_type => return_type
|
1144
|
+
)
|
1145
|
+
|
1146
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
1147
|
+
if @api_client.config.debugging
|
1148
|
+
@api_client.config.logger.debug "API called: ChunkGroupApi#update_chunk_group\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1149
|
+
end
|
1150
|
+
return data, status_code, headers
|
1151
|
+
end
|
1152
|
+
|
1153
|
+
# @param tr_dataset [String] The dataset id to use for the request
|
1154
|
+
# @param tracking_id [String] Tracking id of the chunk_group to update
|
1155
|
+
# @param update_group_by_tracking_id_data [UpdateGroupByTrackingIDData] JSON request payload to update a chunkGroup
|
1156
|
+
# @param [Hash] opts the optional parameters
|
1157
|
+
# @return [nil]
|
1158
|
+
def update_group_by_tracking_id(tr_dataset, tracking_id, update_group_by_tracking_id_data, opts = {})
|
1159
|
+
update_group_by_tracking_id_with_http_info(tr_dataset, tracking_id, update_group_by_tracking_id_data, opts)
|
1160
|
+
nil
|
1161
|
+
end
|
1162
|
+
|
1163
|
+
# @param tr_dataset [String] The dataset id to use for the request
|
1164
|
+
# @param tracking_id [String] Tracking id of the chunk_group to update
|
1165
|
+
# @param update_group_by_tracking_id_data [UpdateGroupByTrackingIDData] JSON request payload to update a chunkGroup
|
1166
|
+
# @param [Hash] opts the optional parameters
|
1167
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
1168
|
+
def update_group_by_tracking_id_with_http_info(tr_dataset, tracking_id, update_group_by_tracking_id_data, opts = {})
|
1169
|
+
if @api_client.config.debugging
|
1170
|
+
@api_client.config.logger.debug 'Calling API: ChunkGroupApi.update_group_by_tracking_id ...'
|
1171
|
+
end
|
1172
|
+
# verify the required parameter 'tr_dataset' is set
|
1173
|
+
if @api_client.config.client_side_validation && tr_dataset.nil?
|
1174
|
+
fail ArgumentError, "Missing the required parameter 'tr_dataset' when calling ChunkGroupApi.update_group_by_tracking_id"
|
1175
|
+
end
|
1176
|
+
# verify the required parameter 'tracking_id' is set
|
1177
|
+
if @api_client.config.client_side_validation && tracking_id.nil?
|
1178
|
+
fail ArgumentError, "Missing the required parameter 'tracking_id' when calling ChunkGroupApi.update_group_by_tracking_id"
|
1179
|
+
end
|
1180
|
+
# verify the required parameter 'update_group_by_tracking_id_data' is set
|
1181
|
+
if @api_client.config.client_side_validation && update_group_by_tracking_id_data.nil?
|
1182
|
+
fail ArgumentError, "Missing the required parameter 'update_group_by_tracking_id_data' when calling ChunkGroupApi.update_group_by_tracking_id"
|
1183
|
+
end
|
1184
|
+
# resource path
|
1185
|
+
local_var_path = '/api/chunk_group/tracking_id/{tracking_id}'.sub('{' + 'tracking_id' + '}', CGI.escape(tracking_id.to_s))
|
1186
|
+
|
1187
|
+
# query parameters
|
1188
|
+
query_params = opts[:query_params] || {}
|
1189
|
+
|
1190
|
+
# header parameters
|
1191
|
+
header_params = opts[:header_params] || {}
|
1192
|
+
# HTTP header 'Accept' (if needed)
|
1193
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
1194
|
+
# HTTP header 'Content-Type'
|
1195
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
1196
|
+
if !content_type.nil?
|
1197
|
+
header_params['Content-Type'] = content_type
|
1198
|
+
end
|
1199
|
+
header_params[:'TR-Dataset'] = tr_dataset
|
1200
|
+
|
1201
|
+
# form parameters
|
1202
|
+
form_params = opts[:form_params] || {}
|
1203
|
+
|
1204
|
+
# http body (model)
|
1205
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(update_group_by_tracking_id_data)
|
1206
|
+
|
1207
|
+
# return_type
|
1208
|
+
return_type = opts[:debug_return_type]
|
1209
|
+
|
1210
|
+
# auth_names
|
1211
|
+
auth_names = opts[:debug_auth_names] || ['Cookie', 'ApiKey']
|
1212
|
+
|
1213
|
+
new_options = opts.merge(
|
1214
|
+
:operation => :"ChunkGroupApi.update_group_by_tracking_id",
|
1215
|
+
:header_params => header_params,
|
1216
|
+
:query_params => query_params,
|
1217
|
+
:form_params => form_params,
|
1218
|
+
:body => post_body,
|
1219
|
+
:auth_names => auth_names,
|
1220
|
+
:return_type => return_type
|
1221
|
+
)
|
1222
|
+
|
1223
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
1224
|
+
if @api_client.config.debugging
|
1225
|
+
@api_client.config.logger.debug "API called: ChunkGroupApi#update_group_by_tracking_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1226
|
+
end
|
1227
|
+
return data, status_code, headers
|
1228
|
+
end
|
1229
|
+
end
|
1230
|
+
end
|