Skip to main content

Module api

Module api 

Source
Expand description

What a service asks of Grab: the per-account client (GrabClient: search, menu, cart, quote, order, tracking, the refresh and the liveness check), the login driver (LoginDriver) and the backend that makes both (GrabBackend: grabcli’s library, or the fake). The session itself is opaque here (grabcli’s serde Session as JSON), read and written only through a SessionSlot: wherever the service keeps it.

Structs§

Cart
The cart (one merchant at a time).
Fee
A fee of a quote.
Health
What a refresh or a liveness check found.
Line
A line of the cart or a quote.
Menu
A merchant’s menu.
MenuItem
One menu item.
Merchant
A restaurant from a search.
Placed
A placed order.
Quote
A priced checkout of the cart: what an order would cost now.
Tracked
An order being delivered (or just delivered).

Enums§

CartOp
A cart change.
GrabError
Why a Grab call failed.
Op
One call a service’s caller (a tool, a command) asks for, checked.
Step
Where a login is. Its Debug never shows a done step’s session.

Traits§

GrabBackend
Makes the clients and the login drivers.
GrabClient
One account’s Grab, over its SessionSlot.
LoginDriver
One login in a fresh isolated browser context, driven from its own thread. The phone and the code are passed in and never kept by the caller.
SessionSlot
An account’s session, wherever the service keeps it (sealed, ideally): read and written only through this (the client’s refreshes save here).

Functions§

money
₱1,234.50 for minor centavos of currency (PHP’s sign; others by code).

Type Aliases§

GrabResult
A Grab call’s result.