class MenuClient : RPCClient, ServiceClient
(source)
Menu API client. Provides access to menu/product catalog data for a particular partner and location pair. Menus can'
be requested in full or section by section. By default, items marked as "invisible" are not returned - these are
items considered out-of-stock or no longer carried by the partner. To retrieve all items, pass full
as true
.
data class MenuContext
Specifies contextual information for a menu operation. Required context items (aside from the standard API key required for all operations) are the partner code and location code to consider when downloading menu data. |
MenuClient(: String, : Int, : String, : Duration, : TransportMode = TransportMode.SECURE, : ClientAuth = ClientAuth.NONE, : ClientCredentials? = null, : InputStream? = null, : Executor = Executors.newSingleThreadExecutor(), : String? = null, : String? = null)
Menu API client. Provides access to menu/product catalog data for a particular partner and location pair. Menus can'
be requested in full or section by section. By default, items marked as "invisible" are not returned - these are
items considered out-of-stock or no longer carried by the partner. To retrieve all items, pass |
val apiKey: String
API key in use by this client. Identifies the implementing/integrating project that is operating this client. Can be obtained via the Bloombox Dashboard or a properly integrated Google Cloud Platform project. |
|
val channel: ManagedChannel
Channel for client->server traffic. Construction of this object is handled by the base RPC client class, which adds necessary items like base interceptors and crypto assets. |
|
val clientAuth: ClientAuth
Client TLS auth mode. This specifies whether client auth is enabled or not for a given API client object. The default value is no client auth. Client authentication (mTLS) is required in some circumstances. |
|
val clientAuthorityRoots: InputStream?
Authority roots to accept from the client-side. Defaults to the embedded 'authority-roots.pem', which includes issuing authority certificates for all Bloombox endpoints. |
|
val clientCredentials: ClientCredentials?
Client credential information. This specifies the client-side portion of mTLS (Mutual Transport-Layer Security) credential data. In particular, this includes a private key and identity certificate chain. First position is the private client key, second is the certificate. |
|
val executor: Executor
Executor for followup and RPC client activities. Defaults to a single-threaded executor that conducts API requests and any related followup in a background thread. |
|
val host: String
Host to send RPCs to. This is a regular hostname string, and can be a raw IP address (in the case of "127.0.0.1") or a DNS name. |
|
val port: Int
Port to send RPCs to. In some circumstances this may be a service-specific value, and so it is specified here, but by and large RPC traffic occurs over ports 443 and 465. |
|
val timeout: Duration
RPC request timeout to apply. After this duration, an in-flight RPC request with no server response data will be considered failed due to a "time-out." |
|
val transportMode: TransportMode
Transport mode setting. Available options are "INTERNAL" and "SECURE." In nearly all circumstances, including network-internal traffic, "SECURE" should be used, which enforces end-to-end SSL. "INTERNAL" mode is only useful during development and for machine-internal traffic. |
fun retrieve(: MenuContext = MenuContext.defaultContext(), : Boolean = false, : MenuCallback?, : MenuErrorCallback?): ListenableFuture<Response>
Fetch an entire menu, asynchronously, for a given partner/location code pair. Every menu section is fetched. By
default, items marked as "invisible" (i.e. out of stock, or not carried any longer) are not returned. To fetch all
product catalog entries including these items, pass fun retrieve(: MenuContext = MenuContext.defaultContext(), : Boolean = false): Response
Fetch an entire menu, synchronously, for a given partner/location code pair. Every menu section is fetched. By
default, items marked as "invisible" (i.e. out of stock, or not carried any longer) are not returned. To fetch all
product catalog entries including these items, pass |