Git Product home page Git Product logo

hamid7x / 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 59.31 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.11% JavaScript 5.42% TypeScript 94.31% HTML 0.08% Dockerfile 0.08%

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 the 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 shortcuts avatar instantsearch-bot avatar seafoox avatar francoischalifour avatar pixelastic avatar raed667 avatar dhayab avatar dessaigne avatar sarahdayan avatar cdhawke avatar aseure avatar kombucha avatar dependabot-preview[bot] avatar millotp avatar chloelbn avatar marialungu avatar cbaptiste avatar plnech avatar yannickcr avatar samouss avatar bodinsamuel avatar elpicador avatar robertmogos avatar rayrutjes 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.