Skip to content

Commit 83de72e

Browse files
authored
README FIX (#76)
1 parent 3b5e371 commit 83de72e

File tree

1 file changed

+13
-59
lines changed

1 file changed

+13
-59
lines changed

README.md

Lines changed: 13 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -3,33 +3,11 @@
33
[![Build Status](https://travis-ci.org/amadeus4dev/amadeus-java.svg?branch=master)][travis]
44
[![Contact Support](https://github.com/amadeus4dev/amadeus-java/raw/master/.github/images/support.svg?sanitize=true)][support]
55

6-
Amadeus provides a set of APIs for the travel industry. Flights, Hotels, Locations and more.
7-
8-
For more details see the [Java
9-
documentation](https://amadeus4dev.github.io/amadeus-java/) on
10-
[Amadeus.com](https://developers.amadeus.com).
6+
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-java/).
117

128
## Installation
139

14-
This library requires Java 1.7+ and the the [Gson library](https://github.com/google/gson).
15-
16-
With __Maven__ you need to add to your pom.xml
17-
```xml
18-
<dependency>
19-
<groupId>com.google.code.gson</groupId>
20-
<artifactId>gson</artifactId>
21-
<version>2.8.5</version>
22-
</dependency>
23-
```
24-
25-
With __Gradle__
26-
27-
Available in `jcenter()` and `mavenCentral()`
28-
```js
29-
implementation 'com.google.code.gson:gson:2.8.5'
30-
```
31-
32-
You can install the SDK via Maven or Gradle.
10+
This library requires Java 1.7+ and the [Gson library](https://github.com/google/gson). You can install the SDK via Maven or Gradle:
3311

3412
#### Maven
3513
```xml
@@ -46,9 +24,7 @@ compile "com.amadeus:amadeus-java:5.0.0"
4624

4725
## Getting Started
4826

49-
To send make your first API call you will need to [register for an Amadeus
50-
Developer Account](https://developers.amadeus.com/create-account) and set up
51-
your first application.
27+
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 application](https://developers.amadeus.com/my-apps).
5228

5329
```java
5430
import com.amadeus.Amadeus;
@@ -75,7 +51,7 @@ public class AmadeusExample {
7551

7652
## Initialization
7753

78-
The client can be initialized directly.
54+
The client can be initialized directly:
7955

8056
```java
8157
//Initialize using parameters
@@ -84,21 +60,17 @@ Amadeus amadeus = Amadeus
8460
.build();
8561
```
8662

87-
Alternatively it can be initialized without any parameters if the environment
88-
variables `AMADEUS_CLIENT_ID` and `AMADEUS_CLIENT_SECRET` are present.
63+
Alternatively, it can be initialized without any parameters if the environment variables `AMADEUS_CLIENT_ID` and `AMADEUS_CLIENT_SECRET` are present.
8964

9065
```java
9166
Amadeus amadeus = Amadeus
9267
.builder(System.getenv())
9368
.build();
9469
```
9570

96-
Your credentials can be found on the [Amadeus
97-
dashboard](https://developers.amadeus.com/my-apps). [Sign
98-
up](https://developers.amadeus.com/create-account) for an account today.
71+
Your credentials can be found on the [Amadeus dashboard](https://developers.amadeus.com/my-apps).
9972

100-
By default the environment for the SDK is the `test` environment. To switch to
101-
a production (paid-for) environment please switch the hostname as follows:
73+
By default the SDK is set to `test` environment. To switch to a `production` (pay-as-you-go) environment, please switch the hostname as follows:
10274

10375
```java
10476
Amadeus amadeus = Amadeus
@@ -109,38 +81,24 @@ Amadeus amadeus = Amadeus
10981

11082
## Documentation
11183

112-
Amadeus has a large set of APIs, and our documentation is here to get you
113-
started today. Head over to our
114-
[Reference](https://amadeus4dev.github.io/amadeus-java/) documentation for
115-
in-depth information about every SDK method, its arguments and return types.
116-
117-
118-
* [Get Started](https://amadeus4dev.github.io/amadeus-java/) documentation
119-
* [Initialize the SDK](https://amadeus4dev.github.io/amadeus-java/)
120-
* [Find an Airport](https://amadeus4dev.github.io/amadeus-java/)
121-
* [Find a Flight](https://amadeus4dev.github.io/amadeus-java/)
122-
* [Get Flight Inspiration](https://amadeus4dev.github.io/amadeus-java/)
84+
Amadeus has a large set of APIs, and our documentation is here to get you started. Head over to our [reference documentation](https://amadeus4dev.github.io/amadeus-java/) for in-depth information about every SDK method, its arguments and return types.
12385

12486
## Making API calls
12587

126-
This library conveniently maps every API path to a similar path.
127-
128-
For example, `GET /v2/reference-data/urls/checkin-links?airlineCode=BA` would be:
88+
This library conveniently maps every API path to a similar path. For example, `GET /v2/reference-data/urls/checkin-links?airlineCode=BA` would be:
12989

13090
```java
13191
amadeus.referenceData.urls.checkinLinks.get(Params.with("airlineCode", "BA"));
13292
```
13393

134-
Similarly, to select a resource by ID, you can pass in the ID to the **singular** path.
135-
136-
For example, `GET /v2/shopping/hotel-offers/XXX` would be:
94+
Similarly, to select a resource by ID, you can pass in the ID to the **singular** path. For example, `GET /v2/shopping/hotel-offers/XXX` would be:
13795

13896
```java
13997
amadeus.shopping.hotelOffer("XXX").get(...);
14098
```
14199

142100
You can make any arbitrary API call as well directly with the `.get` method.
143-
Keep in mind, this returns a raw `Resource`
101+
Keep in mind, this returns a raw `Resource`.
144102

145103
```java
146104
Response response = amadeus.get("/v2/reference-data/urls/checkin-links", Params.with("airlineCode", "BA"));
@@ -150,8 +108,7 @@ response.getResult();
150108

151109
## Response
152110

153-
Every successful API call returns a `Resource` object. The underlying
154-
`Resource` with the raw available.
111+
Every successful API call returns a `Resource` object. The `Resource` object has the raw response body (in string format) available:
155112

156113
```java
157114
Location[] locations = amadeus.referenceData.locations.get(Params
@@ -197,10 +154,7 @@ Amadeus amadeus = Amadeus
197154
)
198155
```
199156

200-
Additionally, to enable more verbose logging, you can set the appropriate level
201-
on your own logger, though the easiest way would be to enable debugging via a
202-
parameter on initialization, or using the `AMADEUS_LOG_LEVEL` environment
203-
variable.
157+
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.
204158

205159
```java
206160
Amadeus amadeus = Amadeus

0 commit comments

Comments
 (0)