Next: , Previous: , Up: Top   [Contents][Index]

6 Accessing the API

The define-api macro creates a function for accessing the api for each resource operation.

Before using the generated functions, the api backend needs to be selected via the with-api-backend.

Common Lisp Macro: (with-api-backendbackend &body body)

Execute the client resource operation calling backend

For instance, for the api defined above, an get-user and a get-users functions are created, which can be used like this:

(with-api-backend "http://localhost/api"
   (get-user 22))

Assuming the api is running on ‘http://localhost/api


Next: , Previous: , Up: Top   [Contents][Index]