@@ -65,24 +65,24 @@ public class Client extends AbstractClient {
65
65
66
66
/**
67
67
* Create a new Algolia Search client targeting the default hosts.
68
- *
68
+ * <p>
69
69
* NOTE: This is the recommended way to initialize a client is most use cases.
70
70
*
71
71
* @param applicationID The application ID (available in your Algolia Dashboard).
72
- * @param apiKey A valid API key for the service.
72
+ * @param apiKey A valid API key for the service.
73
73
*/
74
74
public Client (@ NonNull String applicationID , @ NonNull String apiKey ) {
75
75
this (applicationID , apiKey , null );
76
76
}
77
77
78
78
/**
79
79
* Create a new Algolia Search client with explicit hosts to target.
80
- *
80
+ * <p>
81
81
* NOTE: In most use cases, you should the default hosts. See {@link Client#Client(String, String)}.
82
82
*
83
83
* @param applicationID The application ID (available in your Algolia Dashboard).
84
- * @param apiKey A valid API key for the service.
85
- * @param hosts An explicit list of hosts to target, or null to use the default hosts.
84
+ * @param apiKey A valid API key for the service.
85
+ * @param hosts An explicit list of hosts to target, or null to use the default hosts.
86
86
*/
87
87
public Client (@ NonNull String applicationID , @ NonNull String apiKey , @ Nullable String [] hosts ) {
88
88
super (applicationID , apiKey , hosts , hosts );
@@ -131,7 +131,6 @@ public Client(@NonNull String applicationID, @NonNull String apiKey, @Nullable S
131
131
*
132
132
* @param indexName The name of the index.
133
133
* @return A new proxy to the specified index.
134
- *
135
134
* @deprecated You should now use {@link #getIndex(String)}, which re-uses instances with the same name.
136
135
*/
137
136
public Index initIndex (@ NonNull String indexName ) {
@@ -148,7 +147,7 @@ public Index initIndex(@NonNull String indexName) {
148
147
Index index = null ;
149
148
WeakReference <Object > existingIndex = indices .get (indexName );
150
149
if (existingIndex != null ) {
151
- index = (Index )existingIndex .get ();
150
+ index = (Index ) existingIndex .get ();
152
151
}
153
152
if (index == null ) {
154
153
index = new Index (this , indexName );
@@ -164,7 +163,7 @@ public Index initIndex(@NonNull String indexName) {
164
163
/**
165
164
* List existing indexes.
166
165
*
167
- * @param requestOptions Request-specific options.
166
+ * @param requestOptions Request-specific options.
168
167
* @param completionHandler The listener that will be notified of the request's outcome.
169
168
* @return A cancellable request.
170
169
*/
@@ -191,8 +190,8 @@ public Request listIndexesAsync(@NonNull CompletionHandler completionHandler) {
191
190
/**
192
191
* Delete an index.
193
192
*
194
- * @param indexName Name of index to delete.
195
- * @param requestOptions Request-specific options.
193
+ * @param indexName Name of index to delete.
194
+ * @param requestOptions Request-specific options.
196
195
* @param completionHandler The listener that will be notified of the request's outcome.
197
196
* @return A cancellable request.
198
197
*/
@@ -209,7 +208,7 @@ protected JSONObject run() throws AlgoliaException {
209
208
/**
210
209
* Delete an index.
211
210
*
212
- * @param indexName Name of index to delete.
211
+ * @param indexName Name of index to delete.
213
212
* @param completionHandler The listener that will be notified of the request's outcome.
214
213
* @return A cancellable request.
215
214
*/
@@ -222,9 +221,9 @@ public Request deleteIndexAsync(final @NonNull String indexName, CompletionHandl
222
221
* If the destination index already exists, its specific API keys will be preserved and the source index specific
223
222
* API keys will be added.
224
223
*
225
- * @param srcIndexName Name of index to move.
226
- * @param dstIndexName The new index name.
227
- * @param requestOptions Request-specific options.
224
+ * @param srcIndexName Name of index to move.
225
+ * @param dstIndexName The new index name.
226
+ * @param requestOptions Request-specific options.
228
227
* @param completionHandler The listener that will be notified of the request's outcome.
229
228
* @return A cancellable request.
230
229
*/
@@ -243,8 +242,8 @@ protected JSONObject run() throws AlgoliaException {
243
242
* If the destination index already exists, its specific API keys will be preserved and the source index specific
244
243
* API keys will be added.
245
244
*
246
- * @param srcIndexName Name of index to move.
247
- * @param dstIndexName The new index name.
245
+ * @param srcIndexName Name of index to move.
246
+ * @param dstIndexName The new index name.
248
247
* @param completionHandler The listener that will be notified of the request's outcome.
249
248
* @return A cancellable request.
250
249
*/
@@ -310,9 +309,9 @@ public String toString() {
310
309
/**
311
310
* Run multiple queries, potentially targeting multiple indexes, with one API call.
312
311
*
313
- * @param queries The queries to run.
314
- * @param strategy The strategy to use.
315
- * @param requestOptions Request-specific options.
312
+ * @param queries The queries to run.
313
+ * @param strategy The strategy to use.
314
+ * @param requestOptions Request-specific options.
316
315
* @param completionHandler The listener that will be notified of the request's outcome.
317
316
* @return A cancellable request.
318
317
*/
@@ -329,8 +328,8 @@ protected JSONObject run() throws AlgoliaException {
329
328
/**
330
329
* Run multiple queries, potentially targeting multiple indexes, with one API call.
331
330
*
332
- * @param queries The queries to run.
333
- * @param strategy The strategy to use.
331
+ * @param queries The queries to run.
332
+ * @param strategy The strategy to use.
334
333
* @param completionHandler The listener that will be notified of the request's outcome.
335
334
* @return A cancellable request.
336
335
*/
@@ -341,8 +340,8 @@ public Request multipleQueriesAsync(final @NonNull List<IndexQuery> queries, fin
341
340
/**
342
341
* Batch operations.
343
342
*
344
- * @param operations List of operations.
345
- * @param requestOptions Request-specific options.
343
+ * @param operations List of operations.
344
+ * @param requestOptions Request-specific options.
346
345
* @param completionHandler The listener that will be notified of the request's outcome.
347
346
* @return A cancellable request.
348
347
*/
@@ -359,7 +358,7 @@ protected JSONObject run() throws AlgoliaException {
359
358
/**
360
359
* Batch operations.
361
360
*
362
- * @param operations List of operations.
361
+ * @param operations List of operations.
363
362
* @param completionHandler The listener that will be notified of the request's outcome.
364
363
* @return A cancellable request.
365
364
*/
@@ -377,7 +376,7 @@ public Request batchAsync(final @NonNull JSONArray operations, CompletionHandler
377
376
* @param requestOptions Request-specific options.
378
377
* @return a JSON Object in the form:
379
378
* { "items": [ {"name": "contacts", "createdAt": "2013-01-18T15:33:13.556Z"},
380
- * {"name": "notes", "createdAt": "2013-01-18T15:33:13.556Z"}]}
379
+ * {"name": "notes", "createdAt": "2013-01-18T15:33:13.556Z"}]}
381
380
*/
382
381
protected JSONObject listIndexes (@ Nullable RequestOptions requestOptions ) throws AlgoliaException {
383
382
return getRequest ("/1/indexes/" , /* urlParameters: */ null , false , requestOptions );
@@ -387,7 +386,7 @@ protected JSONObject listIndexes(@Nullable RequestOptions requestOptions) throws
387
386
* Delete an index
388
387
*
389
388
* @param requestOptions Request-specific options.
390
- * @param indexName the name of index to delete
389
+ * @param indexName the name of index to delete
391
390
* @return an object containing a "deletedAt" attribute
392
391
*/
393
392
protected JSONObject deleteIndex (String indexName , @ Nullable RequestOptions requestOptions ) throws AlgoliaException {
@@ -401,8 +400,8 @@ protected JSONObject deleteIndex(String indexName, @Nullable RequestOptions requ
401
400
/**
402
401
* Move an existing index.
403
402
*
404
- * @param srcIndexName the name of index to copy.
405
- * @param dstIndexName the new index name that will contains a copy of srcIndexName (destination will be overriten if it already exist).
403
+ * @param srcIndexName the name of index to copy.
404
+ * @param dstIndexName the new index name that will contains a copy of srcIndexName (destination will be overriten if it already exist).
406
405
* @param requestOptions Request-specific options.
407
406
*/
408
407
protected JSONObject moveIndex (String srcIndexName , String dstIndexName , @ Nullable RequestOptions requestOptions ) throws AlgoliaException {
@@ -460,7 +459,7 @@ protected JSONObject multipleQueries(List<IndexQuery> queries, String strategy,
460
459
/**
461
460
* Custom batch
462
461
*
463
- * @param actions the array of actions
462
+ * @param actions the array of actions
464
463
* @param requestOptions Request-specific options.
465
464
* @throws AlgoliaException if the response is not valid json
466
465
*/
0 commit comments