4 Dynamic
(require (planet gh/gapi:1:=1/dynamic)) |
Another way to use the API discovery service is to query it at runtime, or to parse a locally-stored discovery file at runtime. This may be desirable if you want to be able to discover newly-added services, for example.
Returns #t if v is a service, #f otherwise.
A service? is a jsexpr? to which procedures have been added.
procedure
(discovery-document->service discovery-document) → service?
discovery-document : jsexpr?
procedure
(local-discovery-document->service filename) → service?
filename : path-string?
Create a service? object representing the web service defined
by the JSON file filename.
procedure
(online-discovery-document->service name ver) → service? name : string? ver : string?
Create a service? object representing the web service defined
by the name and version, which is fetched via HTTP from the Google API
Discovery service.
procedure
(method-proc service resource-name method-name) → procedure? service : service? resource-name : symbol? method-name : symbol?
Given a service?, resource-name, and
method-name, get a procedure that makes HTTP requests to the
service.
The procedure returned by method-proc is like that created by require-gapi-doc; see that for more information.