Skip to content

Commit 47bda49

Browse files
committed
Remove whitespace after url for consistency between methods
1 parent a0aa01e commit 47bda49

File tree

1 file changed

+0
-34
lines changed

1 file changed

+0
-34
lines changed

src/index.ts

Lines changed: 0 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,6 @@ class Index<T> implements Types.IndexInterface<T> {
298298
*/
299299
async getRawInfo(): Promise<Types.IndexResponse> {
300300
const url = Index.routeConstructors.indexRoute(this.uid)
301-
302301
const res = await this.httpRequest.get<Types.IndexResponse>(url)
303302
this.primaryKey = res.primaryKey
304303
return res
@@ -335,7 +334,6 @@ class Index<T> implements Types.IndexInterface<T> {
335334
options: Types.IndexOptions = {}
336335
): Promise<Index<T>> {
337336
const url = Index.apiRoutes.indexes
338-
339337
const req = new HttpRequests(config)
340338
const index = await req.post(url, { ...options, uid })
341339
return new Index(config, uid, index.primaryKey)
@@ -348,7 +346,6 @@ class Index<T> implements Types.IndexInterface<T> {
348346
*/
349347
async update(data: Types.IndexOptions): Promise<this> {
350348
const url = Index.routeConstructors.update(this.uid)
351-
352349
const index = await this.httpRequest.put(url, data)
353350
this.primaryKey = index.primaryKey
354351
return this
@@ -361,7 +358,6 @@ class Index<T> implements Types.IndexInterface<T> {
361358
*/
362359
async delete(): Promise<void> {
363360
const url = Index.routeConstructors.delete(this.uid)
364-
365361
return await this.httpRequest.delete(url)
366362
}
367363

@@ -376,7 +372,6 @@ class Index<T> implements Types.IndexInterface<T> {
376372
*/
377373
async getStats(): Promise<Types.IndexStats> {
378374
const url = `/indexes/${this.uid}/stats`
379-
380375
return await this.httpRequest.get<Types.IndexStats>(url)
381376
}
382377
///
@@ -410,7 +405,6 @@ class Index<T> implements Types.IndexInterface<T> {
410405
*/
411406
async getDocument(documentId: string | number): Promise<Types.Document<T>> {
412407
const url = Index.routeConstructors.getDocument(this.uid, documentId)
413-
414408
return await this.httpRequest.get<Types.Document<T>>(url)
415409
}
416410

@@ -424,7 +418,6 @@ class Index<T> implements Types.IndexInterface<T> {
424418
options?: Types.AddDocumentParams
425419
): Promise<Types.EnqueuedUpdate> {
426420
const url = Index.routeConstructors.addDocuments(this.uid)
427-
428421
return await this.httpRequest.post(url, documents, options)
429422
}
430423

@@ -438,7 +431,6 @@ class Index<T> implements Types.IndexInterface<T> {
438431
options?: Types.AddDocumentParams
439432
): Promise<Types.EnqueuedUpdate> {
440433
const url = Index.routeConstructors.updateDocuments(this.uid)
441-
442434
return await this.httpRequest.put(url, documents, options)
443435
}
444436

@@ -451,7 +443,6 @@ class Index<T> implements Types.IndexInterface<T> {
451443
documentId: string | number
452444
): Promise<Types.EnqueuedUpdate> {
453445
const url = Index.routeConstructors.deleteDocument(this.uid, documentId)
454-
455446
return await this.httpRequest.delete<Types.EnqueuedUpdate>(url)
456447
}
457448

@@ -475,7 +466,6 @@ class Index<T> implements Types.IndexInterface<T> {
475466
*/
476467
async deleteAllDocuments(): Promise<Types.EnqueuedUpdate> {
477468
const url = Index.routeConstructors.deleteAllDocuments(this.uid)
478-
479469
return await this.httpRequest.delete<Types.EnqueuedUpdate>(url)
480470
}
481471

@@ -490,7 +480,6 @@ class Index<T> implements Types.IndexInterface<T> {
490480
*/
491481
async getSettings(): Promise<Types.Settings> {
492482
const url = Index.routeConstructors.getSettings(this.uid)
493-
494483
return await this.httpRequest.get<Types.Settings>(url)
495484
}
496485

@@ -504,7 +493,6 @@ class Index<T> implements Types.IndexInterface<T> {
504493
settings: Types.Settings
505494
): Promise<Types.EnqueuedUpdate> {
506495
const url = Index.routeConstructors.updateSettings(this.uid)
507-
508496
return await this.httpRequest.post(url, settings)
509497
}
510498

@@ -515,7 +503,6 @@ class Index<T> implements Types.IndexInterface<T> {
515503
*/
516504
async resetSettings(): Promise<Types.EnqueuedUpdate> {
517505
const url = Index.routeConstructors.resetSettings(this.uid)
518-
519506
return await this.httpRequest.delete<Types.EnqueuedUpdate>(url)
520507
}
521508

@@ -530,7 +517,6 @@ class Index<T> implements Types.IndexInterface<T> {
530517
*/
531518
async getSynonyms(): Promise<object> {
532519
const url = Index.routeConstructors.getSynonyms(this.uid)
533-
534520
return await this.httpRequest.get<object>(url)
535521
}
536522

@@ -541,7 +527,6 @@ class Index<T> implements Types.IndexInterface<T> {
541527
*/
542528
async updateSynonyms(synonyms: object): Promise<Types.EnqueuedUpdate> {
543529
const url = Index.routeConstructors.updateSynonyms(this.uid)
544-
545530
return await this.httpRequest.post(url, synonyms)
546531
}
547532

@@ -552,7 +537,6 @@ class Index<T> implements Types.IndexInterface<T> {
552537
*/
553538
async resetSynonyms(): Promise<Types.EnqueuedUpdate> {
554539
const url = Index.routeConstructors.resetSynonyms(this.uid)
555-
556540
return await this.httpRequest.delete<Types.EnqueuedUpdate>(url)
557541
}
558542

@@ -567,7 +551,6 @@ class Index<T> implements Types.IndexInterface<T> {
567551
*/
568552
async getStopWords(): Promise<string[]> {
569553
const url = Index.routeConstructors.getStopWords(this.uid)
570-
571554
return await this.httpRequest.get<string[]>(url)
572555
}
573556

@@ -578,7 +561,6 @@ class Index<T> implements Types.IndexInterface<T> {
578561
*/
579562
async updateStopWords(stopWords: string[]): Promise<Types.EnqueuedUpdate> {
580563
const url = Index.routeConstructors.updateStopWords(this.uid)
581-
582564
return await this.httpRequest.post(url, stopWords)
583565
}
584566

@@ -589,7 +571,6 @@ class Index<T> implements Types.IndexInterface<T> {
589571
*/
590572
async resetStopWords(): Promise<Types.EnqueuedUpdate> {
591573
const url = Index.routeConstructors.resetStopWords(this.uid)
592-
593574
return await this.httpRequest.delete<Types.EnqueuedUpdate>(url)
594575
}
595576

@@ -604,7 +585,6 @@ class Index<T> implements Types.IndexInterface<T> {
604585
*/
605586
async getRankingRules(): Promise<string[]> {
606587
const url = Index.routeConstructors.getRankingRules(this.uid)
607-
608588
return await this.httpRequest.get<string[]>(url)
609589
}
610590

@@ -617,7 +597,6 @@ class Index<T> implements Types.IndexInterface<T> {
617597
rankingRules: string[]
618598
): Promise<Types.EnqueuedUpdate> {
619599
const url = Index.routeConstructors.updateRankingRules(this.uid)
620-
621600
return await this.httpRequest.post(url, rankingRules)
622601
}
623602

@@ -628,7 +607,6 @@ class Index<T> implements Types.IndexInterface<T> {
628607
*/
629608
async resetRankingRules(): Promise<Types.EnqueuedUpdate> {
630609
const url = Index.routeConstructors.resetRankingRules(this.uid)
631-
632610
return await this.httpRequest.delete<Types.EnqueuedUpdate>(url)
633611
}
634612

@@ -643,7 +621,6 @@ class Index<T> implements Types.IndexInterface<T> {
643621
*/
644622
async getDistinctAttribute(): Promise<string | null> {
645623
const url = Index.routeConstructors.getDistinctAttribute(this.uid)
646-
647624
return await this.httpRequest.get<string | null>(url)
648625
}
649626

@@ -656,7 +633,6 @@ class Index<T> implements Types.IndexInterface<T> {
656633
distinctAttribute: string
657634
): Promise<Types.EnqueuedUpdate> {
658635
const url = Index.routeConstructors.updateDistinctAttribute(this.uid)
659-
660636
return await this.httpRequest.post(url, distinctAttribute)
661637
}
662638

@@ -667,7 +643,6 @@ class Index<T> implements Types.IndexInterface<T> {
667643
*/
668644
async resetDistinctAttribute(): Promise<Types.EnqueuedUpdate> {
669645
const url = Index.routeConstructors.resetDistinctAttribute(this.uid)
670-
671646
return await this.httpRequest.delete<Types.EnqueuedUpdate>(url)
672647
}
673648

@@ -682,7 +657,6 @@ class Index<T> implements Types.IndexInterface<T> {
682657
*/
683658
async getAttributesForFaceting(): Promise<string[]> {
684659
const url = Index.routeConstructors.getAttributesForFaceting(this.uid)
685-
686660
return await this.httpRequest.get<string[]>(url)
687661
}
688662

@@ -695,7 +669,6 @@ class Index<T> implements Types.IndexInterface<T> {
695669
attributesForFaceting: string[]
696670
): Promise<Types.EnqueuedUpdate> {
697671
const url = Index.routeConstructors.updateAttributesForFaceting(this.uid)
698-
699672
return await this.httpRequest.post(url, attributesForFaceting)
700673
}
701674

@@ -706,7 +679,6 @@ class Index<T> implements Types.IndexInterface<T> {
706679
*/
707680
async resetAttributesForFaceting(): Promise<Types.EnqueuedUpdate> {
708681
const url = Index.routeConstructors.resetAttributesForFaceting(this.uid)
709-
710682
return await this.httpRequest.delete<Types.EnqueuedUpdate>(url)
711683
}
712684

@@ -721,7 +693,6 @@ class Index<T> implements Types.IndexInterface<T> {
721693
*/
722694
async getSearchableAttributes(): Promise<string[]> {
723695
const url = Index.routeConstructors.getSearchableAttributes(this.uid)
724-
725696
return await this.httpRequest.get<string[]>(url)
726697
}
727698

@@ -734,7 +705,6 @@ class Index<T> implements Types.IndexInterface<T> {
734705
searchableAttributes: string[]
735706
): Promise<Types.EnqueuedUpdate> {
736707
const url = Index.routeConstructors.updateSearchableAttributes(this.uid)
737-
738708
return await this.httpRequest.post(url, searchableAttributes)
739709
}
740710

@@ -745,7 +715,6 @@ class Index<T> implements Types.IndexInterface<T> {
745715
*/
746716
async resetSearchableAttributes(): Promise<Types.EnqueuedUpdate> {
747717
const url = Index.routeConstructors.resetSearchableAttributes(this.uid)
748-
749718
return await this.httpRequest.delete<Types.EnqueuedUpdate>(url)
750719
}
751720

@@ -760,7 +729,6 @@ class Index<T> implements Types.IndexInterface<T> {
760729
*/
761730
async getDisplayedAttributes(): Promise<string[]> {
762731
const url = Index.routeConstructors.getDisplayedAttributes(this.uid)
763-
764732
return await this.httpRequest.get<string[]>(url)
765733
}
766734

@@ -773,7 +741,6 @@ class Index<T> implements Types.IndexInterface<T> {
773741
displayedAttributes: string[]
774742
): Promise<Types.EnqueuedUpdate> {
775743
const url = Index.routeConstructors.updateDisplayedAttributes(this.uid)
776-
777744
return await this.httpRequest.post(url, displayedAttributes)
778745
}
779746

@@ -784,7 +751,6 @@ class Index<T> implements Types.IndexInterface<T> {
784751
*/
785752
async resetDisplayedAttributes(): Promise<Types.EnqueuedUpdate> {
786753
const url = Index.routeConstructors.resetDisplayedAttributes(this.uid)
787-
788754
return await this.httpRequest.delete<Types.EnqueuedUpdate>(url)
789755
}
790756
}

0 commit comments

Comments
 (0)