-
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.
- Loading branch information
Showing
5 changed files
with
100 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import Analytics from './location/analytics'; | ||
|
||
/** | ||
* A namespaced client for the | ||
* `/v1/location` endpoints | ||
* | ||
* Access via the {@link Amadeus} object | ||
* | ||
* ```js | ||
* let amadeus = new Amadeus(); | ||
* amadeus.location; | ||
* ``` | ||
* | ||
* @param {Client} client | ||
* @property {analytics} analytics | ||
*/ | ||
class Location { | ||
constructor(client) { | ||
this.client = client; | ||
this.analytics = new Analytics(client); | ||
} | ||
} | ||
|
||
export default Location; |
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,24 @@ | ||
import CategoryRatedAreas from './analytics/category_rated_areas'; | ||
|
||
/** | ||
* A namespaced client for the | ||
* `/v1/location/analytics` endpoints | ||
* | ||
* Access via the {@link Amadeus} object | ||
* | ||
* ```js | ||
* let amadeus = new Amadeus(); | ||
* amadeus.location; | ||
* ``` | ||
* | ||
* @param {Client} client | ||
* @property {analytics} CategoryRatedAreas | ||
*/ | ||
class Analytics { | ||
constructor(client) { | ||
this.client = client; | ||
this.categoryRatedAreas = new CategoryRatedAreas(client); | ||
} | ||
} | ||
|
||
export default Analytics; |
44 changes: 44 additions & 0 deletions
44
src/amadeus/namespaces/location/analytics/category_rated_areas.js
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,44 @@ | ||
/** | ||
* A namespaced client for the | ||
* `/v1/location/analytics/category-rated-areas` endpoints | ||
* | ||
* Access via the {@link Amadeus} object | ||
* | ||
* ```js | ||
* let amadeus = new Amadeus(); | ||
* amadeus.referenceData.locations.pointsOfInterest; | ||
* ``` | ||
* | ||
* @param {Client} client | ||
*/ | ||
class CategoryRatedAreas { | ||
constructor(client) { | ||
this.client = client; | ||
} | ||
|
||
/** | ||
* Gets popularity score for location categories | ||
* | ||
* @param {Object} params | ||
* @param {Double} params.latitude latitude location to be at the center of | ||
* the search circle - required | ||
* @param {Double} params.longitude longitude location to be at the center of | ||
* the search circle - required | ||
* @param {Double} params.radius radius of the search in Kilometer - optional | ||
* @return {Promise.<Response,ResponseError>} a Promise | ||
* | ||
* ets popularity score for location categories in Barcelona | ||
* | ||
* ```js | ||
* amadeus.location.analytics.categoryRatedAreas.get({ | ||
* longitude: 2.160873, | ||
* latitude: 41.397158 | ||
* }); | ||
* ``` | ||
*/ | ||
get(params = {}) { | ||
return this.client.get('/v1/location/analytics/category-rated-areas', params); | ||
} | ||
} | ||
|
||
export default CategoryRatedAreas; |