sajari / sajari-sdk-php
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 presen
Requires
- php: >=7.2
- ext-curl: *
- ext-json: *
- ext-mbstring: *
- guzzlehttp/guzzle: ^6.2
Requires (Dev)
- friendsofphp/php-cs-fixer: ^2.12
- phpunit/phpunit: ^8.0 || ^9.0
README
The official Search.io PHP client library.
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.
Table of contents
- Installation & usage
- Getting started
- API endpoints
- Models
- Authorization
- Tests
- Author
- About this package
Installation & usage
Requirements
PHP 7.2 and later.
Composer
To install the bindings via Composer, add the following to composer.json
:
{ "repositories": [ { "type": "vcs", "url": "https://github.com/sajari/sdk-php.git" } ], "require": { "sajari/sdk-php": "*@dev" } }
Then run composer install
Manual installation
Download the files and include autoload.php
:
<?php require_once "/path/to/OpenAPIClient-php/vendor/autoload.php";
Getting started
Please follow the installation procedure and then run the following:
<?php require_once __DIR__ . "/vendor/autoload.php"; // Configure HTTP basic authorization: BasicAuth $config = Sajari\Configuration::getDefaultConfiguration() ->setUsername("YOUR_USERNAME") ->setPassword("YOUR_PASSWORD"); $apiInstance = new Sajari\Api\CollectionsApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client(), $config ); $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 = new \Sajari\Model\Collection(); // \Sajari\Model\Collection | Details of the collection to create. $account_id = "account_id_example"; // string | The account that owns the collection, e.g. `1618535966441231024`. try { $result = $apiInstance->createCollection( $collection_id, $collection, $account_id ); print_r($result); } catch (Exception $e) { echo "Exception when calling CollectionsApi->createCollection: ", $e->getMessage(), PHP_EOL; }
API endpoints
All URIs are relative to https://api.search.io
Models
- ActivePromotion
- Banner
- BatchCreateSchemaFieldsRequest
- BatchCreateSchemaFieldsResponse
- BatchCreateSchemaFieldsResponseError
- BatchUpdateRecordsRequest
- BatchUpdateRecordsResponse
- BatchUpdateRecordsResponseError
- BatchUpdateRecordsResponseRecord
- BatchUpsertRecordsRequest
- BatchUpsertRecordsRequestPipeline
- BatchUpsertRecordsResponse
- BatchUpsertRecordsResponseError
- BatchUpsertRecordsResponseKey
- BatchUpsertRecordsResponseVariables
- Collection
- CollectionType
- DeleteRecordRequest
- Error
- Event
- ExperimentRequest
- ExperimentRequestPipeline
- ExperimentResponse
- GeneratePipelinesRequest
- GeneratePipelinesResponse
- GetCollectionRequestView
- GetDefaultPipelineResponse
- GetDefaultVersionRequestView
- GetPipelineRequestView
- GetRecordRequest
- ListCollectionsRequestView
- ListCollectionsResponse
- ListPipelinesRequestView
- ListPipelinesResponse
- ListPromotionsRequestPromotionView
- ListPromotionsResponse
- ListRedirectsResponse
- ListSchemaFieldsResponse
- PercentileDataPoint
- Pipeline
- PipelineStep
- PipelineStepParamBinding
- PipelineType
- Promotion
- PromotionCategory
- PromotionExclusion
- PromotionFilterBoost
- PromotionFilterCondition
- PromotionPin
- PromotionPinMode
- PromotionRangeBoost
- ProtobufAny
- ProtobufFieldMask
- ProtobufNullValue
- QueryAggregateResult
- QueryAggregateResultAnalysis
- QueryAggregateResultBuckets
- QueryAggregateResultBucketsBucket
- QueryAggregateResultCount
- QueryAggregateResultDate
- QueryAggregateResultMetric
- QueryAggregateResultPercentile
- QueryCollectionRequest
- QueryCollectionRequestPipeline
- QueryCollectionRequestTracking
- QueryCollectionRequestTrackingType
- QueryCollectionResponse
- QueryCollectionResponsePipeline
- QueryResult
- QueryResultToken
- QueryResultTokenClick
- QueryResultTokenPosNeg
- RecordKey
- Redirect
- RedirectResult
- SchemaField
- SchemaFieldMode
- SchemaFieldType
- SendEventRequest
- SetDefaultPipelineRequest
- SetDefaultVersionRequest
- Status
- TextPosition
- UpdateRecordRequest
- UpsertRecordRequest
- UpsertRecordRequestPipeline
- UpsertRecordResponse
Authorization
BasicAuth
- Type: HTTP basic authentication
Tests
To run the tests, use:
composer install vendor/bin/phpunit
Author
About this package
This PHP package is automatically generated by the OpenAPI Generator project:
- API version:
v4
- Package version:
5.1.0
- Package version:
- Build package:
org.openapitools.codegen.languages.PhpClientCodegen