@findhotel/sapi 1.20.1 → 1.20.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +95 -128
- package/dist/types/packages/core/src/types/types.d.ts +7 -5
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -671,156 +671,123 @@ the state can be repeated between different callbacks.
|
|
|
671
671
|
The complete SAPI search response is too big to be displayed on the page
|
|
672
672
|
so there is a simplified example:
|
|
673
673
|
|
|
674
|
+
```json
|
|
674
675
|
```json
|
|
675
676
|
{
|
|
676
677
|
"anchor": {
|
|
677
|
-
"admDivisionLevel1": "The Netherlands",
|
|
678
|
-
"admDivisionLevel2": "Amsterdam",
|
|
679
|
-
"admDivisionLevel3": "Bedrijventerrein Sloterdijk",
|
|
680
|
-
"hotelName": "Holiday Inn Express Amsterdam - Sloterdijk Station, an IHG Hotel",
|
|
681
|
-
"objectID": "hotel:1714808",
|
|
682
|
-
"objectType": "hotel",
|
|
683
|
-
"pageSize": 26,
|
|
684
|
-
"placeDisplayName": "Bedrijventerrein Sloterdijk, Amsterdam",
|
|
685
|
-
"priceBucketWidth": 19,
|
|
686
678
|
"_geoloc": {
|
|
687
|
-
"lat":
|
|
688
|
-
"lon":
|
|
679
|
+
"lat": -6.28067,
|
|
680
|
+
"lon": 39.53601,
|
|
689
681
|
"precision": 5000,
|
|
690
682
|
"radius": 20000
|
|
691
|
-
}
|
|
683
|
+
},
|
|
684
|
+
"objectID": "hotel:9660485",
|
|
685
|
+
"objectType": "hotel",
|
|
686
|
+
"pageSize": 25,
|
|
687
|
+
"priceBucketWidth": 16,
|
|
688
|
+
"admDivisionLevel1": "Tanzania",
|
|
689
|
+
"navPath": [
|
|
690
|
+
"3429",
|
|
691
|
+
"300878",
|
|
692
|
+
"235186"
|
|
693
|
+
],
|
|
694
|
+
"navPathNames": {
|
|
695
|
+
"country": "Tanzania"
|
|
696
|
+
},
|
|
697
|
+
"navPathInfo": {
|
|
698
|
+
"adminDivision": {
|
|
699
|
+
"id": "12598",
|
|
700
|
+
"name": "Hokkaido Prefecture"
|
|
701
|
+
},
|
|
702
|
+
"city": {
|
|
703
|
+
"id": "43727",
|
|
704
|
+
"name": "Otaru"
|
|
705
|
+
},
|
|
706
|
+
"country": {
|
|
707
|
+
"id": "125948",
|
|
708
|
+
"name": "Japan"
|
|
709
|
+
}
|
|
710
|
+
},
|
|
711
|
+
"hotelName": "Zanzibar White Sand Luxury Villas & Spa - Relais & Chateaux",
|
|
712
|
+
"placeDisplayName": "Zanzibar"
|
|
692
713
|
},
|
|
693
|
-
"anchorHotelId": "1714808",
|
|
694
714
|
"anchorType": "hotel",
|
|
695
|
-
"
|
|
696
|
-
"facilities": { "1": 212, "2": 348, "3": 116 },
|
|
697
|
-
"pricing.medianRateBkt": { "3": 4, "4": 12, "5": 19 },
|
|
698
|
-
"pricing.medianRateMoFrBkt": { "3": 4, "4": 6, "5": 8, "6": 9 },
|
|
699
|
-
"pricing.medianRateSaSuBkt": { "2": 2, "3": 4, "4": 6, "5": 10 },
|
|
700
|
-
"pricing.minRateBkt": { "2": 22, "3": 38, "4": 46, "5": 98 },
|
|
701
|
-
"propertyTypeId": { "0": 1030, "2": 6, "3": 601, "4": 86 },
|
|
702
|
-
"starRating": { "1": 351, "2": 313, "3": 596, "4": 441, "5": 86 },
|
|
703
|
-
"themeIds": { "1": 9, "2": 1373, "3": 143, "5": 1092, "8": 119 }
|
|
704
|
-
},
|
|
715
|
+
"anchorHotelId": "9660485",
|
|
705
716
|
"hotelEntities": {
|
|
706
|
-
"
|
|
707
|
-
"
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
"
|
|
712
|
-
"
|
|
717
|
+
"9660485": {
|
|
718
|
+
"_geoloc": {
|
|
719
|
+
"lat": -6.28067,
|
|
720
|
+
"lon": 39.53601
|
|
721
|
+
},
|
|
722
|
+
"checkInTime": "14:00",
|
|
723
|
+
"checkOutTime": "11:00",
|
|
724
|
+
"country": "TZ",
|
|
725
|
+
"facilities": [
|
|
726
|
+
2, 5, 6, 7, 9, 11, 13, 20, 21, 22, 23, 28, 29, 31, 34, 35, 66, 84, 85, 86, 98, 99, 100, 103, 104, 122, 127, 189, 191, 193, 195, 202, 222, 235, 238, 243, 244, 253, 255, 266, 270, 292, 299
|
|
727
|
+
],
|
|
713
728
|
"guestRating": {
|
|
714
|
-
"cleanliness":
|
|
715
|
-
"dining":
|
|
716
|
-
"facilities":
|
|
717
|
-
"location": 8
|
|
718
|
-
"overall":
|
|
719
|
-
"
|
|
729
|
+
"cleanliness": 9.66,
|
|
730
|
+
"dining": 9.42,
|
|
731
|
+
"facilities": 9.9,
|
|
732
|
+
"location": 9.8,
|
|
733
|
+
"overall": 9.55,
|
|
734
|
+
"rooms": 9.72
|
|
720
735
|
},
|
|
721
736
|
"guestType": {
|
|
722
|
-
"business":
|
|
723
|
-
"couples":
|
|
724
|
-
"families":
|
|
725
|
-
"groups":
|
|
726
|
-
"solo":
|
|
737
|
+
"business": 6,
|
|
738
|
+
"couples": 235,
|
|
739
|
+
"families": 110,
|
|
740
|
+
"groups": 68,
|
|
741
|
+
"solo": 13
|
|
727
742
|
},
|
|
728
|
-
"hotelName": "ibis Amsterdam Centre",
|
|
729
743
|
"imageURIs": [
|
|
730
|
-
"https://
|
|
744
|
+
"https://img.fih.io/image/raw/regular/provider_partition=eps/3xWl0k2P0Ofb7vxD4dr1NhFjOtdQaHXLe2p1tYLaOmw=.webp"
|
|
731
745
|
],
|
|
732
|
-
"
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
"placeDisplayName": "Burgwallen-Nieuwe Zijde, Amsterdam",
|
|
737
|
-
"pricing": {
|
|
738
|
-
"medianRateBkt": 12,
|
|
739
|
-
"medianRateMoFrBkt": 13,
|
|
740
|
-
"medianRateSaSuBkt": 11,
|
|
741
|
-
"minRate": 116,
|
|
742
|
-
"minRateInUserCurrency": 200,
|
|
743
|
-
"minRateBkt": 75,
|
|
744
|
-
"minRateBkt": 5,
|
|
745
|
-
"priced": 1
|
|
746
|
-
},
|
|
747
|
-
"propertyTypeId": 0,
|
|
748
|
-
"regularPriceRange": [224, 243],
|
|
749
|
-
"reviewCount": 5766,
|
|
750
|
-
"sentiments": [177, 250, 300, 419],
|
|
751
|
-
"starRating": 3,
|
|
752
|
-
"tags": ["b220918-1"],
|
|
753
|
-
"themeIds": [2, 5, 12],
|
|
754
|
-
"_geoloc": { "lat": 52.37947, "lon": 4.89699 }
|
|
755
|
-
}
|
|
756
|
-
},
|
|
757
|
-
"hotelIds": ["1840170", "2766940", "3310443", "3035769"],
|
|
758
|
-
"hotelOfferEntities": {
|
|
759
|
-
"1041597": {
|
|
760
|
-
"anchorRate": {
|
|
761
|
-
"base": 244.6021305,
|
|
762
|
-
"hotelFees": 23.122149135,
|
|
763
|
-
"taxes": 20.4147
|
|
764
|
-
},
|
|
765
|
-
"availableOffersCount": 23,
|
|
766
|
-
"cheapestRate": {
|
|
767
|
-
"base": 222.55,
|
|
768
|
-
"taxes": 19.08,
|
|
769
|
-
"hotelFees": 16.17
|
|
770
|
-
},
|
|
771
|
-
"id": "1041597",
|
|
772
|
-
"offers": [
|
|
773
|
-
{
|
|
774
|
-
"id": "o5vFF4-wmvcc",
|
|
775
|
-
"currency": "EUR",
|
|
776
|
-
"availableRooms": 6,
|
|
777
|
-
"url": "https://r.vio.com?...",
|
|
778
|
-
"rate": {
|
|
779
|
-
"base": 197.17,
|
|
780
|
-
"taxes": 17.75,
|
|
781
|
-
"hotelFees": 31.8
|
|
782
|
-
},
|
|
783
|
-
"accessTier": "",
|
|
784
|
-
"providerCode": "BKS",
|
|
785
|
-
"intermediaryProvider": "BKS",
|
|
786
|
-
"roomName": "Standard Twin Room",
|
|
787
|
-
"package": {
|
|
788
|
-
"amenities": ["breakfast"],
|
|
789
|
-
"canPayLater": false
|
|
790
|
-
},
|
|
791
|
-
"cancellationPenalties": [],
|
|
792
|
-
"tags": ["top_offer"],
|
|
793
|
-
"metadata": {
|
|
794
|
-
"feedID": ""
|
|
795
|
-
}
|
|
796
|
-
}
|
|
746
|
+
"navPath": [
|
|
747
|
+
"3429",
|
|
748
|
+
"300878",
|
|
749
|
+
"235186"
|
|
797
750
|
],
|
|
798
|
-
"
|
|
799
|
-
"
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
751
|
+
"navPathInfo": {
|
|
752
|
+
"adminDivision": {
|
|
753
|
+
"id": "12598",
|
|
754
|
+
"name": "Hokkaido Prefecture"
|
|
755
|
+
},
|
|
756
|
+
"city": {
|
|
757
|
+
"id": "43727",
|
|
758
|
+
"name": "Otaru"
|
|
759
|
+
},
|
|
760
|
+
"country": {
|
|
761
|
+
"id": "125948",
|
|
762
|
+
"name": "Japan"
|
|
763
|
+
}
|
|
803
764
|
}
|
|
804
765
|
}
|
|
805
|
-
},
|
|
806
|
-
"hotelsHaveStaticPosition": true,
|
|
807
|
-
"offset": 0,
|
|
808
|
-
"resultsCount": 26,
|
|
809
|
-
"resultsCountTotal": 3401,
|
|
810
|
-
"searchId": "0f9642a0-eab7-4acb-8313-bc6d19c408f6",
|
|
811
|
-
"searchParameters": {
|
|
812
|
-
"hotelId": "1714808",
|
|
813
|
-
"checkIn": "2022-09-01",
|
|
814
|
-
"checkOut": "2022-09-02",
|
|
815
|
-
"rooms": "2"
|
|
816
|
-
},
|
|
817
|
-
"status": {
|
|
818
|
-
"anchorComplete": true,
|
|
819
|
-
"nonAnchorComplete": true
|
|
820
766
|
}
|
|
821
767
|
}
|
|
822
768
|
```
|
|
823
769
|
|
|
770
|
+
```
|
|
771
|
+
#### navPathInfo
|
|
772
|
+
this structure holds all information about the hotel location(starting from country -> region -> city -> village)
|
|
773
|
+
example:
|
|
774
|
+
```json
|
|
775
|
+
"navPathInfo": {
|
|
776
|
+
"adminDivision": {
|
|
777
|
+
"id": "12598",
|
|
778
|
+
"name": "Hokkaido Prefecture"
|
|
779
|
+
},
|
|
780
|
+
"city": {
|
|
781
|
+
"id": "43727",
|
|
782
|
+
"name": "Otaru"
|
|
783
|
+
},
|
|
784
|
+
"country": {
|
|
785
|
+
"id": "125948",
|
|
786
|
+
"name": "Japan"
|
|
787
|
+
}
|
|
788
|
+
}
|
|
789
|
+
```
|
|
790
|
+
|
|
824
791
|
### Load more results and load more offers for a hotel
|
|
825
792
|
|
|
826
793
|
After the search is complete:
|
|
@@ -237,11 +237,13 @@ export interface NavPathNames {
|
|
|
237
237
|
country?: string;
|
|
238
238
|
}
|
|
239
239
|
export interface NavPathInfo {
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
240
|
+
country?: PlaceInfo;
|
|
241
|
+
city?: PlaceInfo;
|
|
242
|
+
adminDivision?: PlaceInfo;
|
|
243
|
+
}
|
|
244
|
+
export interface PlaceInfo {
|
|
245
|
+
id: string;
|
|
246
|
+
name?: string;
|
|
245
247
|
}
|
|
246
248
|
export interface Hotel extends Omit<Hit, 'hotelName' | 'address' | 'placeDN' | 'placeADName'> {
|
|
247
249
|
displayAddress: string;
|