-
Notifications
You must be signed in to change notification settings - Fork 78
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #46 from alnacle/feature/hotel-ratings
Add Hotel Ratings API
- Loading branch information
Showing
6 changed files
with
56 additions
and
2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
from ._hotel_sentiments import HotelSentiments | ||
|
||
__all__ = ['HotelSentiments'] |
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,20 @@ | ||
from amadeus.client.decorator import Decorator | ||
|
||
|
||
class HotelSentiments(Decorator, object): | ||
def get(self, **params): | ||
''' | ||
Provides ratings and sentiments scores for hotels | ||
.. code-block:: python | ||
amadeus.e_reputation.hotel_sentiments.get(hotelIds='TELONMFS,ADNYCCTB']) | ||
:param hotelIds: comma separated string list of amadeus hotel Ids (max | ||
3). These Ids are found in the Hotel Search response. ``"RDLON308"``, | ||
for example for the Radisson Blu Hampshire hotel. | ||
:rtype: amadeus.Response | ||
:raises amadeus.ResponseError: if the request could not be completed | ||
''' | ||
return self.client.get('/v2/e-reputation/hotel-sentiments', **params) |
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,8 @@ | ||
from amadeus.client.decorator import Decorator | ||
from amadeus.e_reputation._hotel_sentiments import HotelSentiments | ||
|
||
|
||
class EReputation(Decorator, object): | ||
def __init__(self, client): | ||
Decorator.__init__(self, client) | ||
self.hotel_sentiments = HotelSentiments(client) |
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 |
---|---|---|
@@ -1,10 +1,12 @@ | ||
from amadeus.namespaces._reference_data import ReferenceData | ||
from amadeus.namespaces._travel import Travel | ||
from amadeus.namespaces._shopping import Shopping | ||
from amadeus.namespaces._e_reputation import EReputation | ||
|
||
|
||
class Core(object): | ||
def __init__(self): | ||
self.reference_data = ReferenceData(self) | ||
self.travel = Travel(self) | ||
self.shopping = Shopping(self) | ||
self.e_reputation = EReputation(self) |
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