Coder Social home page Coder Social logo

kamilkisiela / algoliasearch-client-javascript Goto Github PK

View Code? Open in Web Editor NEW

This project forked from algolia/algoliasearch-client-javascript

0.0 2.0 0.0 11.6 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

HTML 0.08% JavaScript 5.92% Shell 0.11% TypeScript 93.88%

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

💡 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

algoliareadmebot avatar aseure avatar bobylito avatar bodinsamuel avatar cbaptiste avatar chloelbn avatar dependabot-preview[bot] avatar dessaigne avatar elpicador avatar eugenehlushko avatar explodingcabbage avatar francoischalifour avatar haroenv avatar kombucha avatar lukasdrgon avatar mikecook avatar nunomaduro avatar oliviertassinari avatar peterdavehello avatar pixelastic avatar plnech avatar rayrutjes avatar redox avatar robertmogos avatar samouss avatar sarahdayan avatar seafoox avatar speedblue avatar vvo avatar yannickcr avatar

Watchers

 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.