Fetch API Core items
Interface for core items data fetching.
APIFetchCore
Bases: APIFetchInternal
Exposes functions for fetching core items data from the server.
Source code in src/rmlab/api/fetch/core.py
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 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 |
|
fetch_aircrafts(scen_id)
async
Fetch a list of all aircrafts of scenario from server.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
scen_id | int | Scenario ID | required |
Returns:
Type | Description |
---|---|
List[Aircraft] | List of aircrafts |
Source code in src/rmlab/api/fetch/core.py
45 46 47 48 49 50 51 52 53 54 55 |
|
fetch_airline_cityroutes(scen_id, airline_id)
async
Fetch a list of cityroutes associated to an airline from server.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
scen_id | int | Scenario ID | required |
airline_id | str | Airline ID | required |
Returns:
Type | Description |
---|---|
List[CityRoute] | List of cityroutes |
Source code in src/rmlab/api/fetch/core.py
198 199 200 201 202 203 204 205 206 207 208 209 210 211 |
|
fetch_airline_cityroutes_ids(scen_id, airline_id)
async
Fetch a list of cityroutes associated to an airline from server.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
scen_id | int | Scenario ID | required |
airline_id | str | Airline ID | required |
Returns:
Type | Description |
---|---|
List[str] | List of cityroutes |
Source code in src/rmlab/api/fetch/core.py
258 259 260 261 262 263 264 265 266 267 268 269 270 271 |
|
fetch_airline_citysectors(scen_id, airline_id)
async
Fetch a list of citysectors associated to an airline from server.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
scen_id | int | Scenario ID | required |
airline_id | str | Airline ID | required |
Returns:
Type | Description |
---|---|
List[CitySector] | List of citysectors |
Source code in src/rmlab/api/fetch/core.py
168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 |
|
fetch_airline_citysectors_ids(scen_id, airline_id)
async
Fetch a list of citysectors ids associated to an airline from server.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
scen_id | int | Scenario ID | required |
airline_id | str | Airline ID | required |
Returns:
Type | Description |
---|---|
List[str] | List of citysectors |
Source code in src/rmlab/api/fetch/core.py
228 229 230 231 232 233 234 235 236 237 238 239 240 241 |
|
fetch_airline_routes(scen_id, airline_id)
async
Fetch a list of routes associated to an airline from server.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
scen_id | int | Scenario ID | required |
airline_id | str | Airline ID | required |
Returns:
Type | Description |
---|---|
List[Route] | List of routes |
Source code in src/rmlab/api/fetch/core.py
185 186 187 188 189 190 191 192 193 194 195 196 |
|
fetch_airline_routes_ids(scen_id, airline_id)
async
Fetch a list of routes ids associated to an airline from server.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
scen_id | int | Scenario ID | required |
airline_id | str | Airline ID | required |
Returns:
Type | Description |
---|---|
List[str] | List of routes |
Source code in src/rmlab/api/fetch/core.py
243 244 245 246 247 248 249 250 251 252 253 254 255 256 |
|
fetch_airline_sectors(scen_id, airline_id)
async
Fetch a list of sectors associated to an airline from server.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
scen_id | int | Scenario ID | required |
airline_id | str | Airline ID | required |
Returns:
Type | Description |
---|---|
List[Sector] | List of sectors |
Source code in src/rmlab/api/fetch/core.py
153 154 155 156 157 158 159 160 161 162 163 164 165 166 |
|
fetch_airline_sectors_ids(scen_id, airline_id)
async
Fetch a list of sectors ids associated to an airline from server.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
scen_id | int | Scenario ID | required |
airline_id | str | Airline ID | required |
Returns:
Type | Description |
---|---|
List[str] | List of sectors |
Source code in src/rmlab/api/fetch/core.py
213 214 215 216 217 218 219 220 221 222 223 224 225 226 |
|
fetch_airlines(scen_id)
async
Fetch a list of all airlines of scenario from server.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
scen_id | int | Scenario ID | required |
Returns:
Type | Description |
---|---|
List[Airline] | List of airlines |
Source code in src/rmlab/api/fetch/core.py
57 58 59 60 61 62 63 64 65 66 67 |
|
fetch_airports(scen_id)
async
Fetch a list of all airport of scenario from server.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
scen_id | int | Scenario ID | required |
Returns:
Type | Description |
---|---|
List[Airport] | List of airport |
Source code in src/rmlab/api/fetch/core.py
69 70 71 72 73 74 75 76 77 78 79 |
|
fetch_cities(scen_id)
async
Fetch a list of all cities of scenario from server.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
scen_id | int | Scenario ID | required |
Returns:
Type | Description |
---|---|
List[City] | List of cities |
Source code in src/rmlab/api/fetch/core.py
93 94 95 96 97 98 99 100 101 102 103 |
|
fetch_cityroutes(scen_id)
async
Fetch a list of all cityroutes of scenario from server.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
scen_id | int | Scenario ID | required |
Returns:
Type | Description |
---|---|
List[CityRoute] | List of cityroutes |
Source code in src/rmlab/api/fetch/core.py
129 130 131 132 133 134 135 136 137 138 139 |
|
fetch_citysectors(scen_id)
async
Fetch a list of all citysectors of scenario from server.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
scen_id | int | Scenario ID | required |
Returns:
Type | Description |
---|---|
List[CitySector] | List of citysectors |
Source code in src/rmlab/api/fetch/core.py
105 106 107 108 109 110 111 112 113 114 115 |
|
fetch_countries(scen_id)
async
Fetch a list of all countries of scenario from server.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
scen_id | int | Scenario ID | required |
Returns:
Type | Description |
---|---|
List[Country] | List of countries |
Source code in src/rmlab/api/fetch/core.py
81 82 83 84 85 86 87 88 89 90 91 |
|
fetch_flights(scen_id, ids, *, citysector_id=None, sector_id=None)
async
Fetch all flights associated to a citysector or sector from server. At least citysector_id
and/or sector_id
associated to the items must be defined.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
scen_id | int | Scenario ID | required |
ids | List[str] | List of flights IDs | required |
citysector_id | Optional[str] | Target citysector ID. Defaults to None | None |
sector_id | Optional[str] | Target sector ID. Defaults to None | None |
Raises:
Type | Description |
---|---|
ValueError | If none of |
Returns:
Type | Description |
---|---|
List[Flight] | List of flights |
Source code in src/rmlab/api/fetch/core.py
367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 |
|
fetch_flights_ids(scen_id, *, citysector_id=None, airline_id=None, sector_id=None)
async
Fetch all flights identifiers associated to a citysector or sector from server. At least citysector_id
and/or sector_id
associated to the items must be defined.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
scen_id | int | Scenario ID | required |
citysector_id | Optional[str] | Target citysector ID. Defaults to None | None |
airline_id | Optional[str] | Target airline ID. Defaults to None | None |
sector_id | Optional[str] | Target sector ID. Defaults to None | None |
Raises:
Type | Description |
---|---|
ValueError | If none of |
ValueError | If only |
Returns:
Type | Description |
---|---|
List[str] | List of identifiers of unbounded items |
Source code in src/rmlab/api/fetch/core.py
334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 |
|
fetch_info(scen_id)
async
Fetch summarized information about a scenario from server.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
scen_id | int | Scenario ID | required |
Returns:
Type | Description |
---|---|
Tuple[ScenarioDates, ItemsCount, SchedulesCount, FlightsCount] | A 4-tuple with information about the scenario. |
Source code in src/rmlab/api/fetch/core.py
31 32 33 34 35 36 37 38 39 40 41 42 43 |
|
fetch_routes(scen_id)
async
Fetch a list of all routes of scenario from server.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
scen_id | int | Scenario ID | required |
Returns:
Type | Description |
---|---|
List[Route] | List of routes |
Source code in src/rmlab/api/fetch/core.py
141 142 143 144 145 146 147 148 149 150 151 |
|
fetch_schedules(scen_id, ids, *, citysector_id=None, sector_id=None)
async
Fetch all flights schedules associated to a citysector or sector from server. At least citysector_id
and/or sector_id
associated to the items must be defined.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
scen_id | int | Scenario ID | required |
ids | List[str] | List of schedules IDs | required |
citysector_id | Optional[str] | Target citysector ID. Defaults to None | None |
sector_id | Optional[str] | Target sector ID. Defaults to None | None |
Raises:
Type | Description |
---|---|
ValueError | If none of |
Returns:
Type | Description |
---|---|
List[Schedule] | List of flights schedules. |
Source code in src/rmlab/api/fetch/core.py
306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 |
|
fetch_schedules_ids(scen_id, *, citysector_id=None, airline_id=None, sector_id=None)
async
Fetch all flights schedules identifiers associated to a citysector or sector from server. At least citysector_id
and/or sector_id
associated to the items must be defined.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
scen_id | int | Scenario ID | required |
citysector_id | Optional[str] | Target citysector ID. Defaults to None | None |
airline_id | Optional[str] | Target airline ID. Defaults to None | None |
sector_id | Optional[str] | Target sector ID. Defaults to None | None |
Raises:
Type | Description |
---|---|
ValueError | If none of |
ValueError | If only |
Returns:
Type | Description |
---|---|
List[str] | List of identifiers of unbounded items |
Source code in src/rmlab/api/fetch/core.py
273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 |
|
fetch_sectors(scen_id)
async
Fetch a list of all sectors of scenario from server.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
scen_id | int | Scenario ID | required |
Returns:
Type | Description |
---|---|
List[Sector] | List of sectors |
Source code in src/rmlab/api/fetch/core.py
117 118 119 120 121 122 123 124 125 126 127 |
|