4 Dynamic
(require (planet gh/gapi:1:=3/dynamic)) |
Another way to use the API discovery service is to query it at runtime. This may be desirable if you want to be able to discover newly-added services.
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 : (or/c symbol? path-string?)
Create a service? object representing the web service defined
by the JSON file filename.
If filename is a symbol?, then it should be one of the Available services.
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.