Sep 20, 2024
Retrieve a rule
Retrieves a Recommend rule that you previously created in the Algolia dashboard.
Usage
Required ACL:
settings
Copy
1
2
3
4
5
6
7
8
9
10
import algoliasearch.api.RecommendClient
import algoliasearch.config.*
val client = RecommendClient(appId = "ALGOLIA_APPLICATION_ID", apiKey = "ALGOLIA_API_KEY")
val response = client.getRecommendRule(
indexName = "ALGOLIA_INDEX_NAME",
model = RecommendModels.withName("related-products"),
objectID = "objectID"
)
Did you find this page helpful?