SajariAPIClient - the Ruby gem for the Search.io API
Search.io offers a search and discovery service with Neuralsearch®, the world's first instant AI search technology. Businesses of all sizes use Search.io to build site search and discovery solutions that maximize e-commerce revenue, optimize on-site customer experience, and scale their online presence.
This SDK is automatically generated by the OpenAPI Generator project:
- API version: v4
- Package version: 5.1.0
- Build package: org.openapitools.codegen.languages.RubyClientCodegen For more information, please visit https://www.search.io/company/contact
To build the Ruby code into a gem:
gem build sdk_ruby.gemspec
Then either install the gem locally:
gem install ./sdk_ruby-5.1.0.gem
(for development, run gem install --dev ./sdk_ruby-5.1.0.gem
to install the development dependencies)
or publish the gem to a gem hosting service, e.g. RubyGems.
Finally add this to the Gemfile:
gem 'sdk_ruby', '~> 5.1.0'
If the Ruby gem is hosted at a git repository: https://github.com/sajari/GIT_USER_ID/sdk_ruby, then add the following in the Gemfile:
gem 'sdk_ruby', :git => 'https://github.com/sajari/GIT_USER_ID/sdk_ruby.git'
Include the Ruby code directly using -I
as follows:
ruby -Ilib script.rb
Please follow the installation procedure and then run the following code:
# Load the gem
require 'sdk_ruby'
# Setup authorization
SajariAPIClient.configure do |config|
# Configure HTTP basic authorization: BasicAuth
config.username = 'YOUR_USERNAME'
config.password = 'YOUR_PASSWORD'
end
api_instance = SajariAPIClient::CollectionsApi.new
collection_id = 'collection_id_example' # String | The ID to use for the collection. This must start with an alphanumeric character followed by one or more alphanumeric or `-` characters. Strictly speaking, it must match the regular expression: `^[A-Za-z][A-Za-z0-9\\-]*$`.
collection = SajariAPIClient::Collection.new({display_name: 'display_name_example'}) # Collection | Details of the collection to create.
opts = {
account_id: 'account_id_example' # String | The account that owns the collection, e.g. `1618535966441231024`.
}
begin
#Create collection
result = api_instance.create_collection(collection_id, collection, opts)
p result
rescue SajariAPIClient::ApiError => e
puts "Exception when calling CollectionsApi->create_collection: #{e}"
end
All URIs are relative to https://api.search.io
Class | Method | HTTP request | Description |
---|---|---|---|
SajariAPIClient::CollectionsApi | create_collection | POST /v4/collections | Create collection |
SajariAPIClient::CollectionsApi | delete_collection | DELETE /v4/collections/{collection_id} | Delete collection |
SajariAPIClient::CollectionsApi | experiment | POST /v4/collections/{collection_id}:experiment | Experiment |
SajariAPIClient::CollectionsApi | get_collection | GET /v4/collections/{collection_id} | Get collection |
SajariAPIClient::CollectionsApi | list_collections | GET /v4/collections | List collections |
SajariAPIClient::CollectionsApi | query_collection | POST /v4/collections/{collection_id}:query | Query collection |
SajariAPIClient::CollectionsApi | query_collection2 | POST /v4/collections/{collection_id}:queryCollection | Query collection |
SajariAPIClient::CollectionsApi | track_event | POST /v4/collections/{collection_id}:trackEvent | Track event |
SajariAPIClient::CollectionsApi | update_collection | PATCH /v4/collections/{collection_id} | Update collection |
SajariAPIClient::EventsApi | send_event | POST /v4/events:send | Send event |
SajariAPIClient::EventsApi | send_event2 | POST /v4/events:sendEvent | Send event |
SajariAPIClient::PipelinesApi | create_pipeline | POST /v4/collections/{collection_id}/pipelines | Create pipeline |
SajariAPIClient::PipelinesApi | generate_pipelines | POST /v4/collections/{collection_id}:generatePipelines | Generate pipelines |
SajariAPIClient::PipelinesApi | get_default_pipeline | GET /v4/collections/{collection_id}:getDefaultPipeline | Get default pipeline |
SajariAPIClient::PipelinesApi | get_default_version | GET /v4/collections/{collection_id}/pipelines/{type}/{name}:getDefaultVersion | Get default pipeline version |
SajariAPIClient::PipelinesApi | get_pipeline | GET /v4/collections/{collection_id}/pipelines/{type}/{name}/{version} | Get pipeline |
SajariAPIClient::PipelinesApi | list_pipelines | GET /v4/collections/{collection_id}/pipelines | List pipelines |
SajariAPIClient::PipelinesApi | set_default_pipeline | POST /v4/collections/{collection_id}:setDefaultPipeline | Set default pipeline |
SajariAPIClient::PipelinesApi | set_default_version | POST /v4/collections/{collection_id}/pipelines/{type}/{name}:setDefaultVersion | Set default pipeline version |
SajariAPIClient::PromotionsApi | create_promotion | POST /v4/collections/{collection_id}/promotions | Create promotion |
SajariAPIClient::PromotionsApi | delete_promotion | DELETE /v4/collections/{collection_id}/promotions/{promotion_id} | Delete promotion |
SajariAPIClient::PromotionsApi | get_promotion | GET /v4/collections/{collection_id}/promotions/{promotion_id} | Get promotion |
SajariAPIClient::PromotionsApi | list_promotions | GET /v4/collections/{collection_id}/promotions | List promotions |
SajariAPIClient::PromotionsApi | update_promotion | PATCH /v4/collections/{collection_id}/promotions/{promotion_id} | Update promotion |
SajariAPIClient::RecordsApi | batch_update_records | POST /v4/collections/{collection_id}/records:batchUpdate | Batch update records |
SajariAPIClient::RecordsApi | batch_upsert_records | POST /v4/collections/{collection_id}/records:batchUpsert | Batch upsert records |
SajariAPIClient::RecordsApi | delete_record | POST /v4/collections/{collection_id}/records:delete | Delete record |
SajariAPIClient::RecordsApi | get_record | POST /v4/collections/{collection_id}/records:get | Get record |
SajariAPIClient::RecordsApi | update_record | POST /v4/collections/{collection_id}/records:update | Update record |
SajariAPIClient::RecordsApi | upsert_record | POST /v4/collections/{collection_id}/records:upsert | Upsert record |
SajariAPIClient::RedirectsApi | create_redirect | POST /v4/collections/{collection_id}/redirects | Create redirect |
SajariAPIClient::RedirectsApi | delete_redirect | DELETE /v4/collections/{collection_id}/redirects/{redirect_id} | Delete redirect |
SajariAPIClient::RedirectsApi | get_redirect | GET /v4/collections/{collection_id}/redirects/{redirect_id} | Get redirect |
SajariAPIClient::RedirectsApi | list_redirects | GET /v4/collections/{collection_id}/redirects | List redirects |
SajariAPIClient::RedirectsApi | update_redirect | PATCH /v4/collections/{collection_id}/redirects/{redirect_id} | Update redirect |
SajariAPIClient::SchemaApi | batch_create_schema_fields | POST /v4/collections/{collection_id}/schemaFields:batchCreate | Batch create schema fields |
SajariAPIClient::SchemaApi | create_schema_field | POST /v4/collections/{collection_id}/schemaFields | Create schema field |
SajariAPIClient::SchemaApi | delete_schema_field | DELETE /v4/collections/{collection_id}/schemaFields/{schema_field_name} | Delete schema field |
SajariAPIClient::SchemaApi | list_schema_fields | GET /v4/collections/{collection_id}/schemaFields | List schema fields |
SajariAPIClient::SchemaApi | update_schema_field | PATCH /v4/collections/{collection_id}/schemaFields/{schema_field_name} | Update schema field |
- SajariAPIClient::ActivePromotion
- SajariAPIClient::Banner
- SajariAPIClient::BatchCreateSchemaFieldsRequest
- SajariAPIClient::BatchCreateSchemaFieldsResponse
- SajariAPIClient::BatchCreateSchemaFieldsResponseError
- SajariAPIClient::BatchUpdateRecordsRequest
- SajariAPIClient::BatchUpdateRecordsResponse
- SajariAPIClient::BatchUpdateRecordsResponseError
- SajariAPIClient::BatchUpdateRecordsResponseRecord
- SajariAPIClient::BatchUpsertRecordsRequest
- SajariAPIClient::BatchUpsertRecordsRequestPipeline
- SajariAPIClient::BatchUpsertRecordsResponse
- SajariAPIClient::BatchUpsertRecordsResponseError
- SajariAPIClient::BatchUpsertRecordsResponseKey
- SajariAPIClient::BatchUpsertRecordsResponseVariables
- SajariAPIClient::Collection
- SajariAPIClient::CollectionType
- SajariAPIClient::DeleteRecordRequest
- SajariAPIClient::Error
- SajariAPIClient::Event
- SajariAPIClient::ExperimentRequest
- SajariAPIClient::ExperimentRequestPipeline
- SajariAPIClient::ExperimentResponse
- SajariAPIClient::GeneratePipelinesRequest
- SajariAPIClient::GeneratePipelinesResponse
- SajariAPIClient::GetCollectionRequestView
- SajariAPIClient::GetDefaultPipelineResponse
- SajariAPIClient::GetDefaultVersionRequestView
- SajariAPIClient::GetPipelineRequestView
- SajariAPIClient::GetRecordRequest
- SajariAPIClient::ListCollectionsRequestView
- SajariAPIClient::ListCollectionsResponse
- SajariAPIClient::ListPipelinesRequestView
- SajariAPIClient::ListPipelinesResponse
- SajariAPIClient::ListPromotionsRequestPromotionView
- SajariAPIClient::ListPromotionsResponse
- SajariAPIClient::ListRedirectsResponse
- SajariAPIClient::ListSchemaFieldsResponse
- SajariAPIClient::PercentileDataPoint
- SajariAPIClient::Pipeline
- SajariAPIClient::PipelineStep
- SajariAPIClient::PipelineStepParamBinding
- SajariAPIClient::PipelineType
- SajariAPIClient::Promotion
- SajariAPIClient::PromotionCategory
- SajariAPIClient::PromotionExclusion
- SajariAPIClient::PromotionFilterBoost
- SajariAPIClient::PromotionFilterCondition
- SajariAPIClient::PromotionPin
- SajariAPIClient::PromotionPinMode
- SajariAPIClient::PromotionRangeBoost
- SajariAPIClient::ProtobufAny
- SajariAPIClient::ProtobufFieldMask
- SajariAPIClient::ProtobufNullValue
- SajariAPIClient::QueryAggregateResult
- SajariAPIClient::QueryAggregateResultAnalysis
- SajariAPIClient::QueryAggregateResultBuckets
- SajariAPIClient::QueryAggregateResultBucketsBucket
- SajariAPIClient::QueryAggregateResultCount
- SajariAPIClient::QueryAggregateResultDate
- SajariAPIClient::QueryAggregateResultMetric
- SajariAPIClient::QueryAggregateResultPercentile
- SajariAPIClient::QueryCollectionRequest
- SajariAPIClient::QueryCollectionRequestPipeline
- SajariAPIClient::QueryCollectionRequestTracking
- SajariAPIClient::QueryCollectionRequestTrackingType
- SajariAPIClient::QueryCollectionResponse
- SajariAPIClient::QueryCollectionResponsePipeline
- SajariAPIClient::QueryResult
- SajariAPIClient::QueryResultToken
- SajariAPIClient::QueryResultTokenClick
- SajariAPIClient::QueryResultTokenPosNeg
- SajariAPIClient::RecordKey
- SajariAPIClient::Redirect
- SajariAPIClient::RedirectResult
- SajariAPIClient::SchemaField
- SajariAPIClient::SchemaFieldMode
- SajariAPIClient::SchemaFieldType
- SajariAPIClient::SendEventRequest
- SajariAPIClient::SetDefaultPipelineRequest
- SajariAPIClient::SetDefaultVersionRequest
- SajariAPIClient::Status
- SajariAPIClient::TextPosition
- SajariAPIClient::UpdateRecordRequest
- SajariAPIClient::UpsertRecordRequest
- SajariAPIClient::UpsertRecordRequestPipeline
- SajariAPIClient::UpsertRecordResponse
- Type: HTTP basic authentication