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.
travelpayouts-api
Advanced tools
TravelPayouts Affiliate Network for Your Travel Traffic Monetization
$ npm install --save travelpayouts-api
All methods are Promise-based.
const TravelPayouts = require('travelpayouts-api');
const api = new TravelPayouts('YOUR_TOKEN', 'YOUR_MARKER');
return api.search({
origin: 'NYC',
destination: 'HKT',
date: new Date(),
})
.then(res => {
console.log(res.results);
})
.catch(err => {
console.error(err.stack || err.message);
});
Create TravelPayouts API instance
Parameters
token: string
- TravelPayouts API token
marker: string
- TravelPayouts marker
options: object
options.url: string
- TravelPayouts API Base URL
options.timeout: number
- Timeout for all requests in total
Flights search
Parameters
segments: object | Array[object]
segments.origin: string
- origin IATA or string "City, Country (IATA)". IATA code is shown by uppercase letters
segments.destination: string
- destination IATA or string "City, Country (IATA)". IATA code is shown by uppercase letters (for example: "Berlin, Germany (BER)");
segments.date: date | string
- departure date, Date object or string in format yyyy-mm-dd
options: object
options.host: string
- host's request (must be replaced by the address of your website where API will be used)
options.user_ip: string
- user's ip address
options.locale: string
- the language of the search result (en, ru, de, es, fr, pl)
options.trip_class: string
- flight class (Y – Economy, C – Business)
options.passengers: string
- passenger Information
options.passengers.adults: number
- the number of adult passengers (from 1 to 9)
options.passengers.children: number
- the number of children (from 0 to 6)
options.passengers.infants: number
- the number of infants (from 0 to 6)
options.know_english: boolean
- include English-speaking gates in search results
options.[...] - any additional got options
Returns: promise
travelpayouts-api
module is used in production on the avia.ml website.
MIT © Evgeny Vlasenko
FAQs
TravelPayouts API
We found that travelpayouts-api demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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.