Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove bluebird #211

Merged
merged 1 commit into from
Feb 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@
"watch": "^1.0.2"
},
"dependencies": {
"bluebird": "^3.7.2",
"qs": "^6.11.0"
}
}
8 changes: 4 additions & 4 deletions src/amadeus.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ class Amadeus {
* ```
*
* @param response the previous response for an API call
* @return {Promise.<Response,ResponseError>} a Bluebird Promise
* @return {Promise.<Response,ResponseError>} a Promise
*/
previous(response) { return this.pagination.page('previous', response); }

Expand All @@ -121,7 +121,7 @@ class Amadeus {
* ```
*
* @param response the previous response for an API call
* @return {Promise.<Response,ResponseError>} a Bluebird Promise
* @return {Promise.<Response,ResponseError>} a Promise
*/
next(response) { return this.pagination.page('next', response); }

Expand All @@ -143,7 +143,7 @@ class Amadeus {
* ```
*
* @param response the previous response for an API call
* @return {Promise.<Response,ResponseError>} a Bluebird Promise
* @return {Promise.<Response,ResponseError>} a Promise
*/
first(response) { return this.pagination.page('first', response); }

Expand All @@ -164,7 +164,7 @@ class Amadeus {
* ```
*
* @param response the previous response for an API call
* @return {Promise.<Response,ResponseError>} a Bluebird Promise
* @return {Promise.<Response,ResponseError>} a Promise
*/
last(response) { return this.pagination.page('last', response); }
}
Expand Down
5 changes: 2 additions & 3 deletions src/amadeus/client.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import EventEmitter from 'events';
import Promise from 'bluebird';
import util from 'util';

import AccessToken from './client/access_token';
Expand Down Expand Up @@ -183,10 +182,10 @@ class Client {
}

/**
* Builds a Bluebird Promise to be returned to the API user
* Builds a Promise to be returned to the API user
*
* @param {type} emitter the event emitter to notify of changes
* @return {Promise} a Bluebird promise
* @return {Promise} a promise
* @private
*/
buildPromise(emitter) {
Expand Down
6 changes: 3 additions & 3 deletions src/amadeus/client/access_token.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class AccessToken {
* token before making an API call.
*
* @param {Client} client the Amadeus Client to make an API call with
* @return {Promise.<Response,ResponseError>} a Bluebird Promise
* @return {Promise.<Response,ResponseError>} a Promise
* @protected
*/
bearerToken(client) {
Expand All @@ -39,10 +39,10 @@ class AccessToken {
// PRIVATE

/**
* Builds a Bluebird promise to be returned to the API user
* Builds a promise to be returned to the API user
*
* @param {type} emitter the EventEmitter used to notify the Promise of
* @return {Promise} a Bluebird promise
* @return {Promise} a promise
* @private
*/
promise(emitter) {
Expand Down
4 changes: 2 additions & 2 deletions src/amadeus/client/pagination.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class Pagination {
* as a link in the meta links in the response
* @param {type} response the response containing the links to the next pages,
* and the request used to make the previous call
* @return {Promise.<Response,ResponseError>} a Bluebird Promise
* @return {Promise.<Response,ResponseError>} a Promise
* @protected
*/
page(pageName, response) {
Expand All @@ -38,7 +38,7 @@ class Pagination {
*
* @param {type} request the request used to make the previous call
* @param {type} pageNumber the page number to fetch
* @return {Promise.<Response,ResponseError>} a Bluebird Promise
* @return {Promise.<Response,ResponseError>} a Promise
* @private
*/
call(request, pageNumber) {
Expand Down
Loading