萨贾里 / sajari-sdk-php
Search.io 提供了基于 Neuralsearch® 的搜索和发现服务,这是世界上第一种即时人工智能搜索技术。各种规模的企业都使用 Search.io 来构建网站搜索和发现解决方案,以最大化电子商务收入、优化网站客户体验并扩展其在线存在。
5.1.0
2022-05-04 08:26 UTC
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
这是官方的 Search.io PHP 客户端库。
Search.io 提供了基于 Neuralsearch® 的搜索和发现服务,这是世界上第一种即时人工智能搜索技术。各种规模的企业都使用 Search.io 来构建网站搜索和发现解决方案,以最大化电子商务收入、优化网站客户体验并扩展其在线存在。
目录
安装与使用
要求
PHP 7.2 及更高版本。
Composer
要通过 Composer 安装绑定,请将以下内容添加到 composer.json
{ "repositories": [ { "type": "vcs", "url": "https://github.com/sajari/sdk-php.git" } ], "require": { "sajari/sdk-php": "*@dev" } }
然后运行 composer install
手动安装
下载文件并包含 autoload.php
<?php require_once "/path/to/OpenAPIClient-php/vendor/autoload.php";
入门指南
请按照 安装过程 操作,然后运行以下命令
<?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 端点
所有 URI 都是相对于 https://api.search.io
模型
- 活动促销
- 横幅
- 批量创建模式字段请求
- 批量创建模式字段响应
- 批量创建模式字段响应错误
- 批量更新记录请求
- 批量更新记录响应
- 批量更新记录响应错误
- 批量更新记录响应记录
- 批量插入记录请求
- 批量插入记录请求管道
- 批量插入记录响应
- 批量插入记录响应错误
- 批量插入记录响应键
- 批量插入记录响应变量
- 集合
- 集合类型
- 删除记录请求
- 错误
- 事件
- 实验请求
- 实验请求管道
- 实验响应
- 生成管道请求
- 生成管道响应
- 获取集合请求视图
- 获取默认管道响应
- 获取默认版本请求视图
- 获取管道请求视图
- 获取记录请求
- 列出集合请求视图
- 列出集合响应
- 列出管道请求视图
- 列出管道响应
- 列出促销请求促销视图
- 列出促销响应
- 列出重定向响应
- 列出模式字段响应
- 百分位数数据点
- 管道
- 管道步骤
- 管道步骤参数绑定
- 管道类型
- 促销
- 促销类别
- 促销排除
- 促销过滤提升
- 促销过滤条件
- 促销固定
- 促销固定模式
- 促销范围提升
- ProtobufAny
- ProtobufFieldMask
- ProtobufNullValue
- 查询聚合结果
- 查询聚合结果分析
- 查询聚合结果桶
- 查询聚合结果桶桶
- 查询聚合结果计数
- 查询聚合结果日期
- 查询聚合结果指标
- 查询聚合结果百分位数
- 查询集合请求
- 查询集合请求管道
- 查询集合请求跟踪
- 查询集合请求跟踪类型
- 查询集合响应
- 查询集合响应管道
- 查询结果
- 查询结果标记
- 查询结果标记点击
- 查询结果标记正负
- 记录键
- 重定向
- 重定向结果
- 模式字段
- 模式字段模式
- 模式字段类型
- 发送事件请求
- 设置默认管道请求
- 设置默认版本请求
- 状态
- 文本位置
- 更新记录请求
- 插入或更新记录请求
- 插入或更新记录请求管道
- 插入或更新记录响应
授权
基本认证
- 类型:HTTP基本认证
测试
要运行测试,使用
composer install vendor/bin/phpunit
作者
关于本包
此PHP包由OpenAPI Generator项目自动生成
- API版本:
v4
- 包版本:
5.1.0
- 包版本:
- 构建包:
org.openapitools.codegen.languages.PhpClientCodegen