Skip to content

lokedhs/cl-gdata

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Summary documentation for cl-gdata. Work in progress.

Author Contact Information

Elias Mårtenson

Introduction

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

Compatilibity

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 with the MOP implementation?)

API Documentation

Authenticating

All API calls requires the user to be authenticated. Google provides several different authentication methods that can be used. The primary ways 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*.

Authenticating With ClientLogin

The ClientLogin session instance is created by instantiating the CL-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.

Authenticating With OAuth

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

Document 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.

Listing 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">)

Document Object Hierarchy

All document classes inherit from the DOCUMENT class. This itself inherits from ATOM-FEED-ENTRY (see <a href=”ATOM-FEED-ENTRY Class Description”>ATOM-FEED-ENTRY Class Description).

SlotAccessorDescription
id-urldocument-id-urlThe ID URL for this document
resource-iddocument-resource-idThe resource ID. This value uniquely identifies this document.
descriptiondocument-descriptionHuman-readable description
suggested-filenamedocument-suggested-filenameThe suggested name for the file when downloaded
updateddocument-updatedThe timestamp when the document was updated
contentdocument-contentList of entries, each being a list of type and source URL

Spreadsheet API

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

Contacts API

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

Picasa API

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

Google Code Issue Tracker API

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

ATOM-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:

SlotAccessorDescription
feedsfeed-entry-feedsA list of all atom:link elements
titlefeed-entry-titleThe title of the element
node-domnode-domThe XML node that was read from the Atom feed

About

Access to Google services from Common Lisp

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published