|
1 | 1 | package org.typesense.api;
|
2 | 2 |
|
3 | 3 |
|
| 4 | +import okhttp3.OkHttpClient; |
| 5 | + |
4 | 6 | import java.util.HashMap;
|
5 | 7 | import java.util.Map;
|
6 | 8 |
|
@@ -32,6 +34,26 @@ public class Client {
|
32 | 34 | public Debug debug;
|
33 | 35 | public MultiSearch multiSearch;
|
34 | 36 |
|
| 37 | + public Client(Configuration configuration, OkHttpClient okHttpClient){ |
| 38 | + this.configuration = configuration; |
| 39 | + this.apiCall = new ApiCall(configuration, okHttpClient); |
| 40 | + collections = new Collections(apiCall); |
| 41 | + this.individualCollections = new HashMap<>(); |
| 42 | + this.aliases = new Aliases(this.apiCall); |
| 43 | + this.individualAliases = new HashMap<>(); |
| 44 | + this.keys = new Keys(this.apiCall); |
| 45 | + this.individualKeys = new HashMap<>(); |
| 46 | + this.health = new Health(this.apiCall); |
| 47 | + this.operations = new Operations(this.apiCall); |
| 48 | + this.metrics = new Metrics(this.apiCall); |
| 49 | + this.debug = new Debug(this.apiCall); |
| 50 | + this.multiSearch = new MultiSearch(this.apiCall); |
| 51 | + this.analytics = new Analytics(this.apiCall); |
| 52 | + this.stemming = new Stemming(this.apiCall); |
| 53 | + this.stopwords = new Stopwords(this.apiCall); |
| 54 | + this.individualStopwordsSets = new HashMap<>(); |
| 55 | + } |
| 56 | + |
35 | 57 | public Client(Configuration configuration){
|
36 | 58 | this.configuration = configuration;
|
37 | 59 | this.apiCall = new ApiCall(configuration);
|
|
0 commit comments