Skip to content

Commit b752400

Browse files
authored
Merge branch 'main' into chore/guides
2 parents cfdc695 + 17592e5 commit b752400

File tree

29 files changed

+180
-44
lines changed

29 files changed

+180
-44
lines changed
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
<!-- centered logo -->
2+
<p align="center">
3+
<a href="https://www.algolia.com">
4+
<img alt="Algolia for Dart" src="https://raw.githubusercontent.com/algolia/algoliasearch-client-common/master/banners/dart.png" >
5+
</a>
6+
</p>
7+
8+
<!-- centered badges -->
9+
<p align="center">
10+
<a href="https://pub.dartlang.org/packages/algolia_client_composition"><img src="https://img.shields.io/pub/v/algolia_client_composition.svg" alt="Latest version"></a>
11+
<a href="https://pub.dev/packages/algolia_client_composition/publisher"><img src="https://img.shields.io/pub/publisher/algolia_client_composition.svg" alt="Publisher"></a>
12+
</p>
13+
14+
<h3 align="center">
15+
<strong>Algolia Composition API Client</strong>
16+
</h3>
17+
18+
<p align="center">
19+
The Algolia Composition API Client allows you to enrich your search queries by using compositions.
20+
</p>
21+
22+
## 💡 Installation
23+
24+
Add Algolia Composition API Client as a dependency in your project directly from pub.dev:
25+
26+
#### For Dart projects:
27+
28+
```shell
29+
dart pub add algolia_client_composition
30+
```
31+
32+
#### For Flutter projects:
33+
34+
```shell
35+
flutter pub add algolia_client_composition
36+
```
37+
38+
## License
39+
40+
Algolia API Client is an open-sourced software licensed under the [MIT license](LICENSE).

docs/guides/csharp/src/saveObjectsMovies.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ class SaveObjectsMovies
1010
public static async Task Main(string[] args)
1111
{
1212
// read json file from url
13-
var url = "https://dashboard.algolia.com/sample_datasets/movie.json";
13+
var url = "https://dashboard.algolia.com/api/1/sample_datasets?type=movie";
1414
var httpClient = new HttpClient();
1515
var response = await httpClient.GetAsync(url);
1616
var content = await response.Content.ReadAsStringAsync();

docs/guides/dart/lib/saveObjectsMovies.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ void main() async {
88
SearchClient(appId: 'ALGOLIA_APPLICATION_ID', apiKey: 'ALGOLIA_API_KEY');
99

1010
// read json file from url
11-
final datasetRequest = await http.get(
12-
Uri.parse('https://dashboard.algolia.com/sample_datasets/movie.json'));
11+
final datasetRequest = await http.get(Uri.parse(
12+
'https://dashboard.algolia.com/api/1/sample_datasets?type=movie'));
1313

1414
if (datasetRequest.statusCode == 200) {
1515
final moviesData = jsonDecode(datasetRequest.body);

docs/guides/go/src/saveObjectsMovies.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import (
1010

1111
func saveObjectsMovies() {
1212
// read json file
13-
url := "https://dashboard.algolia.com/sample_datasets/movie.json"
13+
url := "https://dashboard.algolia.com/api/1/sample_datasets?type=movie"
1414
response, err := http.Get(url)
1515

1616
if err != nil {

docs/guides/java/src/test/java/com/algolia/saveObjectsMovies.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ public class saveObjectsMovies {
1212

1313
public static void main(String[] args) throws Exception {
1414
// Fetch sample dataset
15-
URL url = new URI("https://dashboard.algolia.com/sample_datasets/movie.json").toURL();
15+
URL url = new URI("https://dashboard.algolia.com/api/1/sample_datasets?type=movie").toURL();
1616
InputStream stream = url.openStream();
1717
ObjectMapper mapper = new ObjectMapper();
1818
List<JsonNode> movies = mapper.readValue(stream, new TypeReference<List<JsonNode>>() {});

docs/guides/javascript/src/saveObjectsMovies.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ const client = algoliasearch('ALGOLIA_APPLICATION_ID', 'ALGOLIA_API_KEY');
44

55
// Fetch and index objects in Algolia
66
const processRecords = async () => {
7-
const datasetRequest = await fetch('https://dashboard.algolia.com/sample_datasets/movie.json');
7+
const datasetRequest = await fetch('https://dashboard.algolia.com/api/1/sample_datasets?type=movie');
88
const movies = await datasetRequest.json();
99
return await client.saveObjects({ indexName: 'movies_index', objects: movies });
1010
};

docs/guides/kotlin/src/main/kotlin/com/algolia/snippets/saveObjectsMovies.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import kotlinx.serialization.json.JsonObject
88
import java.net.URI
99

1010
suspend fun main() {
11-
val url = URI.create("https://dashboard.algolia.com/sample_datasets/movie.json")
11+
val url = URI.create("https://dashboard.algolia.com/api/1/sample_datasets?type=movie")
1212
val json = url.toURL().readText()
1313
val movies: List<JsonObject> = Json.decodeFromString(ListSerializer(JsonObject.serializer()), json)
1414

docs/guides/php/src/saveObjectsMovies.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
use Algolia\AlgoliaSearch\Api\SearchClient;
44

55
// Fetch sample dataset
6-
$url = "https://dashboard.algolia.com/sample_datasets/movie.json";
6+
$url = "https://dashboard.algolia.com/api/1/sample_datasets?type=movie";
77
$response = file_get_contents($url);
88
$movies = json_decode($response, true);
99

docs/guides/python/saveObjectsMovies.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
async def main():
77
# Fetch sample dataset
8-
url = "https://dashboard.algolia.com/sample_datasets/movie.json"
8+
url = "https://dashboard.algolia.com/api/1/sample_datasets?type=movie"
99
movies = requests.get(url).json()
1010

1111
# Connect and authenticate with your Algolia app

docs/guides/ruby/saveObjectsMovies.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
require "algolia"
33

44
# Fetch sample dataset
5-
uri = URI("https://dashboard.algolia.com/sample_datasets/movie.json")
5+
uri = URI("https://dashboard.algolia.com/api/1/sample_datasets?type=movie")
66
response = Net::HTTP.get_response(uri)
77
movies = JSON.parse(response.body)
88

0 commit comments

Comments
 (0)