Common Lisp Package: CL-GDATA-MISC

Internal package used by the cl-gdata implementation. Not intended for general use.

README:

FUNCTION

Public

ATOM-XML-WRITER (CONTENT)

Return a function that when called with a stream STREAM, will apply BUILD-ATOM-XML-STREAM on CONTENT and STREAM.

BUILD-ATOM-DOCUMENT (CONTENT)

Given a sexp-based structure of an atom document, return a DOM tree describing the corresponding XML document. The data structure is a list of elements. An element can be either a node definition or a simple string. A node definition is a list where the two first elements is the namespace name and the node name respectively. The further list entries are pairs of strings, the first of which is an attribute name and the second is the attribute value. For example, consider the following XML snippet: <atom:foo> <atom:bar>hello</atom:bar> <atom:inner> <atom:xyz foo="bar">text here</atom:xyz> </atom:inner> </atom:foo> The resulting sexp would then look like this: (("atom" "foo") (("atom" "bar") "hello") (("atom" "inner") (("atom" "xyz" "foo" "bar") "text here")))

BUILD-ATOM-XML-STREAM (CONTENT STREAM)

Convert the atom structure in CONTENT as per BUILD-ATOM-DOCUMENT and write the resulting XML data to STREAM.

FIND-DOCUMENT-FEED (DOCUMENT REL TYPE)

This version should be eliminated once all existing code has been moved to atom-feed-entry instances

MAKE-URL-SEARCH-PARAMS (URL &REST DEFINITIONS)

Appends a set of candidate parameters to URL and returns the resulting url. The arguments in DEFINITIONS consists of a set of pairs, the first of which is a string, and the second is any printable value or NIL. If the value is NIL, the pair is ignored, otherwise the first is used as a parameter name and the second is its value. For example, the following call: (make-url-search-params "http://www.example.com/foo" "foo" nil "bar" 10 "xyz" "foo") Will result in the following string: http://www.example.com/foo?bar=10&xyz=foo

NAME-FROM-FILENAME (FILE)

Returns the name part of FILE. FILE can be either a string or a pathspec.

PARSE-DATE-STRING (VALUE)

Parse a date value and return it as an ISO date.

Undocumented

DISPLAY-STREAM-IF-DEBUG (STREAM)

FIND-FEED-FROM-ATOM-FEED-ENTRY (ENTRY REL &OPTIONAL (TYPE +ATOM-XML-MIME-TYPE+))

FIND-NAMESPACE-URL (NAME)

GET-TEXT-FROM-NODE (NODE)

HTTP-REQUEST-WITH-STREAM (URL CALLBACK &KEY (SESSION *GDATA-SESSION*) (METHOD GET) (CONTENT-TYPE NIL) (CONTENT-LENGTH NIL) (CONTENT NIL) (ADDITIONAL-HEADERS NIL) (FORCE-BINARY NIL) (ACCEPTED-STATUS '(200)) (VERSION 2.0))

INIT-JSON-FIELDS (OBJ DEFINITIONS)

LOAD-AND-PARSE (URL &KEY (SESSION *GDATA-SESSION*) (METHOD GET) (CONTENT-TYPE NIL) (CONTENT NIL) (ADDITIONAL-HEADERS NIL) (FORCE-BINARY NIL) (ACCEPTED-STATUS '(200)) (VERSION 3.0))

LOAD-AND-PARSE-JSON (URL &KEY (SESSION *GDATA-SESSION*))

LOAD-ATOM-FEED-URL (URL CLASS &KEY (SESSION *GDATA-SESSION*) (VERSION 3.0))

LOAD-FEED (URL CLASS &KEY (SESSION *GDATA-SESSION*) (VERSION 3.0))

UPDATE-FROM-XPATH (NODE ENTRY SLOT-DESCRIPTOR)

VALUE-BY-XPATH (EXPRESSION NODE &KEY (DEFAULT-VALUE NIL DEFAULT-VALUE-ASSIGNED-P))

Private

DEBUG-GET-AND-DISPLAY-URL (URL &KEY ADDITIONAL-HEADERS)

Debug function that prints the content of the given URL. Only to be used for testing.

ENSURE-SLOT-VALUE (INSTANCE FIELD-NAME &OPTIONAL DEFAULT-VALUE)

Returns the value of slot FIELD-NAME in INSTANCE. If the slot is unbound, return DEFAULT-VALUE.

Undocumented

%PERFORM-CHECK-RANGE (QUOTED-PLACE VALUE MIN MAX)

%READ-SUBPATHS (PATHLIST NODE)

CHECK-OR-ASSIGN-API-KEY (API-KEY)

DEBUG-PRINT-DOM (DOC &OPTIONAL (STREAM *STANDARD-OUTPUT*))

READ-NEW-API-KEY

MACRO

Public

Undocumented

CHECK-API-KEY (V)

CHECK-RANGE (PLACE MIN MAX)

WITH-GDATA-NAMESPACES (&BODY BODY)

GENERIC-FUNCTION

Public

AUTHENTICATED-REQUEST (URL SESSION &KEY METHOD PARAMETERS CONTENT WANT-STREAM CONTENT-TYPE ADDITIONAL-HEADERS USER-AGENT FORCE-BINARY (METHOD GET) (PARAMETERS NIL) (CONTENT NIL) (WANT-STREAM NIL) (CONTENT-TYPE NIL) (ADDITIONAL-HEADERS NIL) (USER-AGENT cl-gdata) (FORCE-BINARY NIL) (CONTENT-LENGTH NIL) &ALLOW-OTHER-KEYS)

Performs an authenticated request to the Google services

LOAD-ATOM-FEED (DOCUMENT CLASS-NAME)

Loads an atom feed into a list of atom-feed-entry instances

UPDATE-FEED-ENTRY-NODE (ELEMENT DESTINATION-DOC)

Update the undelying DOM node to reflect any changes to the entry.

Private

PARSE-TEXT-VALUE (VALUE TYPENAME)

Converts VALUE to the type TYPE.

SLOT-ACCESSOR

Public

DOCUMENT-FEEDS (OBJECT)

A list of links from this document. Each entry is a list of the three attributes in a "link" node: "rel", "type", "href".

FEED-ENTRY-FEEDS (OBJECT)

List of all link elements

FEED-ENTRY-TITLE (OBJECT)

Content of the <title> node

NODE-DOM (OBJECT)

The underlying dom for this node

Private

Undocumented

FEED-ENTRY-LIST (OBJECT)

FEED-ENTRY-TYPE (OBJECT)

FEED-ETAG (OBJECT)

FIELD-NODE (OBJECT)

SETFFIELD-NODE (NEW-VALUE OBJECT)

FIELD-NODE-TYPE (OBJECT)

SETFFIELD-NODE-TYPE (NEW-VALUE OBJECT)

JSON-INSTANCE-DATA (OBJECT)

NODE-CLEAR-FUNCTION (OBJECT)

SETFNODE-CLEAR-FUNCTION (NEW-VALUE OBJECT)

NODE-COLLECTIONP (OBJECT)

SETFNODE-COLLECTIONP (NEW-VALUE OBJECT)

NODE-DEFAULT (OBJECT)

SETFNODE-DEFAULT (NEW-VALUE OBJECT)

NODE-UPDATER-FUNCTION (OBJECT)

SETFNODE-UPDATER-FUNCTION (NEW-VALUE OBJECT)

VARIABLE

Private

Undocumented

*GDATA-NAMESPACES*

CLASS

Public

ATOM-FEED-ENTRY

Common superclass for all Atom feed entries

ATOM-FEED-ENTRY-CLASS

Metaclass for atom feed entry classes.

JSON-INSTANCE

Superclass for objects backed by a JSON structure.

Undocumented

NODE-DOM-MIXIN

Private

FEED

Class that holds the data for an entire feed.

Undocumented

ATOM-FEED-ENTRY-DIRECT-SLOT-DEFINITION

ATOM-FEED-ENTRY-EFFECTIVE-SLOT-DEFINITION

ATOM-FEED-ENTRY-SLOT-DEFINITION-MIXIN

CONDITION

Public

AUTHENTICATION-FAILED

Error that is raised when authentication fails.

NO-API-KEY-SPECIFIED

Condition that is signalled if the API key has not been set when accessing a service.

CONSTANT

Public

Undocumented

+ATOM-TAG-EDIT+

+ATOM-TAG-FEED+

+ATOM-XML-MIME-TYPE+

+HTTP-GDATA-USER-AGENT+

+SCHEME-KIND+