The what3words Reference Manual

This is the what3words Reference Manual, generated automatically by Declt version 4.0 beta 2 "William Riker" on Sun Dec 15 08:05:43 2024 GMT+0.

Table of Contents


1 Introduction


2 Systems

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


2.1 what3words

Describe what3words here

Author

Martin R. Enders

License

BSD

Dependencies
  • drakma (system).
  • jsown (system).
  • cl-ppcre (system).
Source

what3words.asd.

Child Components

3 Files

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


3.1 Lisp


3.1.1 what3words/what3words.asd

Source

what3words.asd.

Parent Component

what3words (system).

ASDF Systems

what3words.


3.1.2 what3words/package.lisp

Source

what3words.asd.

Parent Component

what3words (system).

Packages

3.1.3 what3words/what3words.lisp

Dependency

package.lisp (file).

Source

what3words.asd.

Parent Component

what3words (system).

Public Interface
Internals

3.1.4 what3words/what3words-test.lisp

Dependency

what3words.lisp (file).

Source

what3words.asd.

Parent Component

what3words (system).

Public Interface

test (function).


4 Packages

Packages are listed by definition order.


4.1 what3words-test

Source

package.lisp.

Use List
Public Interface

test (function).


4.2 what3words

Source

package.lisp.

Use List

common-lisp.

Used By List

what3words-test.

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: *key*
Package

what3words.

Source

what3words.lisp.


5.1.2 Ordinary functions

Function: get-languages (&key codes-only key raise-error)

codes-only: if true return a list of language codes, if nil return a-list of language-codes and language-names
key: api-key
raise-error: if true raise an error if one occurs, if nil then return nil and the errormessage from w3w as multiple return values

Package

what3words.

Source

what3words.lisp.

Function: position-to-three-words (latitude longitude &key language corners key raise-error)

latitude: latitude in degrees
longitude: longitude in degrees
language: nil for default language or language-code (see get-languages function)
corners: true for the coordinates of the w3w square, false for the southwest and northeast coordinates of the square
key: api-key

multiple-return-values: three words (list), position (list), language (language-code, string), corners (positions of southwest and northeast corners or nil) raise-error: if true raise an error if one occurs, if nil then return nil and the errormessage from w3w as multiple return values

Package

what3words.

Source

what3words.lisp.

Function: test (key)
Package

what3words-test.

Source

what3words-test.lisp.

Function: three-words-to-position (three-words &key language corners key raise-error)

three-words: list of three words or string of three words with dots ‘.‘
language: nil for default language or language-code (see get-languages function); use only if you want to return 3 words in a different language then the language to the language submitted (can be used for translation of ’3 words’ corners: true for the coordinates of the w3w square, false for the southwest and northeast coordinates of the square
key: api-key

multiple-return-values: three words (list), position (list), type(string) language (language-code, string), corners (positions of southwest and northeast corners or nil)
raise-error: if true raise an error if one occurs, if nil then return nil and the errormessage from w3w as multiple return values

Package

what3words.

Source

what3words.lisp.


5.1.3 Generic functions

Generic Reader: data (condition)
Package

what3words.

Methods
Reader Method: data ((condition w3w-api-error))
Source

what3words.lisp.

Target Slot

data.

Generic Reader: text (condition)
Package

what3words.

Methods
Reader Method: text ((condition w3w-api-error))
Source

what3words.lisp.

Target Slot

text.


5.1.4 Conditions

Condition: w3w-api-error
Package

what3words.

Source

what3words.lisp.

Direct superclasses

error.

Direct methods
Direct slots
Slot: text
Initargs

:text

Readers

text.

Writers

This slot is read-only.

Slot: data
Initargs

:data

Readers

data.

Writers

This slot is read-only.


5.2 Internals


5.2.1 Special variables

Special Variable: *get-languages-url*
Package

what3words.

Source

what3words.lisp.

Special Variable: *position-url*
Package

what3words.

Source

what3words.lisp.

Special Variable: *w3w-url*
Package

what3words.

Source

what3words.lisp.


5.2.2 Ordinary functions

Function: create-return-data (return-data corners raise-error first-value)

Create returndata for the exported functions from the parsed json objects

Package

what3words.

Source

what3words.lisp.

Function: ensure-json-key (data key default)
Package

what3words.

Source

what3words.lisp.

Function: get-api-status (data)

The structure of the status within the response from w3w is not always the same

Package

what3words.

Source

what3words.lisp.

Function: handle-w3w-error-status (data raise-error)

raise or return error message from w3w API

Package

what3words.

Source

what3words.lisp.

Function: w3w-error-p (w3w-return-data)

Check status from w3w api

Package

what3words.

Source

what3words.lisp.

Function: w3w-to-list (w3w)

Convert What 3 Words dot notation to list

Package

what3words.

Source

what3words.lisp.


Appendix A Indexes


A.1 Concepts


A.2 Functions