Flights search using QPX API and Google App Script.
Поиск авиа-рейсов с помощью QPX API и Google App Script. Как использовать - в статье на хабре и ниже в "How-to".
- Complete How-to guide.
- Input Home & Destination airport IATA Codes and hit Flights -> Get Flights.
You want to visit Serfaus village in Austria and buy best tickets for your requirements. Your requirements are:
- You want to buy tickets now
- You want to stay for 6-8 days
- You want to make this trip in next 4 weeks
Your solution path is:
- Find your home airport: Moscow (MOW)
- Find Serfaus nearest airports: Innsbruck (INN), Munchen (MUC), Verona (VRN).
- Use flights-search-qpx-gas script:
- Input home airport: MOW
- Input destination airport: INN, MUC, VRN (separated by comma and space)
- Input First Depart Date (first possible date you are willing to leave)
- Input Last Return Date (last possible date you are going to return)
- Input Duration: 6, 7, 8 (separated for comma and space)
- Hit Flights -> Check Flights
- Google QPX API Key
- Setup Google App Script
- Open this google spreadsheet.
- Menu: File -> Make a Copy
- Open created copy.
- Menu: Tools -> Script editor.
- Open Code.gs file.
- In this first line change 'your api key' to key from step 'Google QPX API Key'.
- Menu: File -> Save.
- Menu: 'Run -> getFlights'
- Accept permissions.
- Return to spreadsheet and find that line 11 and below are populated with sample data.
- Return to Script editor.
- Change
var dryRun = true;
tovar dryRun = false;
- Menu: File -> Save.
- Make first real request
- Return to spreadsheet.
- Reload spreadsheet.
- In the sheet change from/to and other fields.
- Menu: Flights -> Check Flights.
- Ключ к Google QPX API
- Настроить Google App Script
- Открыть таблицу google spreadsheet.
- Меню: File -> Make a Copy
- Открыть копию.
- Меню: Tools -> Script editor.
- Открыть файл Code.gs.
- В первой строке заменить 'your api key' на ключ из шага 'Google QPX API'.
- Меню: File -> Save.
- Меню: 'Run -> getFlights'
- Принять разрешения.
- Вернуться в таблицу и увидет что строка 11 и ниже заполнена тестовыми данными.
- Вернуться в Script editor.
- Заменить
var dryRun = true;
tovar dryRun = false;
- Меню: File -> Save.
- Выполнить первый запрос на реальных данных
- Вернуться в таблицу.
- Перезагрузить таблицу.
- Поменять откуда/куда и другие поля.
- Меню: Flights -> Check Flights.
In this repository you will find full source code for this App.