anchor.diff:                              ,sym))
                      symbols)))
   
  -(defmacro define-api-command (fun-name api-fun-name params-list docstring)
  +(defmacro define-api-command (fun-name api-fun-name params-list docstring
  +                              &key returned-format)
     "Defines a function FUN-NAME, calling API command (string) API-FUN-NAME,
   taking optional parameters symbol list PARAMS-LIST, with documentation
  -DOCSTRING."
  +DOCSTRING. If the API command is only able to return one format, override
  +*OUTPUT-FORMAT* for the defined calls by setting RETURNED-FORMAT to the
  +correct format string."
     `(defun ,fun-name (&key ,@params-list)
        ,docstring
  -     (call-api ,api-fun-name
  -               (alist-builder ,@params-list))))
  -            
  +     (let ,(when returned-format
  +                 `((*output-format* ,returned-format)))
  +       (call-api ,api-fun-name
  +                 (alist-builder ,@params-list)))))
  +
   
   ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
   ;;; Define the API commands
  
positive.code:                                   (append `(("key" . ,*api-key*)
                                              ("output" . ,*output-format*))
                                            (clean-alist params)))))
      (if (stringp res)
          (if (and (equal *output-format* "js")
                   *decode-response*)
              (decode-json res)
              res)
          ;; Boundary data is always KML, and its Content-Type is treated as
          ;; binary by Drakma. We just return the xml as-is.
          ;; 
          ;; FIXME this is a fudge, as it relies on the only non-*ouput-format*-
          ;; obeying response having an unusual Content-Type.
          ;; I should override *output-format* for this, and do a 'if not a
          ;; string then make a string' conversion for all responses.
          (flexi-streams:octets-to-string res))))
     
  
  ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  
negative.code: Arguments:
  
  - name
      Name of the constituency."
    :returned-format "xml")
  
  
  ;;; Committees
  