1.0.2 • Published 5 months ago

@rededor/search-api-sdk v1.0.2

Weekly downloads
-
License
ISC
Repository
-
Last release
5 months ago

Search API Javascript SDK

Biblioteca para consumo da Search API para consultas cacheadas ao Algolia.

O construtor recebe 3 parâmetros:

  • environment: development (default) | staging | production.
  • application: identificação da aplicação. Ex: portal-rdsl, agendamento-consultas-frontend, etc.
  • clientId: Sensedia client ID.

Utilização:

Instale o pacote npm i @rededor/search-api-sdk.

  import { SearchAPISDK } from "./index.js";

  const searchAPI = new SearchAPISDK('development', 'testing-application', '100f5ff2-f31f-4606-86cc-23323323');
  const test = async() => {
    const result = await searchAPI.search([{
      "indexName": "prd_medicos_site",
      "query": "Latif",
      "params": { 
          "page": 0,
          "hitsPerPage": 100,
          "filters": "UNIDADES.FLAG_UNIDADE_ATIVA_AGENDAMENTO:S AND (UNIDADES.ID_DQ_FRENTE_NEGOCIOS:1 OR UNIDADES.ID_DQ_FRENTE_NEGOCIOS:8)"
    
      }
    }])
    return result;
  }
1.0.2

5 months ago

1.0.1

1 year ago

1.0.0

1 year ago