Skip to content

Commit 6bbeeed

Browse files
committed
add airline.js
1 parent 1c1b51d commit 6bbeeed

File tree

2 files changed

+25
-1
lines changed

2 files changed

+25
-1
lines changed

src/amadeus/namespaces/airline.js

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
import Destinations from './airline/destinations';
2+
3+
/**
4+
* A namespaced client for the
5+
* `/v1/airline` endpoints
6+
*
7+
* Access via the {@link Amadeus} object
8+
*
9+
* ```js
10+
* let amadeus = new Amadeus();
11+
* amadeus.airline;
12+
* ```
13+
*
14+
* @param {Client} client
15+
* @property {predictions} predictions
16+
*/
17+
class Airline {
18+
constructor(client) {
19+
this.client = client;
20+
this.destinations = new Destinations(client);
21+
}
22+
}
23+
24+
export default Airline;

src/amadeus/namespaces/airline/destinations.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class Destinations {
3131
* ```
3232
*/
3333
get(params = {}) {
34-
return this.client.get('/v1/airport/direct-destinations', params);
34+
return this.client.get('/v1/airline/destinations', params);
3535
}
3636
}
3737

0 commit comments

Comments
 (0)