Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
amadeus-ts
Advanced tools
Amadeus provides a rich set of APIs for the travel industry. For more details, check out the Amadeus for Developers portal.
[!IMPORTANT]
This SDK is maintained by the developer community only. The Amadeus for Developers team doesn't support or maintain it.
This module has been tested using Node LTS versions (16.x, 18.x, 20.x). You can install it using npm, pnpm or yarn.
npm install amadeus-ts
To make your first API call, you will need to register for an Amadeus Developer Account and set up your first application.
import Amadeus, { ResponseError } from "amadeus-ts";
const amadeus = new Amadeus({
clientId: process.env.AMADEUS_CLIENT_ID,
clientSecret: process.env.AMADEUS_CLIENT_SECRET,
});
async function getFlightOffers() {
try {
const response = await amadeus.shopping.flightOffersSearch.get({
originLocationCode: "SYD",
destinationLocationCode: "BKK",
departureDate: "2024-12-01",
adults: 2,
});
console.log(response.data);
} catch (error: unknown) {
if (error instanceof ResponseError) {
console.log(error.code);
}
}
}
getFlightOffers();
You can import the types of each endpoint to define the structure of your objects.
import Amadeus, { FlightOffersSearchGetParams } from "amadeus-ts";
const amadeus = new Amadeus({
clientId: process.env.AMADEUS_CLIENT_ID,
clientSecret: process.env.AMADEUS_CLIENT_SECRET,
});
// Define the type of the flightOffersSearch object using FlightOffersSearchGetParams
const flightOffersSearch: FlightOffersSearchGetParams = {
originLocationCode: "SYD",
destinationLocationCode: "BKK",
departureDate: "2024-12-01",
adults: 2,
};
amadeus.shopping.flightOffersSearch.get(flightOffersSearch);
I created flight-path as a reference project to demonstrate how to use the amadeus-ts
library with Next.js 15.
See the official amadeus-node documentation.
FAQs
Node library for the Amadeus travel APIs Written in TypeScript
The npm package amadeus-ts receives a total of 23 weekly downloads. As such, amadeus-ts popularity was classified as not popular.
We found that amadeus-ts demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.