Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/algolia/algoliasearch-client-csharp
⚡️ A fully-featured and blazing-fast C# API client to interact with Algolia.
https://github.com/algolia/algoliasearch-client-csharp
algolia algolia-search api-client c-sharp csharp dotnet dotnet-core dotnet-library dotnet-standard search-engine
Last synced: 17 days ago
JSON representation
⚡️ A fully-featured and blazing-fast C# API client to interact with Algolia.
- Host: GitHub
- URL: https://github.com/algolia/algoliasearch-client-csharp
- Owner: algolia
- License: mit
- Created: 2013-07-10T14:52:10.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2024-04-10T12:12:30.000Z (7 months ago)
- Last Synced: 2024-04-11T19:10:20.677Z (7 months ago)
- Topics: algolia, algolia-search, api-client, c-sharp, csharp, dotnet, dotnet-core, dotnet-library, dotnet-standard, search-engine
- Language: C#
- Homepage: https://www.algolia.com/doc/api-client/getting-started/install/csharp/
- Size: 5.35 MB
- Stars: 117
- Watchers: 81
- Forks: 60
- Open Issues: 12
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Codeowners: .github/CODEOWNERS
- Security: SECURITY.md
Awesome Lists containing this project
- awesome-blazingly-fast - algoliasearch-client-csharp - ⚡️ A fully-featured and blazing-fast C# API client to interact with Algolia. (C#)
README
The perfect starting point to integrate Algolia within your .NET project
Documentation •
Community Forum •
Stack Overflow •
Report a bug •
FAQ •
Support## ✨ Features
* Targets .NET Standard:
* `.NET Standard 1.3` to `.NET Standard 2.1`.
* For more details about supported .NET implementations, please see .NET Standard official [page](https://docs.microsoft.com/en-us/dotnet/standard/net-standard?tabs=net-standard-2-1).
* Asynchronous and synchronous methods to interact with Algolia's API
* Thread-safe clients
* Typed requests and responses
* Injectable HTTP client**Migration note from v5.x to v6.x**
>
> In January 2019, we released v6 of our .NET client. If you are using version 5.x of the client, read the [migration guide to version 6.x](https://www.algolia.com/doc/api-client/getting-started/upgrade-guides/csharp/).
Version 5.x will **no longer** be under active development.## 💡 Getting Started
Install the library with the `.NET CLI`:
```sh*
dotnet add package Algolia.Search
```or with the `Nuget Package Manager Console`:
```sh*
Install-Package Algolia.Search
```In 30 seconds, this quick start tutorial will show you how to index and search objects.
#### Initialize the cient
To start, you need to initialize the client. To do this, you need your **Application ID** and **API Key**.
You can find both on [your Algolia account](https://www.algolia.com/api-keys).```csharp
SearchClient client = new SearchClient("YourApplicationID", "YourAPIKey");
SearchIndex index = client.InitIndex("your_index_name");
```#### Push data
Without any prior configuration, you can start indexing contacts in the contacts index using the following code:
```csharp
public class Contact
{
public string ObjectID { get; set; }
public string Name { get; set; }
public int Age { get; set; }
}SearchIndex index = client.InitIndex("contacts");
index.SaveObject(new Contact
{
ObjectID = "ID1",
Name = "Jimmie",
Age = 30
});
```#### Search
You can now search for contacts by `firstname`, `lastname`, `company`, etc. (even with typos):
```csharp
// Synchronous
index.Search(new Query { "jimmie" });// Asynchronous
await index.SearchAsync(new Query { "jimmie" });
```For full documentation, visit the **[Algolia .NET API Client documentation](https://www.algolia.com/doc/api-client/getting-started/install/csharp/)**.
#### ASP.NET
If you're using ASP.NET, checkout the [following tutorial](https://www.algolia.com/doc/api-client/getting-started/tutorials/asp.net/csharp/).## ❓ Troubleshooting
Encountering an issue? Before reaching out to support, we recommend heading to our [FAQ](https://www.algolia.com/doc/api-client/troubleshooting/faq/csharp/) where you will find answers for the most common issues and gotchas with the client.
## Use the Dockerfile
If you want to contribute to this project without installing all its dependencies, you can use our Docker image. Please check our [dedicated guide](DOCKER_README.md) to learn more.
## 📄 License
Algolia .NET API Client is an open-sourced software licensed under the [MIT license](LICENSE.md).