The dweet Reference Manual

This is the dweet Reference Manual, generated automatically by Declt version 4.0 beta 2 "William Riker" on Sun Dec 15 06:01:11 2024 GMT+0.

Table of Contents


1 Introduction


2 Systems

The main system appears first, followed by any subsystem dependency.


2.1 dweet

A dweet.io client for Common Lisp

Author

death

License

MIT

Dependencies
  • drakma (system).
  • com.gigamonkeys.json (system).
  • babel (system).
Source

dweet.asd.

Child Component

dweet.lisp (file).


3 Files

Files are sorted by type and then listed depth-first from the systems components trees.


3.1 Lisp


3.1.1 dweet/dweet.asd

Source

dweet.asd.

Parent Component

dweet (system).

ASDF Systems

dweet.


3.1.2 dweet/dweet.lisp

Source

dweet.asd.

Parent Component

dweet (system).

Packages

dweet.

Public Interface
Internals

4 Packages

Packages are listed by definition order.


4.1 dweet

A dweet.io client for Common Lisp

Source

dweet.lisp.

Use List

common-lisp.

Public Interface
Internals

5 Definitions

Definitions are sorted by export status, category, package, and then by lexicographic order.


5.1 Public Interface


5.1.1 Special variables

Special Variable: *base-uri*

Base URI for the dweet service.

Package

dweet.

Source

dweet.lisp.

Special Variable: *thing*

Name of the thing dweeting.

Package

dweet.

Source

dweet.lisp.


5.1.2 Macros

Macro: with-thing (name &body forms)

Evaluate FORMS in the context of a dweet thing named by NAME.

Package

dweet.

Source

dweet.lisp.


5.1.3 Ordinary functions

Function: all (&optional *thing*)

Fetch and return a vector of all dweets on server. Will return an empty vector if none found.

Package

dweet.

Source

dweet.lisp.

Function: latest (&optional *thing*)

Fetch and return the latest dweet, or return NIL if none found.

Package

dweet.

Source

dweet.lisp.

Function: listen (handler &optional *thing*)

Listen for dweets coming from the server, calling the HANDLER function with them as they arrive.

Package

dweet.

Source

dweet.lisp.

Function: post (&rest plist)

Post a dweet with supplied keys and values. The plist is interpreted as a Lisp representation for a JSON object. The first parameter may be a thing’s name, in which case the plist comes afterwards.

Package

dweet.

Source

dweet.lisp.


5.1.4 Generic functions

Generic Reader: http-error-body (condition)
Package

dweet.

Methods
Reader Method: http-error-body ((condition http-error))
Source

dweet.lisp.

Target Slot

body.

Generic Reader: http-error-headers (condition)
Package

dweet.

Methods
Reader Method: http-error-headers ((condition http-error))
Source

dweet.lisp.

Target Slot

headers.

Generic Reader: http-error-reason (condition)
Package

dweet.

Methods
Reader Method: http-error-reason ((condition http-error))
Source

dweet.lisp.

Target Slot

reason.

Generic Reader: http-error-status (condition)
Package

dweet.

Methods
Reader Method: http-error-status ((condition http-error))
Source

dweet.lisp.

Target Slot

status.

Generic Reader: http-error-uri (condition)
Package

dweet.

Methods
Reader Method: http-error-uri ((condition http-error))
Source

dweet.lisp.

Target Slot

uri.


5.1.5 Conditions

Condition: http-error

Represents a dweet HTTP error.

Package

dweet.

Source

dweet.lisp.

Direct superclasses

error.

Direct methods
Direct slots
Slot: body
Initargs

:body

Readers

http-error-body.

Writers

This slot is read-only.

Slot: status
Initargs

:status

Readers

http-error-status.

Writers

This slot is read-only.

Slot: headers
Initargs

:headers

Readers

http-error-headers.

Writers

This slot is read-only.

Slot: uri
Initargs

:uri

Readers

http-error-uri.

Writers

This slot is read-only.

Slot: reason
Initargs

:reason

Readers

http-error-reason.

Writers

This slot is read-only.


5.2 Internals


5.2.1 Macros

Macro: ignoring-status ((status &optional return-value) &body forms)

Evaluate FORMS while "ignoring" dweet HTTP errors with status equal to the evaluation of STATUS, i.e. returning the evaluation of RETURN-VALUE when such errors are encountered.

Package

dweet.

Source

dweet.lisp.


5.2.2 Ordinary functions

Function: json-from-octets (octets)

Parse the supplied OCTETS vector into a Lisp representation of a JSON object.

Package

dweet.

Source

dweet.lisp.

Function: make-listener (handler)

Return a stream receiver function that parses dweet chunks and calls the HANDLER function with them.

Package

dweet.

Source

dweet.lisp.

Function: print-http-error (error stream)

Print a human-friendly HTTP error message to the stream.

Package

dweet.

Source

dweet.lisp.

Function: request (method path &key content stream-receiver)

Send a dweet request of some kind. METHOD should be either :GET or :POST. PATH is the relative path (sans leading slash) to call. If posting, CONTENT should be a Lisp representation of a JSON object. If listening, STREAM-RECEIVER should be a function to call with the HTTP stream.

Package

dweet.

Source

dweet.lisp.


Appendix A Indexes


A.1 Concepts


A.2 Functions

Jump to:   A   F   G   H   I   J   L   M   P   R   W  
Index Entry  Section

A
all: Public ordinary functions

F
Function, all: Public ordinary functions
Function, json-from-octets: Private ordinary functions
Function, latest: Public ordinary functions
Function, listen: Public ordinary functions
Function, make-listener: Private ordinary functions
Function, post: Public ordinary functions
Function, print-http-error: Private ordinary functions
Function, request: Private ordinary functions

G
Generic Function, http-error-body: Public generic functions
Generic Function, http-error-headers: Public generic functions
Generic Function, http-error-reason: Public generic functions
Generic Function, http-error-status: Public generic functions
Generic Function, http-error-uri: Public generic functions

H
http-error-body: Public generic functions
http-error-body: Public generic functions
http-error-headers: Public generic functions
http-error-headers: Public generic functions
http-error-reason: Public generic functions
http-error-reason: Public generic functions
http-error-status: Public generic functions
http-error-status: Public generic functions
http-error-uri: Public generic functions
http-error-uri: Public generic functions

I
ignoring-status: Private macros

J
json-from-octets: Private ordinary functions

L
latest: Public ordinary functions
listen: Public ordinary functions

M
Macro, ignoring-status: Private macros
Macro, with-thing: Public macros
make-listener: Private ordinary functions
Method, http-error-body: Public generic functions
Method, http-error-headers: Public generic functions
Method, http-error-reason: Public generic functions
Method, http-error-status: Public generic functions
Method, http-error-uri: Public generic functions

P
post: Public ordinary functions
print-http-error: Private ordinary functions

R
request: Private ordinary functions

W
with-thing: Public macros