feat: enlace directo a la compra desde el mapa de butacas - #11
Open
gersonsebastianx wants to merge 2 commits into
Open
gersonsebastianx wants to merge 2 commits into
gersonsebastianx wants to merge 2 commits into
Conversation
The README states that buying happens outside the CLI. This keeps that boundary but removes the tedious part: instead of redoing city, movie, date, venue and time by hand on the website, the link lands straight on the seat map of the chosen showtime. Cineplanet exposes the movie slug as `movieDetailsUrl`, so `Movie` now carries it and `Showtime::purchase_url` assembles the URL. The live contract test asserts the slug still arrives, since a missing slug would break the link silently. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Closes the loop the seat map opens: after picking a showtime and seeing where the good seats are, the link is right there instead of forcing a manual search back on the website. Rendered only when the slug is known, so a catalog without it degrades to the previous behaviour rather than printing a broken URL. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
gersonsebastianx
force-pushed
the
feat/purchase-link
branch
from
August 17, 2026 21:53
5455615 to
c795281
Compare
Author
|
Rebasé sobre Coincidimos en el campo: tú lo llamaste Revisé si quedaba redundante con tu browser checkout handoff y creo que no: tú armas la URL dentro de Cada commit compila por separado y pasan las 110 pruebas. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
El README dice que "la compra y la reserva siguen ocurriendo fuera de la CLI, en Cineplanet". Este PR respeta ese límite, pero quita la parte tediosa: hoy, después de que la TUI te muestra la mejor función y dónde están los buenos asientos, hay que rehacer a mano en la web la elección de ciudad, película, fecha, sede y hora.
Con esto, el mapa de butacas muestra el enlace que cae directo en esa función.
Qué cambia
Movieahora guarda elslugque Cineplanet expone comomovieDetailsUrl.Showtime::purchase_url(slug)arma la URL:/compra/{slug}/{cinemaId}/{sessionId}/asientos. Elidviene compuesto comosede-sesión, así que reusa el mismorsplit_once('-')que ya hacehydrate_showtime.Verificación
cargo test— 105 pasan, 0 fallan.cargo test -- --ignored— los dos tests de contrato contra la API real pasan. Le agregué una aserción apublic_catalog_contract_still_parsespara que avise si Cineplanet dejara de mandar el slug: sin eso el enlace se rompería en silencio.cargo fmt --checkycargo clippy --all-targetslimpios.Contexto
Salió de documentar la API mientras armaba mi propia versión en Node, que ya conversamos por WhatsApp. Si preferís que el enlace vaya en otro lado de la pantalla, que sea una tecla en vez de texto, o que no vaya, decime y lo ajusto — o cerralo sin problema.