Code Monkey home page Code Monkey logo

sdk-java's Introduction

sdk-java-client

Search.io API

  • API version: v4

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.

For more information, please visit [https://www.search.io/company/contact](https://www.search.io/company/contact)

Automatically generated by the OpenAPI Generator

Requirements

Building the API client library requires:

  1. Java 1.8+
  2. Maven/Gradle

Installation

To install the API client library to your local Maven repository, simply execute:

mvn clean install

To deploy it to a remote Maven repository instead, configure the settings of the repository and execute:

mvn clean deploy

Refer to the OSSRH Guide for more information.

Maven users

Add this dependency to your project's POM:

<dependency>
    <groupId>com.sajari</groupId>
    <artifactId>sdk-java-client</artifactId>
    <version>5.1.0</version>
    <scope>compile</scope>
</dependency>

Gradle users

Add this dependency to your project's build file:

compile "com.sajari:sdk-java-client:5.1.0"

Others

At first generate the JAR by executing:

mvn clean package

Then manually install the following JARs:

  • target/sdk-java-client-5.1.0.jar
  • target/lib/*.jar

Getting Started

Please follow the installation instruction and execute the following Java code:

    import com.sajari.client.*;
    import com.sajari.client.auth.*;
    import com.sajari.client.model.*;
    import com.sajari.client.api.CollectionsApi;

    public class CollectionsApiExample {

    public static void main(String[] args) {

    ApiClient defaultClient = Configuration.getDefaultApiClient();
    defaultClient.setBasePath("https://api.search.io");
    
        // Configure HTTP basic authorization: BasicAuth
        HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth");
        BasicAuth.setUsername("YOUR USERNAME");
        BasicAuth.setPassword("YOUR PASSWORD");

    CollectionsApi apiInstance = new CollectionsApi(defaultClient);
        String collectionId = "collectionId_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 collection = new Collection(); // Collection | Details of the collection to create.
        String accountId = "accountId_example"; // String | The account that owns the collection, e.g. `1618535966441231024`.

    try {
    Collection result = apiInstance.createCollection(collectionId, collection, accountId);
        System.out.println(result);
    } catch (ApiException e) {
    System.err.println("Exception when calling CollectionsApi#createCollection");
    System.err.println("Status code: " + e.getCode());
    System.err.println("Reason: " + e.getResponseBody());
    System.err.println("Response headers: " + e.getResponseHeaders());
    e.printStackTrace();
    }
    }
    }

Documentation for API Endpoints

All URIs are relative to https://api.search.io

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

Documentation for Models

Documentation for Authorization

Authentication schemes defined for the API:

BasicAuth

- **Type**: HTTP basic authentication

Recommendation

It's recommended to create an instance of ApiClient per thread in a multithreaded environment to avoid any potential issues.

Author

[email protected]

sdk-java's People

Contributors

justinkoke avatar jkaho avatar

Watchers

David Howden avatar Jens avatar James Cloos avatar Hamish avatar Beatrice avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.