Socket
Socket
Sign inDemoInstall

zincsearch-sdk

Package Overview
Dependencies
118
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    zincsearch-sdk

Zinc Search engine API documents https://docs.zincsearch.com


Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

zincsearch-sdk

ZincSearchSDK - JavaScript client for zincsearch-sdk Zinc Search engine API documents https://docs.zincsearch.com This SDK is automatically generated by the OpenAPI Generator project:

  • API version: 0.3.3
  • Package version: 0.3.3
  • Build package: org.openapitools.codegen.languages.JavascriptClientCodegen For more information, please visit https://www.zincsearch.com

Installation

For Node.js

npm

To publish the library as a npm, please follow the procedure in "Publishing npm packages".

Then install it via:

npm install zincsearch-sdk --save

Finally, you need to build the module:

npm run build
Local development

To use the library locally without publishing to a remote npm registry, first install the dependencies by changing into the directory containing package.json (and this README). Let's call this JAVASCRIPT_CLIENT_DIR. Then run:

npm install

Next, link it globally in npm with the following, also from JAVASCRIPT_CLIENT_DIR:

npm link

To use the link you just defined in your project, switch to the directory you want to use your zincsearch-sdk from, and run:

npm link /path/to/<JAVASCRIPT_CLIENT_DIR>

Finally, you need to build the module:

npm run build
git

If the library is hosted at a git repository, e.g.https://github.com/zinclabs/sdk-nodejs-zincsearch then install it via:

    npm install zinclabs/sdk-nodejs-zincsearch --save

For browser

The library also works in the browser environment via npm and browserify. After following the above steps with Node.js and installing browserify with npm install -g browserify, perform the following (assuming main.js is your entry file):

browserify main.js > bundle.js

Then include bundle.js in the HTML pages.

Webpack Configuration

Using Webpack you may encounter the following error: "Module not found: Error: Cannot resolve module", most certainly you should disable AMD loader. Add/merge the following section to your webpack config:

module: {
  rules: [
    {
      parser: {
        amd: false
      }
    }
  ]
}

Getting Started

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

var ZincSearchSDK = require('zincsearch-sdk');

var defaultClient = ZincSearchSDK.ApiClient.instance;
// Configure HTTP basic authorization: basicAuth
var basicAuth = defaultClient.authentications['basicAuth'];
basicAuth.username = 'YOUR USERNAME'
basicAuth.password = 'YOUR PASSWORD'

var api = new ZincSearchSDK.Default()
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.healthz(callback);

Documentation for API Endpoints

All URIs are relative to http://localhost:4080

ClassMethodHTTP requestDescription
ZincSearchSDK.DefaulthealthzGET /healthzGet healthz
ZincSearchSDK.DefaultversionGET /versionGet version
ZincSearchSDK.DocumentbulkPOST /api/_bulkBulk documents
ZincSearchSDK.Documentbulkv2POST /api/_bulkv2Bulkv2 documents
ZincSearchSDK.DocumentdeleteDELETE /api/{index}/_doc/{id}Delete document
ZincSearchSDK.DocumentesBulkPOST /es/_bulkES bulk documents
ZincSearchSDK.DocumentindexPOST /api/{index}/_docCreate or update document
ZincSearchSDK.DocumentindexWithIDPUT /api/{index}/_doc/{id}Create or update document with id
ZincSearchSDK.DocumentmultiPOST /api/{index}/_multiMulti documents
ZincSearchSDK.DocumentupdatePOST /api/{index}/_update/{id}Update document with id
ZincSearchSDK.IndexaddOrRemoveESAliasPOST /es/_aliasesAdd or remove index alias for compatible ES
ZincSearchSDK.IndexanalyzePOST /api/_analyzeAnalyze
ZincSearchSDK.IndexanalyzeIndexPOST /api/{index}/_analyzeAnalyze
ZincSearchSDK.IndexdeleteDELETE /api/index/{index}Delete index
ZincSearchSDK.IndexcreatePOST /api/indexCreate index
ZincSearchSDK.IndexcreateTemplatePOST /es/_index_templateCreate update index template
ZincSearchSDK.IndexdeleteTemplateDELETE /es/_index_template/{name}Delete template
ZincSearchSDK.IndexeSCreateIndexPUT /es/{index}Create index for compatible ES
ZincSearchSDK.IndexeSGetMappingGET /es/{index}/_mappingGet index mappings for compatible ES
ZincSearchSDK.IndexesExistsHEAD /es/{index}Checks if the index exists for compatible ES
ZincSearchSDK.IndexexistsHEAD /api/index/{index}Checks if the index exists
ZincSearchSDK.IndexgetESAliasesGET /es/{target}/_alias/{target_alias}Get index alias for compatible ES
ZincSearchSDK.IndexgetIndexGET /api/index/{index}Get index metadata
ZincSearchSDK.IndexgetMappingGET /api/{index}/_mappingGet index mappings
ZincSearchSDK.IndexgetSettingsGET /api/{index}/_settingsGet index settings
ZincSearchSDK.IndexgetTemplateGET /es/_index_template/{name}Get index template
ZincSearchSDK.IndexindexNameListGET /api/index_nameList index Name
ZincSearchSDK.IndexlistGET /api/indexList indexes
ZincSearchSDK.IndexlistTemplatesGET /es/_index_templateList index teplates
ZincSearchSDK.IndexrefreshPOST /api/index/{index}/refreshResfresh index
ZincSearchSDK.IndexsetMappingPUT /api/{index}/_mappingSet index mappings
ZincSearchSDK.IndexsetSettingsPUT /api/{index}/_settingsSet index Settings
ZincSearchSDK.IndexupdateTemplatePUT /es/_index_template/{name}Create update index template
ZincSearchSDK.SearchdeleteByQueryPOST /es/{index}/_delete_by_querySearches the index and deletes all matched documents
ZincSearchSDK.SearchmSearchPOST /es/_msearchSearch V2 MultipleSearch for compatible ES
ZincSearchSDK.SearchsearchPOST /es/{index}/_searchSearch V2 DSL for compatible ES
ZincSearchSDK.SearchsearchV1POST /api/{index}/_searchSearch V1
ZincSearchSDK.UserdeleteDELETE /api/user/{id}Delete user
ZincSearchSDK.UsercreatePOST /api/userCreate user
ZincSearchSDK.UserlistGET /api/userList user
ZincSearchSDK.UserloginPOST /api/loginLogin
ZincSearchSDK.UserupdatePUT /api/userUpdate user

Documentation for Models

Documentation for Authorization

basicAuth

  • Type: HTTP basic authentication

FAQs

Last updated on 21 Sep 2022

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc