Skip to content

Commit f614279

Browse files
committed
Add linting and transpiling
1 parent 37a1d56 commit f614279

File tree

7 files changed

+3524
-106
lines changed

7 files changed

+3524
-106
lines changed

.babelrc

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"presets": [
3+
["env", {
4+
"targets": {
5+
"node": "4.0.0"
6+
}
7+
}]
8+
]
9+
}

.eslintrc.js

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
module.exports = {
2+
"env": {
3+
"es6": true,
4+
"node": true,
5+
},
6+
"extends": "eslint:recommended",
7+
"parserOptions": {
8+
"sourceType": "module"
9+
},
10+
"rules": {
11+
"indent": [
12+
"error",
13+
2
14+
],
15+
"linebreak-style": [
16+
"error",
17+
"unix"
18+
],
19+
"quotes": [
20+
"error",
21+
"single"
22+
],
23+
"semi": [
24+
"error",
25+
"always"
26+
],
27+
"no-console": [
28+
"warn"
29+
]
30+
}
31+
};

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
node_modules
2+
lib

README.md

Lines changed: 0 additions & 102 deletions
Original file line numberDiff line numberDiff line change
@@ -1,102 +0,0 @@
1-
# Amadeus Node SDK
2-
3-
[![npm version](https://badge.fury.io/js/amadeus.svg)](https://badge.fury.io/js/amadeus)
4-
[![Build Status](http://img.shields.io/travis/amadeus-node.svg)][travis]
5-
[![Contact Support](https://img.shields.io/badge/contact-support-blue.svg)][support]
6-
7-
Amadeus provides a set of APIs for the travel industry. Flights, Hotels, Locations and more.
8-
9-
For more details see the [Node documentation](https://developer.amadeus.com/docs/node) on [Amadeus.com](https://developer.amadeus.com).
10-
11-
## Installation
12-
13-
This gem requires Node 2.2+. You can install install it directly or via bundler.
14-
15-
```node
16-
gem install 'amadeus'
17-
```
18-
19-
__Next__: [Get Started with the Node SDK.](https://developer.amadeus.com/docs/node/get_started/initialize)
20-
21-
## Getting Started
22-
23-
To send make your first API call you will need to [register for an Amadeus Developer Account](https://developer.amadeus.com/register) and [set up your first application](https://dashboard.developer.amadeus.com/applications).
24-
25-
```node
26-
require 'amadeus'
27-
28-
amadeus = Amadeus::Client.new({
29-
client_id: '[YOUR_CLIENT_ID]',
30-
client_secret: '[YOUR_CLIENT_SECRET]'
31-
})
32-
33-
amadeus.reference_data.locations.get({ keyword: 'Lon' })
34-
#=> Returns a list of locations (Airport ad City codes)
35-
# that match this string in some way
36-
```
37-
38-
__Next__: [Learn more about Locations](https://developer.amadeus.com/docs/node/get_started/locations) with our Node SDK.
39-
40-
## Initialization
41-
42-
The client can be initialized directly or via environment variables.
43-
44-
```node
45-
# Initialize using parameters
46-
amadeus = Amadeus::Client.new(client_id: '...', client_secret: '...')
47-
48-
# Alternative: Initialize using environment variables
49-
# * AMADEUS_CLIENT_ID
50-
# * AMADEUS_CLIENT_SECRET
51-
amadeus = Amadeus::Client.new
52-
```
53-
54-
Your credentials can be found on the [Amadeus dashboard](https://dashboard.developer.amadeus.com/client_ids). [Sign up](https://developer.amadeus.com/register) for an account today.
55-
56-
__Next__: [Learn more about our initializing the Node SDK](https://developer.amadeus.com/docs/node/get_started_initialize) in our documentation.
57-
58-
## Logging & Debugging
59-
60-
The SDK makes it easy to add your own logger.
61-
62-
```node
63-
amadeus = Amadeus::Client.new(
64-
client_id: '...',
65-
client_secret: '...',
66-
logger: MyOwnLogger.new
67-
)
68-
```
69-
70-
Additionally, to enable more verbose logging, you can set the appropriate level either via a parameter on initialization, or using the `AMADEUS_LOG_LEVEL` environment variable.
71-
72-
```node
73-
amadeus = Amadeus::Client.new(
74-
client_id: '...',
75-
client_secret: '...',
76-
log_level: 1 # defaults to silent, 0
77-
)
78-
```
79-
80-
## Documentation
81-
82-
Amadeus has a large set of APIs, and our documentation is here to get you started today.
83-
84-
* [Get Started](https://developer.amadeus.com/docs/node/get_started) documentation
85-
* [Initialize the SDK](https://developer.amadeus.com/docs/node/get_started/initialize)
86-
* [Find an Airport](https://developer.amadeus.com/docs/node/get_started/find_an_airport)
87-
* [Book a Flight](https://developer.amadeus.com/docs/node/get_started/book_a_flight)
88-
* [Get Flight Inspiration](https://developer.amadeus.com/docs/node/get_started/get_flight_inspiration)
89-
90-
Alternatively, head over to our [Reference](https://developer.amadeus.com/docs/node/reference) documentaton for in-depth information about every SDK method, it's arguments and return types.
91-
92-
## License
93-
94-
This library is released under the [MIT License](LICENSE).
95-
96-
## Help
97-
98-
Our [developer support team](https://developer.amadeus.com/developers) is here to help you. You can find us on [Twitter](#), [StackOverflow](#), and [email](#).
99-
100-
[gem]: https://nodegems.org/gems/amadeus-node
101-
[travis]: http://travis-ci.org/amadeus-node
102-
[support]: http://developer.amadeus.com/support

0 commit comments

Comments
 (0)