From 34997f64006c38cba6bb8b88685c3858e75fd693 Mon Sep 17 00:00:00 2001 From: Sam Heyman Date: Fri, 6 Apr 2018 17:53:03 +0200 Subject: [PATCH 1/4] typo in README --- README.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.rst b/README.rst index ae89dddd..276cf312 100644 --- a/README.rst +++ b/README.rst @@ -29,7 +29,7 @@ SDK. `__ Getting Started --------------- -To send make your first API call you will need to `register for an +To make your first API call you will need to `register for an Amadeus Developer Account `__ and `set up your first application `__. From 1dc8b75a181c1934255e7408678c718ab6a5b5bf Mon Sep 17 00:00:00 2001 From: Sam Heyman Date: Fri, 6 Apr 2018 18:48:33 +0200 Subject: [PATCH 2/4] renaming Air Traffics endpoint to singular: Air Traffic --- amadeus/travel/_analytics.py | 4 ++-- amadeus/travel/analytics/__init__.py | 4 ++-- .../analytics/{_air_traffics.py => _air_traffic.py} | 6 +++--- docs/index.rst | 2 +- specs/namespaces/namespaces_spec.py | 8 ++++---- 5 files changed, 12 insertions(+), 12 deletions(-) rename amadeus/travel/analytics/{_air_traffics.py => _air_traffic.py} (79%) diff --git a/amadeus/travel/_analytics.py b/amadeus/travel/_analytics.py index 29de50af..a58bd6c5 100644 --- a/amadeus/travel/_analytics.py +++ b/amadeus/travel/_analytics.py @@ -1,10 +1,10 @@ from amadeus.client.decorator import Decorator -from .analytics._air_traffics import AirTraffics +from .analytics._air_traffic import AirTraffic from .analytics._fare_searches import FareSearches class Analytics(Decorator, object): def __init__(self, client): Decorator.__init__(self, client) - self.air_traffics = AirTraffics(client) + self.air_traffic = AirTraffic(client) self.fare_searches = FareSearches(client) diff --git a/amadeus/travel/analytics/__init__.py b/amadeus/travel/analytics/__init__.py index 8bfe56c4..ec44a8ec 100644 --- a/amadeus/travel/analytics/__init__.py +++ b/amadeus/travel/analytics/__init__.py @@ -1,4 +1,4 @@ -from ._air_traffics import AirTraffics +from ._air_traffic import AirTraffic from ._fare_searches import FareSearches -__all__ = ['AirTraffics', 'FareSearches'] +__all__ = ['AirTraffic', 'FareSearches'] diff --git a/amadeus/travel/analytics/_air_traffics.py b/amadeus/travel/analytics/_air_traffic.py similarity index 79% rename from amadeus/travel/analytics/_air_traffics.py rename to amadeus/travel/analytics/_air_traffic.py index 077ecef4..5d9150bf 100644 --- a/amadeus/travel/analytics/_air_traffics.py +++ b/amadeus/travel/analytics/_air_traffic.py @@ -1,14 +1,14 @@ from amadeus.client.decorator import Decorator -class AirTraffics(Decorator, object): +class AirTraffic(Decorator, object): def get(self, **params): ''' Returns a list of air traffic reports. .. code-block:: python - amadeus.travel.analytics.air_traffics.get( + amadeus.travel.analytics.air_traffic.get( origin='LHR', period='2011-01' ) @@ -22,4 +22,4 @@ def get(self, **params): :raises amadeus.ResponseError: if the request could not be completed ''' return self.client.get( - '/v1/travel/analytics/air-traffics', **params) + '/v1/travel/analytics/air-traffic', **params) diff --git a/docs/index.rst b/docs/index.rst index 218a1c22..27e368bd 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -62,7 +62,7 @@ Shopping/Hotels Travel/Analytics ================ -.. autoclass:: amadeus.travel.analytics.AirTraffics +.. autoclass:: amadeus.travel.analytics.AirTraffic :members: get .. autoclass:: amadeus.travel.analytics.FareSearches diff --git a/specs/namespaces/namespaces_spec.py b/specs/namespaces/namespaces_spec.py index c05bb7da..a16e975f 100644 --- a/specs/namespaces/namespaces_spec.py +++ b/specs/namespaces/namespaces_spec.py @@ -23,7 +23,7 @@ expect(client.travel).not_to(be_none) expect(client.travel.analytics).not_to(be_none) - expect(client.travel.analytics.air_traffics).not_to(be_none) + expect(client.travel.analytics.air_traffic).not_to(be_none) expect(client.travel.analytics.fare_searches).not_to(be_none) expect(client.shopping).not_to(be_none) @@ -43,7 +43,7 @@ expect(client.reference_data.locations.get).not_to(be_none) expect(client.reference_data.locations.airports.get).not_to(be_none) - expect(client.travel.analytics.air_traffics.get).not_to(be_none) + expect(client.travel.analytics.air_traffic.get).not_to(be_none) expect(client.travel.analytics.fare_searches.get).not_to(be_none) expect(client.shopping.flight_dates.get).not_to(be_none) @@ -82,8 +82,8 @@ '/v1/reference-data/locations/airports', a='b' )) - with it('.travel.analytics.air_traffics.get'): - self.client.travel.analytics.air_traffics.get(a='b') + with it('.travel.analytics.air_traffic.get'): + self.client.travel.analytics.air_traffic.get(a='b') expect(self.client.get).to(have_been_called_with( '/v1/travel/analytics/air-traffics', a='b' )) From c439a6ff95b5dc253b0265343d8f93440e42e6d8 Mon Sep 17 00:00:00 2001 From: Sam Heyman Date: Fri, 6 Apr 2018 18:56:14 +0200 Subject: [PATCH 3/4] Updating portal url to developers.amadeus.con, and adding stackoverflow url and support email address --- .github/SUPPORT.md | 2 +- README.rst | 34 +++++++++++++++++----------------- setup.py | 2 +- 3 files changed, 19 insertions(+), 19 deletions(-) diff --git a/.github/SUPPORT.md b/.github/SUPPORT.md index 17e7e887..44c79dc0 100644 --- a/.github/SUPPORT.md +++ b/.github/SUPPORT.md @@ -1,3 +1,3 @@ # Amadeus Support -Our [developer support team](https://developer.amadeus.com/developers) is here to help you. You can find us on [Twitter](#), [StackOverflow](#), and [email](#). +Our [developer support team](https://developers.amadeus.com/developers) is here to help you. You can find us on [Twitter](#), [StackOverflow](https://stackoverflow.com/questions/tagged/amadeus), and [email](#). diff --git a/README.rst b/README.rst index 276cf312..4b19c678 100644 --- a/README.rst +++ b/README.rst @@ -8,8 +8,8 @@ Amadeus provides a set of APIs for the travel industry. Flights, Hotels, Locations and more. For more details see the `Python -documentation `__ on -`Amadeus.com `__ and the `class +documentation `__ on +`Amadeus.com `__ and the `class reference `__ here on GitHub. @@ -24,15 +24,15 @@ directly with pip. pip install amadeus==1.0.0b6 **Next**: `Get Started with the Python -SDK. `__ +SDK. `__ Getting Started --------------- To make your first API call you will need to `register for an -Amadeus Developer Account `__ +Amadeus Developer Account `__ and `set up your first -application `__. +application `__. .. code:: py @@ -51,7 +51,7 @@ application `__. print(error) **Next**: `Learn more about checkin -links `__ +links `__ with our Python SDK. Initialization @@ -73,8 +73,8 @@ environment variables ``AMADEUS_CLIENT_ID`` and amadeus = Client() Your credentials can be found on the `Amadeus -dashboard `__. `Sign -up `__ for an account today. +dashboard `__. `Sign +up `__ for an account today. By default the environment for the SDK is the ``test`` environment. To switch to a production (paid-for) environment please switch the hostname @@ -85,7 +85,7 @@ as follows: amadeus = Client(hostname='production') **Next**: `Learn more about our initializing the Python -SDK `__ +SDK `__ in our documentation. Documentation @@ -95,20 +95,20 @@ Amadeus has a large set of APIs, and our documentation is here to get you started today. - `Get - Started `__ + Started `__ documentation - `Initialize the - SDK `__ + SDK `__ - `Find an - Airport `__ + Airport `__ - `Book a - Flight `__ + Flight `__ - `Get Flight - Inspiration `__ + Inspiration `__ Alternatively, head over to our -`Reference `__ +`Reference `__ documentation for in-depth information about every SDK method, it’s arguments and return types. @@ -231,7 +231,7 @@ Help ---- Our `developer support -team `__ is here to help you. +team `__ is here to help you. You can find us on `Twitter <#>`__, `StackOverflow <#>`__, and `email <#>`__. @@ -244,4 +244,4 @@ You can find us on `Twitter <#>`__, `StackOverflow <#>`__, and .. |Dependencies| image:: https://raw.githubusercontent.com/amadeus4dev/amadeus-python/master/.github/images/dependencies.svg?sanitize=true :target: ttps://badge.fury.io/py/amadeus .. |Contact Support| image:: https://raw.githubusercontent.com/amadeus4dev/amadeus-python/master/.github/images/support.svg?sanitize=true - :target: http://developer.amadeus.com/support + :target: http://developers.amadeus.com/support diff --git a/setup.py b/setup.py index f251402a..619bc35f 100644 --- a/setup.py +++ b/setup.py @@ -19,7 +19,7 @@ description='Python module for the Amadeus travel APIs', long_description=long_description, author='Amadeus', - author_email='developer@amadeus.com', + author_email='developers@amadeus.com', python_requires='>=2.7.0', url='https://github.com/amadeus4dev/amadeus-python', install_requires=[], From 8840c5bdf42c6ea5c6397c64fc790b746cc9f1a7 Mon Sep 17 00:00:00 2001 From: Sam Heyman Date: Sun, 8 Apr 2018 09:28:35 +0200 Subject: [PATCH 4/4] fixing broken test: updating namespace spec --- specs/namespaces/namespaces_spec.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specs/namespaces/namespaces_spec.py b/specs/namespaces/namespaces_spec.py index a16e975f..5754ca4c 100644 --- a/specs/namespaces/namespaces_spec.py +++ b/specs/namespaces/namespaces_spec.py @@ -85,7 +85,7 @@ with it('.travel.analytics.air_traffic.get'): self.client.travel.analytics.air_traffic.get(a='b') expect(self.client.get).to(have_been_called_with( - '/v1/travel/analytics/air-traffics', a='b' + '/v1/travel/analytics/air-traffic', a='b' )) with it('.travel.analytics.fare_searches.get'):