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

10 API

Rest Server external symbols documentation

Common Lisp Function: (configure-api-resourceapi-or-name resource-name &rest options)
Common Lisp Macro: (permission-checkingargs resource-operation-implementation)
Common Lisp Function: (accept-serializer)
Common Lisp Macro: serialization
Common Lisp Macro: with-list-member
Common Lisp Macro: (implement-resource-operation-casename accept-content-type args &body body)

Implement an resource operation case

Common Lisp Macro: (with-apiapi &body body)
Execute body under api scope.

Example: (with-api test-api

(define-resource-operation get-user :get (:url-prefix “users/{id}”)

‘((:id :integer))))

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

Execute the client resource operation calling backend

Common Lisp Macro: (implement-resource-operationapi-name name-and-options args &body body)

Define an resource operation implementation

Common Lisp Function: (set-reply-content-typecontent-type)
Common Lisp Macro: with-serializer-output
Common Lisp Function: (http-error)
Common Lisp Macro: define-schema
Common Lisp Function: (disable-api-logging)
Common Lisp Function: (format-absolute-resource-operation-urlresource-operation &rest args)
Common Lisp Function: (boolean-value)
Common Lisp Function: (start-api-documentationapi address port)

Start a web documentation application on the given api.

Common Lisp Function: (list-value)
Common Lisp Function: (find-schema)
Common Lisp Macro: (with-xml-reply&body body)
Common Lisp Function: (self-reference&rest args)
Common Lisp Macro: unserialization
Common Lisp Function: (find-apiname &key (error-p t))

Find api by name

Common Lisp Macro: fetch-content
Common Lisp Function: (serializable-class-schema)
Common Lisp Function: (stop-apiapi-acceptor)
Common Lisp Function: (make-resource-operationname attributes args options)

Make an resource operation.

Common Lisp Function: (configure-resource-operation-implementationname &rest options)

Configure or reconfigure an already existent resource operation implementation

Common Lisp Function: (configure-apiapi-or-name &rest options)

Configure or reconfigure an already existent api

Common Lisp Function: (validation-error)
Common Lisp Function: (stop-api-logging)
Common Lisp Function: (elements)
Common Lisp Macro: logging
Common Lisp Function: (start-apiapi &rest args)

Start an api at address and port.

In production mode, we bind the api directly. In debug mode, we only bind the API name in order to be able to make modifications to the api (definition) in development time

Common Lisp Function: (set-attribute)
Common Lisp Function: (add-list-member)
Common Lisp Macro: with-attribute
Common Lisp Macro: (with-json-reply&body body)
Common Lisp Macro: with-list
Common Lisp Macro: (define-resource-operationname attributes args &rest options)

Helper macro to define an resource operation

Common Lisp Macro: schema
Common Lisp Function: (enable-api-logging)
Common Lisp Macro: define-serializable-class
Common Lisp Macro: validation
Common Lisp Macro: error-handling
Common Lisp Macro: (with-permission-checkingcheck &body body)
Common Lisp Macro: with-serializer
Common Lisp Macro: (define-api-resourcename options &body functions)

Define an api resource.

Common Lisp Function: (start-api-logging)
Common Lisp Macro: define-swagger-resource
Common Lisp Macro: with-element
Common Lisp Variable: *catch-errors*
Common Lisp Macro: (cachingargs resource-operation-implementation)
Common Lisp Macro: (with-api-resourceresource &body body)
Execute body under resource scope.

Example: (with-api-resource users

(define-resource-operation get-user :get (:url-prefix “users/{id}”)

‘((:id :integer))))

Common Lisp Macro: (with-content (&key (setter)) &body body)

Macro to build HTTP content to pass in client functions.

Example:

(with-api-backend `api-backend'
(let ((content (with-content ()

(:= :name “name”) (when some-condition

(:= :attr 22)))))

(app.api-client:my-client-function :content content)))

Common Lisp Macro: (with-pagination (&rest args &key (page) (object-name) &allow-other-keys) &body body)
Common Lisp Macro: (define-apiname superclasses options &body resources)

Define an api.

Common Lisp Function: (element)
Common Lisp Function: (attribute)
Common Lisp Variable: *server-catch-errors*
Common Lisp Macro: (with-reply-content-type (content-type) &body body)
Common Lisp Macro: (with-posted-contentargs posted-content &body body)

Bind ARGS to POSTED-CONTENT. POSTED-CONTENT is supposed to be an alist. Also, argx-P is T5 iff argx is present in POSTED-CONTENT


Footnotes

(5)

http://www.lispworks.com/reference/HyperSpec/Body/a_t.htm


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