2017 © Pedro Peláez
 

library sajari-sdk-php

Sajari SDK for PHP

image

sajari/sajari-sdk-php

Sajari SDK for PHP

  • Monday, November 6, 2017
  • by jonathaningram
  • Repository
  • 7 Watchers
  • 1 Stars
  • 11,388 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 2 Forks
  • 0 Open issues
  • 19 Versions
  • 11 % Grown

The README.md

Search.io SDK for PHP

Build status, (*1)

The official Search.io PHP client library., (*2)

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., (*3)

Table of contents

Installation & usage

Requirements

PHP 7.2 and later., (*4)

Composer

To install the bindings via Composer, add the following to composer.json:, (*5)

{
  "repositories": [
    {
      "type": "vcs",
      "url": "https://github.com/sajari/sdk-php.git"
    }
  ],
  "require": {
    "sajari/sdk-php": "*@dev"
  }
}

Then run composer install, (*6)

Manual installation

Download the files and include autoload.php:, (*7)

<?php
require_once "/path/to/OpenAPIClient-php/vendor/autoload.php";

Getting started

Please follow the installation procedure and then run the following:, (*8)

<?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, (*9)

Class Method HTTP request Description
CollectionsApi createCollection POST /v4/collections Create collection
CollectionsApi deleteCollection DELETE /v4/collections/{collection_id} Delete collection
CollectionsApi experiment POST /v4/collections/{collection_id}:experiment Experiment
CollectionsApi getCollection GET /v4/collections/{collection_id} Get collection
CollectionsApi listCollections GET /v4/collections List collections
CollectionsApi queryCollection POST /v4/collections/{collection_id}:query Query collection
CollectionsApi queryCollection2 POST /v4/collections/{collection_id}:queryCollection Query collection
CollectionsApi trackEvent POST /v4/collections/{collection_id}:trackEvent Track event
CollectionsApi updateCollection PATCH /v4/collections/{collection_id} Update collection
EventsApi sendEvent POST /v4/events:send Send event
EventsApi sendEvent2 POST /v4/events:sendEvent Send event
PipelinesApi createPipeline POST /v4/collections/{collection_id}/pipelines Create pipeline
PipelinesApi generatePipelines POST /v4/collections/{collection_id}:generatePipelines Generate pipelines
PipelinesApi getDefaultPipeline GET /v4/collections/{collection_id}:getDefaultPipeline Get default pipeline
PipelinesApi getDefaultVersion GET /v4/collections/{collection_id}/pipelines/{type}/{name}:getDefaultVersion Get default pipeline version
PipelinesApi getPipeline GET /v4/collections/{collection_id}/pipelines/{type}/{name}/{version} Get pipeline
PipelinesApi listPipelines GET /v4/collections/{collection_id}/pipelines List pipelines
PipelinesApi setDefaultPipeline POST /v4/collections/{collection_id}:setDefaultPipeline Set default pipeline
PipelinesApi setDefaultVersion POST /v4/collections/{collection_id}/pipelines/{type}/{name}:setDefaultVersion Set default pipeline version
PromotionsApi createPromotion POST /v4/collections/{collection_id}/promotions Create promotion
PromotionsApi deletePromotion DELETE /v4/collections/{collection_id}/promotions/{promotion_id} Delete promotion
PromotionsApi getPromotion GET /v4/collections/{collection_id}/promotions/{promotion_id} Get promotion
PromotionsApi listPromotions GET /v4/collections/{collection_id}/promotions List promotions
PromotionsApi updatePromotion PATCH /v4/collections/{collection_id}/promotions/{promotion_id} Update promotion
RecordsApi batchUpdateRecords POST /v4/collections/{collection_id}/records:batchUpdate Batch update records
RecordsApi batchUpsertRecords POST /v4/collections/{collection_id}/records:batchUpsert Batch upsert records
RecordsApi deleteRecord POST /v4/collections/{collection_id}/records:delete Delete record
RecordsApi getRecord POST /v4/collections/{collection_id}/records:get Get record
RecordsApi updateRecord POST /v4/collections/{collection_id}/records:update Update record
RecordsApi upsertRecord POST /v4/collections/{collection_id}/records:upsert Upsert record
RedirectsApi createRedirect POST /v4/collections/{collection_id}/redirects Create redirect
RedirectsApi deleteRedirect DELETE /v4/collections/{collection_id}/redirects/{redirect_id} Delete redirect
RedirectsApi getRedirect GET /v4/collections/{collection_id}/redirects/{redirect_id} Get redirect
RedirectsApi listRedirects GET /v4/collections/{collection_id}/redirects List redirects
RedirectsApi updateRedirect PATCH /v4/collections/{collection_id}/redirects/{redirect_id} Update redirect
SchemaApi batchCreateSchemaFields POST /v4/collections/{collection_id}/schemaFields:batchCreate Batch create schema fields
SchemaApi createSchemaField POST /v4/collections/{collection_id}/schemaFields Create schema field
SchemaApi deleteSchemaField DELETE /v4/collections/{collection_id}/schemaFields/{schema_field_name} Delete schema field
SchemaApi listSchemaFields GET /v4/collections/{collection_id}/schemaFields List schema fields
SchemaApi updateSchemaField PATCH /v4/collections/{collection_id}/schemaFields/{schema_field_name} Update schema field

Models

Authorization

BasicAuth

  • Type: HTTP basic authentication

Tests

To run the tests, use:, (*10)

composer install
vendor/bin/phpunit

Author

support@search.io, (*11)

About this package

This PHP package is automatically generated by the OpenAPI Generator project:, (*12)

  • API version: v4
    • Package version: 5.1.0
  • Build package: org.openapitools.codegen.languages.PhpClientCodegen

The Versions

06/11 2017

dev-master

9999999-dev https://www.sajari.com

Sajari SDK for PHP

  Sources   Download

MIT

The Requires

 

The Development Requires

search sdk sajari

01/09 2017

v2.0.2

2.0.2.0 https://www.sajari.com

Sajari SDK for PHP

  Sources   Download

MIT

The Requires

 

search sdk sajari

17/05 2017

v2.0.1

2.0.1.0 https://www.sajari.com

Sajari SDK for PHP

  Sources   Download

MIT

The Requires

 

search sdk sajari

17/05 2017

v2.0.0

2.0.0.0 https://www.sajari.com

Sajari SDK for PHP

  Sources   Download

MIT

The Requires

 

search sdk sajari

17/05 2017

dev-new-generated-proto

dev-new-generated-proto https://www.sajari.com

Sajari SDK for PHP

  Sources   Download

MIT

The Requires

 

search sdk sajari

03/05 2017

v1.0.1

1.0.1.0 https://www.sajari.com

Sajari SDK for PHP

  Sources   Download

MIT

The Requires

 

The Development Requires

search sdk sajari

06/04 2017

v1.0.0

1.0.0.0 https://www.sajari.com

Sajari SDK for PHP

  Sources   Download

MIT

The Requires

 

The Development Requires

search sdk sajari

14/12 2016

dev-v10-fix-proto-path

dev-v10-fix-proto-path https://www.sajari.com

Sajari SDK for PHP

  Sources   Download

MIT

The Requires

 

search sdk sajari

04/11 2016

v10.x-dev

10.9999999.9999999.9999999-dev https://www.sajari.com

Sajari SDK for PHP

  Sources   Download

MIT

The Requires

 

search sdk sajari

22/10 2015

dev-legacy

dev-legacy https://www.sajari.com

Sajari SDK for PHP - Use Sajari in your PHP project

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

sdk sajari

22/10 2015

v0.9.0

0.9.0.0 https://www.sajari.com

Sajari SDK for PHP - Use Sajari in your PHP project

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

sdk sajari

27/09 2015

v0.8.0

0.8.0.0 https://www.sajari.com

Sajari SDK for PHP - Use Sajari in your PHP project

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

sdk sajari

16/09 2015

v0.7.0

0.7.0.0 https://www.sajari.com

Sajari SDK for PHP - Use Sajari in your PHP project

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

sdk sajari

16/09 2015

v0.6.0

0.6.0.0 https://www.sajari.com

Sajari SDK for PHP - Use Sajari in your PHP project

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

sdk sajari

14/09 2015

v0.5.0

0.5.0.0 https://www.sajari.com

Sajari SDK for PHP - Use Sajari in your PHP project

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

sdk sajari

14/09 2015

v0.4.0

0.4.0.0 https://www.sajari.com

Sajari SDK for PHP - Use Sajari in your PHP project

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

sdk sajari

09/09 2015

v0.3.0

0.3.0.0 https://www.sajari.com

Sajari SDK for PHP - Use Sajari in your PHP project

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

sdk sajari

17/07 2015

v0.2.0

0.2.0.0 https://www.sajari.com

Sajari SDK for PHP - Use Sajari in your PHP project

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

sdk sajari

17/07 2015

v0.1.0

0.1.0.0 https://www.sajari.com

Sajari SDK for PHP - Use Sajari in your PHP project

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

sdk sajari