cl-gdata

2017-11-30

Common Lisp interface to the Google GData API's

Upstream URL

github.com/lokedhs/cl-gdata

Author

Elias Martenson <lokedhs@gmail.com>

License

BSD
README
Summary documentation for cl-gdata. Work in progress.

1Author Contact Information

Elias MÃ¥rtenson

2Introduction

cl-gdata is a project aimed at implementing the Google GData API's in Common Lisp.

Source code can be found at: https://github.com/lokedhs/cl-gdata

Web site: http://source.dhsdevelopments.com/home/cl-gdata

Google Group: https://groups.google.com/forum/?fromgroups#!forum/cl-gdata

3Compatilibity

cl-gdata is being developed on SBCL, but all attempts are made to keep the code as standard as possible. That said, because of the numerous libraries being used, not all Lisp implementations are able to load this library.

This project is currently known to work on:

  • SBCL
  • CCL

It currently has problems with:

  • ABCL (Does not have a functioning implementation of Closer-MOP)
  • ECL (xpath does not load)
  • CLISP (Fails when loading classes with a metaclass. Problems withthe MOP implementation?)

4API Documentation

4.1Authenticating

All API calls requires the user to be authenticated. Google providesseveral different authentication methods that can be used. The primaryways are: ClientLogin, AuthSub and OAuth.

cl-gdata supports different implementations of authentication objects, although currently only ClientLogin is supported by means of the CL-GDATA-CLIENTLOGIN:CLIENTLOGIN-SESSION class.

All functions that require authentication needs to be able to access a session instance that is responsible for handling the authentication process. The session can be specified using the keyword argument :SESSION and will default to the content of CL-GDATA:*GDATA-SESSION*.

4.1.1Authenticating With ClientLogin

The ClientLogin session instance is created by instantiating theCL-GDATA-CLIENTLOGIN:CLIENTLOGIN-SESSION class:
(setq cl-gdata:*gdata-session*
      (make-instance 'cl-gdata-clientlogin:clientlogin-session
                     :user username
                     :password password))

This will cause all subsequent calls to the GData functions to use ClientLogin with the given username and password.

4.1.2Authenticating With OAuth

The OAuth autentication model is currently under development and does not work yet.

4.2Document List API

The document List API is used to access documents in Google Docs.

All symbols for this part of the API is in the CL-GDATA-DOCS-LIST package. The examples assumes that this package is interned in the current package.

4.2.1Listing Documents

Listing documents is performed using the LIST-DOCUMENTS function:

(list-documents)

Running the above results in something like the following:

(#<DOCUMENT "word document"> #<SPREADSHEET "Test spreadsheet">
 #<DOCUMENT "Test document">)

4.2.2Document Object Hierarchy

All document classes inherit from the DOCUMENT class. This itself inherits from ATOM-FEED-ENTRY (see ATOM-FEED-ENTRY Class Description).

Slot Accessor Description
id-url document-id-url The ID URL for this document
resource-id document-resource-id The resource ID. This value uniquely identifies this document.
description document-description Human-readable description
suggested-filename document-suggested-filename The suggested name for the file when downloaded
updated document-updated The timestamp when the document was updated
content document-content List of entries, each being a list of type and source URL

4.3Spreadsheet API

TODO: check the source code for now: spreadsheets.lisp

4.4Contacts API

TODO: check the source code for now: contacts.lisp

4.5Picasa API

TODO: check the source code for now: picasa.lisp

4.6Google Code Issue Tracker API

TODO: check the source code for now: issue-tracker.lisp

4.7ATOM-FEED-ENTRY Class Description

The class ATOM-FEED-ENTRY is the superclass of all classes that describe entries from an Atom feed. This includes all documents from Google Docs as well as Picasa documents and Google Contacts.

The class has the following slots:

Slot Accessor Description
feeds feed-entry-feeds A list of all <atom:link> elements
title feed-entry-title The title of the element
node-dom node-dom The XML node that was read from the Atom feed

Dependencies (16)

  • alexandria
  • cl-fad
  • cl-json
  • closer-mop
  • cl-ppcre
  • cxml
  • drakma
  • flexi-streams
  • gzip-stream
  • local-time
  • parse-number
  • plexippus-xpath
  • split-sequence
  • string-case
  • trivial-utf-8
  • url-rewrite

Dependents (0)

    • GitHub
    • Quicklisp