Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@findhotel/sapi

Package Overview
Dependencies
Maintainers
3
Versions
194
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@findhotel/sapi - npm Package Compare versions

Comparing version 0.22.8 to 0.22.9

5

CHANGELOG.md

@@ -0,1 +1,6 @@

## [0.22.9](https://github.com/FindHotel/sapi/compare/v0.22.8...v0.22.9) (2021-11-24)
### Added
- Added missing field to suggest method
## [0.22.8](https://github.com/FindHotel/sapi/compare/v0.22.7...v0.22.8) (2021-11-16)

@@ -2,0 +7,0 @@ ### Added

2

dist/types/packages/core/src/__fixtures__/suggest.d.ts

@@ -46,2 +46,3 @@ export declare const placeSuggestHit: {

objectID: string;
objectType: string;
placeDisplayName: string;

@@ -81,2 +82,3 @@ placeTypeName: string;

objectID: string;
objectType: string;
placeDisplayName: string;

@@ -83,0 +85,0 @@ placeTypeName: string;

@@ -188,2 +188,3 @@ /**

objectID: string;
objectType: string;
placeDisplayName: string;

@@ -190,0 +191,0 @@ placeTypeName: PlaceTypeName;

2

package.json
{
"name": "@findhotel/sapi",
"version": "0.22.8",
"version": "0.22.9",
"description": "FindHotel Search API",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

@@ -18,3 +18,6 @@

3. [Response](#search-response)
3. [`rooms()` method](#rooms-method)
3. [`suggest()` method](#suggest-method)
1. [Suggest parameters](#suggest-parameters)
2. [Response](#suggest-response)
4. [`rooms()` method](#rooms-method)
1. [Rooms parameters](#rooms-parameters)

@@ -490,2 +493,107 @@ 2. [Response](#rooms-response)

<a id="suggest-method"></a>
## `suggest()` method
Suggest provides autosuggestions for a given query
const suggestions = await sapiClient.suggest('London', 6)
<a id="suggest-parameters"></a>
### Suggest parameters
<table border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
<colgroup>
<col class="org-left" />
<col class="org-left" />
<col class="org-left" />
<col class="org-left" />
<col class="org-left" />
</colgroup>
<thead>
<tr>
<th scope="col" class="org-left">name</th>
<th scope="col" class="org-left">type</th>
<th scope="col" class="org-left">description</th>
<th scope="col" class="org-left">required</th>
<th scope="col" class="org-left">example</th>
</tr>
</thead>
<tbody>
<tr>
<td class="org-left">`query`</td>
<td class="org-left">`string`</td>
<td class="org-left">Query string</td>
<td class="org-left">yes</td>
<td class="org-left">`London`</td>
</tr>
<tr>
<td class="org-left">`suggestsCount`</td>
<td class="org-left">`number`</td>
<td class="org-left">Desired number of suggestions (default 6)</td>
<td class="org-left">no</td>
<td class="org-left">`10`</td>
</tr>
</tbody>
</table>
<a id="suggest-response"></a>
### Response
const suggestions = await sapiClient.suggest('London', 2)
[
{
highlightValue: "<em>London</em>",
objectID: "158584",
objectType: "place",
placeDisplayName: "United Kingdom",
placeTypeName: "city",
value: "London"
},
{
highlightValue: "<em>London</em> Heathrow Airport",
objectID: "167733",
objectType: "place",
placeDisplayName: "London, United Kingdom",
placeTypeName: "airport",
value: "London Heathrow Airport"
}
]
const suggestions = await sapiClient.suggest('London hotel', 2)
[
{
highlightValue: "Park Plaza Westminster Bridge <em>London</em>",
objectID: "1546646",
objectType: "hotel",
placeDisplayName: "London, United Kingdom",
placeTypeName: "property",
value: "Park Plaza Westminster Bridge London"
},
{
highlightValue: "Hampton by Hilton <em>London</em> Stansted Airport",
objectID: "3333916",
objectType: "hotel",
placeDisplayName: "United Kingdom",
placeTypeName: "property",
value: "Hampton by Hilton London Stansted Airport"
}
]
<a id="rooms-method"></a>

@@ -492,0 +600,0 @@

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc