Skip to content

Files

Latest commit

c75373b · May 15, 2024

History

History

ruby

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
Oct 4, 2021
Apr 11, 2024
Oct 4, 2021
Apr 11, 2024
Oct 20, 2021
May 15, 2024
Mar 23, 2023
Nov 23, 2022
Feb 17, 2022
Oct 4, 2021
Apr 11, 2024
Oct 12, 2021

API Clients Quickstarts: Ruby

This quickstart demonstrates various usages of the the Algolia Ruby API Client.

Setting up the quickstart

Prerequisites

Using VSCode

By using VScode and having the Visual Studio Code Remote - Containers extension installed, you can run any of the quickstarts by using the command Remote-Containers: Open Folder in Container command.

Each of the quickstart contains a .devcontainer.json, along with a Dockerfile.

  1. Create an Algolia Application and an Algolia Index
  2. Copy the file .env.example and rename it to .env
  3. Set the environment variables ALGOLIA_APP_ID, ALGOLIA_API_KEY and ALGOLIA_INDEX_NAME in the .env file. You can obtain those from the Algolia Dashboard. The ALGOLIA_API_KEY should be the "Admin API Key" (necessary for indexing).

How to use

Once setup, you can run each of the script in this folder using the PHP command line. Example: to execute the simple.rb script:

ruby simple.rb

Available quickstarts

File Description
simple.rb Index a single object and run a search query
indexing.rb Showcase of the main indexing methods