Giter VIP home page Giter VIP logo

olingard / algoliasearch-client-javascript Goto Github PK

View Code? Open in Web Editor NEW

This project forked from algolia/algoliasearch-client-javascript

0.0 0.0 0.0 11.85 MB

⚡️ A fully-featured and blazing-fast JavaScript API client to interact with Algolia.

Home Page: https://www.algolia.com/doc/api-client/javascript/getting-started/

License: MIT License

Shell 0.10% JavaScript 5.38% TypeScript 94.37% HTML 0.07% Dockerfile 0.09%

algoliasearch-client-javascript's Introduction

Algolia for JavaScript

The perfect starting point to integrate Algolia within your JavaScript project

NPM version NPM downloads jsDelivr Downloads License

DocumentationInstantSearchCommunity ForumStack OverflowReport a bugFAQSupport

Migration note from v3.x to v4.x

In February 2020, we released v4 of our JavaScript client. If you are using version 3.x of the client, read the migration guide to version 4.x. Version 3.x will no longer be under active development.

✨ Features

  • Thin & minimal low-level HTTP client to interact with Algolia's API
  • Works both on the browser and node.js
  • UMD compatible, you can use it with any module loader
  • Built with TypeScript

⏭ Next

The next branch hosts the code of the new major version (v5). This version is generated from the API Clients Automation monorepo which is where you can follow the development and make contributions.

💡 Getting Started

First, install Algolia JavaScript API Client via the npm package manager:

npm install algoliasearch

Then, create objects on your index:

const algoliasearch = require('algoliasearch');

const client = algoliasearch('YourApplicationID', 'YourAdminAPIKey');
const index = client.initIndex('your_index_name');

const objects = [
  {
    objectID: 1,
    name: 'Foo',
  },
];

index
  .saveObjects(objects)
  .then(({ objectIDs }) => {
    console.log(objectIDs);
  })
  .catch(err => {
    console.log(err);
  });

Finally, let's actually search using the search method:

index
  .search('Fo')
  .then(({ hits }) => {
    console.log(hits);
  })
  .catch(err => {
    console.log(err);
  });

For full documentation, visit the online documentation.

❓ Troubleshooting

Encountering an issue? Before reaching out to support, we recommend heading to our FAQ where you will find answers for the most common issues and gotchas with the client.

📄 License

Algolia JavaScript API Client is an open-sourced software licensed under the MIT license.

algoliasearch-client-javascript's People

Contributors

nunomaduro avatar vvo avatar redox avatar haroenv avatar speedblue avatar algoliareadmebot avatar instantsearch-bot avatar seafoox avatar francoischalifour avatar shortcuts avatar pixelastic avatar dessaigne avatar sarahdayan avatar millotp avatar dependabot-preview[bot] avatar kombucha avatar aseure avatar chloelbn avatar cdhawke avatar cbaptiste avatar plnech avatar yannickcr avatar samouss avatar bodinsamuel avatar elpicador avatar robertmogos avatar rayrutjes avatar peterdavehello avatar oliviertassinari avatar mikecook 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.