Skip to content

Commit b119da4

Browse files
authored
README FIX (#90)
1 parent 4710af9 commit b119da4

1 file changed

Lines changed: 20 additions & 48 deletions

File tree

README.rst

Lines changed: 20 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -4,23 +4,18 @@ Amadeus Python SDK
44
|Module Version| |Build Status| |Maintainability| |Dependencies|
55
|Contact Support|
66

7-
Amadeus provides a set of APIs for the travel industry. Flights, Hotels,
8-
Locations and more.
9-
10-
For more details see the `Amadeus for Developers Portal
11-
<https://developers.amadeus.com>`__ and the `class reference
12-
<https://amadeus4dev.github.io/amadeus-python>`__ here on GitHub.
7+
Amadeus provides a rich set of APIs for the travel industry. For more details, check out the `Amadeus for Developers Portal <https://developers.amadeus.com>`__ or the `SDK class reference <https://amadeus4dev.github.io/amadeus-python>`__.
138

149
Installation
1510
------------
1611

17-
This SDK requires Python 2.7+ or 3.4+. You can install it directly with pip.
12+
This SDK requires Python 2.7+ or 3.4+. You can install it directly with pip:
1813

1914
.. code:: sh
2015
2116
pip install amadeus
2217
23-
You can also add it to your `requirements.txt` file and install using:
18+
OR, add it to your `requirements.txt` file and install using:
2419

2520
.. code:: sh
2621
@@ -30,9 +25,8 @@ You can also add it to your `requirements.txt` file and install using:
3025
Getting Started
3126
---------------
3227

33-
To make your first API call you will need to `register for an Amadeus Developer
34-
Account <https://developers.amadeus.com/create-account>`__ and set up your first
35-
application.
28+
To make your first API call, you will need to `register <https://developers.amadeus.com/register>`__ for an Amadeus Developer Account and `set up your first
29+
application <https://developers.amadeus.com/my-apps/>`__.
3630

3731
.. code:: py
3832
@@ -64,21 +58,15 @@ The client can be initialized directly.
6458
# Initialize using parameters
6559
amadeus = Client(client_id='REPLACE_BY_YOUR_API_KEY', client_secret='REPLACE_BY_YOUR_API_SECRET')
6660
67-
Alternatively it can be initialized without any parameters if the
68-
environment variables ``AMADEUS_CLIENT_ID`` and
69-
``AMADEUS_CLIENT_SECRET`` are present.
61+
Alternatively, it can be initialized without any parameters if the environment variables ``AMADEUS_CLIENT_ID`` and ``AMADEUS_CLIENT_SECRET`` are present.
7062

7163
.. code:: py
7264
7365
amadeus = Client()
7466
75-
Your credentials can be found on the `Amadeus dashboard
76-
<https://developers.amadeus.com/my-apps/>`__. `Sign
77-
up <https://developers.amadeus.com>`__ for an account today.
67+
Your credentials can be found on the `Amadeus dashboard <https://developers.amadeus.com/my-apps/>`__.
7868

79-
By default the environment for the SDK is the ``test`` environment. To
80-
switch to a production (paid-for) environment please switch the hostname
81-
as follows:
69+
By default, the SDK environment is set to ``test`` environment. To switch to a production (pay-as-you-go) environment, please switch the hostname as follows:
8270

8371
.. code:: py
8472
@@ -87,46 +75,39 @@ as follows:
8775
Documentation
8876
-------------
8977

90-
Amadeus has a large set of APIs, and our documentation is here to get you
91-
started today. Head over to our `Reference
92-
<https://amadeus4dev.github.io/amadeus-python/>`__
93-
documentation for in-depth information about every SDK method, its arguments
94-
and return types.
78+
Amadeus has a large set of APIs, and our documentation is here to get you started today. Head over to our `reference documentation <https://amadeus4dev.github.io/amadeus-python/>`__ for in-depth information about every SDK method, as well as its arguments and return types.
9579

9680
- `Initialize the SDK <https://amadeus4dev.github.io/amadeus-python/#/client>`__
97-
- `Find an Airport <https://amadeus4dev.github.io/amadeus-python/#referencedata-locations>`__
98-
- `Find a Flight <https://amadeus4dev.github.io/amadeus-python/#shopping-flights>`__
81+
- `Find an Airport <https://amadeus4dev.github.io/amadeus-python/#amadeus.reference_data.locations.Airports>`__
82+
- `Find a Flight <https://amadeus4dev.github.io/amadeus-python/#amadeus.shopping.FlightOffersSearch>`__
9983
- `Get Flight Inspiration <https://amadeus4dev.github.io/amadeus-python/#shopping-flights>`__
10084

10185
Making API calls
10286
----------------
10387

10488
This library conveniently maps every API path to a similar path.
10589

106-
For example, ``GET /v2/reference-data/urls/checkin-links?airlineCode=BA``
107-
would be:
90+
For example, ``GET /v2/reference-data/urls/checkin-links?airlineCode=BA`` would be:
10891

10992
.. code:: py
11093
11194
amadeus.reference_data.urls.checkin_links.get(airlineCode='BA')
11295
113-
Similarly, to select a resource by ID, you can pass in the ID to the
114-
singular path.
96+
Similarly, to select a resource by ID, you can pass in the ID to the singular path.
11597

11698
For example, ``GET /v2/shopping/hotel-offers/XZY`` would be:
11799

118100
.. code:: py
119101
120-
amadeus.shopping.hotel_offer('4BA070CE929E135B3268A9F2D0C51E9D4A6CF318BA10485322FA2C7E78C7852E').get()
102+
amadeus.shopping.hotel_offer('XYZ').get()
121103
122-
You can make any arbitrary API call as well directly with the ``.get``
123-
method:
104+
You can make any arbitrary API call directly with the ``.get`` method as well:
124105

125106
.. code:: py
126107
127108
amadeus.get('/v2/reference-data/urls/checkin-links', airlineCode='BA')
128109
129-
Or with ``POST`` using ``.client.post`` method:
110+
Or, with ``POST`` method:
130111

131112
.. code:: py
132113
@@ -135,11 +116,7 @@ Or with ``POST`` using ``.client.post`` method:
135116
Response
136117
--------
137118

138-
Every API call returns a ``Response`` object. If the API call contained
139-
a JSON response it will parse the JSON into the ``.result`` attribute.
140-
If this data also contains a ``data`` key, it will make that available
141-
as the ``.data`` attribute. The raw body of the response is always
142-
available as the ``.body`` attribute.
119+
Every API call returns a ``Response`` object. If the API call contained a JSON response it will parse the JSON into the ``.result`` attribute. If this data also contains a ``data`` key, it will make that available as the ``.data`` attribute. The raw body of the response is always available as the ``.body`` attribute.
143120

144121
.. code:: py
145122
@@ -157,8 +134,7 @@ available as the ``.body`` attribute.
157134
Pagination
158135
----------
159136

160-
If an API endpoint supports pagination, the other pages are available
161-
under the ``.next``, ``.previous``, ``.last`` and ``.first`` methods.
137+
If an API endpoint supports pagination, the other pages are available under the ``.next``, ``.previous``, ``.last`` and ``.first`` methods.
162138

163139
.. code:: py
164140
@@ -191,10 +167,7 @@ The SDK makes it easy to add your own logger.
191167
logger=logger
192168
)
193169
194-
Additionally, to enable more verbose logging, you can set the
195-
appropriate level on your own logger, though the easiest way would be to
196-
enable debugging via a parameter on initialization, or using the
197-
``AMADEUS_LOG_LEVEL`` environment variable.
170+
Additionally, to enable more verbose logging, you can set the appropriate level on your own logger. The easiest way would be to enable debugging via a parameter during initialization, or using the ``AMADEUS_LOG_LEVEL`` environment variable.
198171

199172
.. code:: py
200173
@@ -337,8 +310,7 @@ This library is released under the `MIT License <LICENSE>`__.
337310
Help
338311
----
339312

340-
Our `developer support team <https://developers.amadeus.com/support>`__ is here
341-
to help you. You can find us on `StackOverflow <htps://stackoverflow.com/questions/tagged/amadeus>`__, and `email <mailto:developers@amadeus.com>`__.
313+
Our `developer support team <https://developers.amadeus.com/support>`__ is here to help you. You can also find us on `StackOverflow <htps://stackoverflow.com/questions/tagged/amadeus>`__, or `email directly <mailto:developers@amadeus.com>`__.
342314

343315
.. |Module Version| image:: https://badge.fury.io/py/amadeus.svg
344316
:target: https://pypi.org/project/amadeus/

0 commit comments

Comments
 (0)