-
Notifications
You must be signed in to change notification settings - Fork 69
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding support for POI API's retrieve endpoint
Adding support for POI API's retrieve endpoint
- Loading branch information
Showing
5 changed files
with
60 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
/** | ||
* A namespaced client for the | ||
* `/v1/reference-data/locations/pois` endpoints | ||
* | ||
* Access via the {@link Amadeus} object | ||
* | ||
* ```js | ||
* let amadeus = new Amadeus(); | ||
* amadeus.referenceData.locations.pointOfInterest; | ||
* ``` | ||
* | ||
* @param {Client} client | ||
*/ | ||
class PointOfInterest { | ||
constructor(client, poiId) { | ||
this.client = client; | ||
this._poiId = poiId; | ||
} | ||
|
||
/** | ||
* Extracts the information about point of interest with given ID | ||
* | ||
* Extract the information about point of interest with ID '9CB40CB5D0' | ||
* ```js | ||
* amadeus.referenceData.locations.pointOfInterest('9CB40CB5D0').get(); | ||
* ``` | ||
*/ | ||
get() { | ||
return this.client.get(`/v1/reference-data/locations/pois/${this._poiId}`); | ||
} | ||
} | ||
|
||
export default PointOfInterest; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters