File tree 6 files changed +40
-2
lines changed 6 files changed +40
-2
lines changed Original file line number Diff line number Diff line change @@ -352,8 +352,10 @@ List of supported endpoints
352
352
amadeus.analytics.itinerary_price_metrics.get(originIataCode = ' MAD' , destinationIataCode = ' CDG' ,
353
353
departureDate = ' 2021-03-21' )
354
354
355
- # Covid-19 Area Report
355
+ # Travel Restrictions v1
356
356
amadeus.duty_of_care.diseases.covid19_area_report.get(countryCode = " US" )
357
+ # Travel Restrictions v2
358
+ amadeus.duty_of_care.diseases.covid19_report.get(countryCode = ' US' )
357
359
358
360
# Airline Routes
359
361
amadeus.airline.destinations.get(airlineCode = ' BA' )
Original file line number Diff line number Diff line change 1
1
from amadeus .client .decorator import Decorator
2
2
from amadeus .duty_of_care .diseases import Covid19AreaReport
3
+ from amadeus .duty_of_care .diseases import Covid19Report
3
4
4
5
5
6
class Diseases (Decorator , object ):
6
7
def __init__ (self , client ):
7
8
Decorator .__init__ (self , client )
8
9
self .covid19_area_report = Covid19AreaReport (client )
10
+ self .covid19_report = Covid19Report (client )
Original file line number Diff line number Diff line change 1
1
from ._covid19_area_report import Covid19AreaReport
2
+ from ._covid19_report import Covid19Report
2
3
3
- __all__ = ['Covid19AreaReport' ]
4
+ __all__ = ['Covid19AreaReport' , 'Covid19Report' ]
Original file line number Diff line number Diff line change
1
+ from amadeus .client .decorator import Decorator
2
+
3
+
4
+ class Covid19Report (Decorator , object ):
5
+ def get (self , ** params ):
6
+ '''
7
+ Returns the Covid-19 restrictions on targeted area.
8
+
9
+ .. code-block:: python
10
+
11
+ amadeus.duty_of_care.diseases.covid19_report.get(
12
+ countryCode='US'
13
+ )
14
+
15
+ :param countryCode: Country code following ISO 3166 Alpha-2
16
+ standard, for example ``"US"`` for United States of America
17
+
18
+ :rtype: amadeus.Response
19
+ :raises amadeus.ResponseError: if the request could not be completed
20
+ '''
21
+ return self .client .get (
22
+ '/v2/duty-of-care/diseases/covid19-area-report' , ** params )
Original file line number Diff line number Diff line change @@ -257,6 +257,9 @@ DutyOfCare/Diseases
257
257
.. autoclass :: amadeus.duty_of_care.diseases.Covid19AreaReport
258
258
:members: get
259
259
260
+ .. autoclass :: amadeus.duty_of_care.diseases.Covid19Report
261
+ :members: get
262
+
260
263
Airline/Destinations
261
264
================
262
265
Original file line number Diff line number Diff line change 92
92
93
93
expect (client .duty_of_care ).not_to (be_none )
94
94
expect (client .duty_of_care .diseases .covid19_area_report ).not_to (be_none )
95
+ expect (client .duty_of_care .diseases .covid19_report ).not_to (be_none )
95
96
96
97
expect (client .airline .destinations ).not_to (be_none )
97
98
159
160
160
161
expect (client .duty_of_care .diseases .covid19_area_report .get ).not_to (
161
162
be_none )
163
+ expect (client .duty_of_care .diseases .covid19_report .get ).not_to (be_none )
162
164
163
165
expect (client .airline .destinations .get ).not_to (be_none )
164
166
525
527
'/v1/duty-of-care/diseases/covid19-area-report' , a = 'b'
526
528
))
527
529
530
+ with it ('.duty_of_care.diseases.covid19_report.get' ):
531
+ self .client .duty_of_care .diseases .covid19_report .get (a = 'b' )
532
+ expect (self .client .get ).to (have_been_called_with (
533
+ '/v2/duty-of-care/diseases/covid19-area-report' , a = 'b'
534
+ ))
535
+
528
536
with it ('.reference_data.locations.hotels.by_hotels.get' ):
529
537
self .client .reference_data .locations .hotels .by_hotels .get (
530
538
a = 'b' )
You can’t perform that action at this time.
0 commit comments