-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathflights.proto
More file actions
123 lines (104 loc) · 3.24 KB
/
Copy pathflights.proto
File metadata and controls
123 lines (104 loc) · 3.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
/*
This proto file is from https://github.com/hexus07/google_flight_scraper/
and modified slightly. It has been released the MIT license which I am
including here along with the copyright.
MIT License
Copyright (c) 2025 fast-flights Contributors
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/
syntax = "proto3";
package protobuf;
option php_namespace = "Mintopia\\Flights\\Protobuf";
option php_metadata_namespace = "Mintopia\\Flights\\Protobuf\\Metadata";
message Airport {
sint32 flag = 1;
string airport = 2;
}
message ItineraryData {
string departure_airport = 1; // KUN
string departure_date = 2; // 2025-07-20
string arrival_airport = 3; // MAD
string flight_code = 5; // FR
string flight_number = 6; // 103
}
message FlightData {
string date = 2;
repeated ItineraryData itin_data = 4;
optional int32 max_stops = 5;
repeated string airlines = 6;
repeated Airport from_flight = 13;
repeated Airport to_flight = 14;
}
enum Seat {
UNKNOWN_SEAT = 0;
ECONOMY = 1;
PREMIUM_ECONOMY = 2;
BUSINESS = 3;
FIRST = 4;
}
enum Trip {
UNKNOWN_TRIP = 0;
ROUND_TRIP = 1;
ONE_WAY = 2;
MULTI_CITY = 3; // not implemented
}
enum Passenger {
UNKNOWN_PASSENGER = 0;
ADULT = 1;
CHILD = 2;
INFANT_IN_SEAT = 3;
INFANT_ON_LAP = 4;
}
message Info {
sint32 flag_1 = 1; // zig-zag(14)=28 → varint 0x1c
sint32 flag_2 = 2; // zig-zag(1)=2 → varint 0x02
repeated FlightData data = 3;
repeated uint32 passengers = 8;
Seat seat = 9;
sint32 flag_3 = 14; // zig-zag(–1)=1 → varint 0x01
Trip trip = 19;
}
message Price {
int32 price = 1;
string currency = 3;
}
message ItinerarySummary {
string flights = 2;
Price price = 3;
}
message FlightSummary {
message Price {
int32 price = 1;
}
message Itinerary {
message Sector {
message Flight {
string from = 1;
string departure = 2;
string to = 3;
string arrival = 4;
string airline = 5;
string number = 6;
}
repeated FlightSummary.Itinerary.Sector.Flight flight = 1;
}
FlightSummary.Itinerary.Sector sector = 1;
}
string currency = 2;
FlightSummary.Price price = 3;
FlightSummary.Itinerary itinerary = 4;
}