Closed tuomas777 closed 3 years ago
Merging #73 (5e482e3) into main (b5a5743) will increase coverage by
0.26%
. The diff coverage is100.00%
.
@@ Coverage Diff @@
## main #73 +/- ##
==========================================
+ Coverage 89.64% 89.90% +0.26%
==========================================
Files 48 48
Lines 1564 1605 +41
Branches 125 131 +6
==========================================
+ Hits 1402 1443 +41
Misses 128 128
Partials 34 34
Impacted Files | Coverage Δ | |
---|---|---|
bookings/api.py | 100.00% <100.00%> (ø) |
|
bookings/serializers.py | 97.43% <100.00%> (+0.10%) |
:arrow_up: |
bookings/ticketing_system.py | 96.00% <100.00%> (+0.21%) |
:arrow_up: |
maas/models.py | 90.24% <100.00%> (+0.24%) |
:arrow_up: |
mock_ticket_api/api.py | 88.00% <100.00%> (+2.63%) |
:arrow_up: |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update b5a5743...5e482e3. Read the comment docs.
Implemented API endpoint
/bookings/availability/
for fetching information about available seats for given departures. Availability requests are proxied to ticket systems that provide the given departures. In those requests departure IDs are converted to trip source IDs and dates. If a departure's availability cannot be determined for any reason, the departure is excluded from the results.NOTE: departures can span multiple ticket systems, which all need to be queried. Currently those requests are executed synchronously, so the current implementation won't happily scale to many ticket systems.
Example request from a MaaS client to us:
POST /v1/bookings/availability/
Response:
Behind the scenes, that causes a request from us to a ticket system:
POST <ticket system availability endpoint URL>
Response: