| | |
- exceptions.Exception
-
- LJError
- LiveJournal
- Moods
- record
class LJError(exceptions.Exception) |
| |
|
| |
Data and non-method functions defined here:
- __doc__ = None
- __module__ = 'livejournal.protocol'
Methods inherited from exceptions.Exception:
- __getitem__(...)
- __init__(...)
- __str__(...)
|
class LiveJournal |
| |
Main interface class
Instance attributes:
lj : xmlrpclib.Server
the class implementing all xml-rpc data conversions and exchange
clientversion : string
it's supplied
username : string
hpassword : string
username and password. if username is None, the user is not
"logged in", therefore all methods beside 'login' will fail.
as soon as the user is logged on, the hashed form of the password
is stored and used from that moment on. |
| |
Methods defined here:
- __init__(self, clientversion, base='http://www.livejournal.com/interface/xmlrpc', verbose=0)
- _do_request(self, mode, args)
- _getevents(self, args, usejournal, truncate, prefersubjects, noprops)
- helper function to process what getevents returned
- _logged_in(self)
- _required_headers(self, **other)
- checkfriends(self, lastupdate='', mask=0)
- checkfriends - Checks to see if your friends list has been updated since a specified time.
Mode that clients can use to poll the server to see if their friends
list has been updated. This request is extremely quick, and is the
preferred way for users to see when their friends list is updated,
rather than pounding on reload in their browser, which is stressful on
the serves.
- consolecommand(self, commands)
- consolecommand - Run an administrative command.
The LiveJournal server has a text-based shell-like admininistration
console where less-often used commands can be entered. There's a web
interface to this shell online, and this is another gateway to that.
- editevent(self, id, event, date=None, subject=None, usejournal=None, security=None, when=None, props=None)
- editevent - Edit or delete a user's past journal entry
Modify an already created event. If fields are empty, it will delete
the event.
- editfriendgroups(self, groupmasks=None, set=None, delete=None)
- editfriendgroups - Edit the user's defined groups of friends.
Given several optional lists, will add/delete/update/rename the friends
groups for a user.
- editfriends(self, delete=None, add=None)
- editfriends - Add, edit, or delete friends from the user's friends list.
Takes up to two lists, one of friends to delete and one of friends to add.
Several options are allowed to be specified when adding a friend. It
returns a verbose list of the friends added, if any were.
- format(self, event)
- this function is used for properly formatting entries obtained from the lj-server
- friendof(self, friendoflimit=None)
- friendof - Returns a list of which other LiveJournal users list this user as their friend.
Returns a "friends of" list for a specified user. An optional limit of
returned friends can be supplied.
- getdaycounts(self, usejournal=None)
- getdaycounts - This mode retrieves the number of journal entries per day.
This mode retrieves the number of journal entries per day. Useful for
populating calendar widgets in GUI clients. Optionally a journal can be
specified. It returns a list of the dates and accompanied counts.
- getevent(self, id, usejournal=None, truncate=None, prefersubject=None, noprops=None)
- getevents(self, selecttype, *args, **kws)
- getevents - Download parts of the user's journal.
Given a set of specifications, will return a segment of entries up to a
limit set by the server. Has a set of options for less, extra, or special
data to be returned.
This class is a simple dispatcher: it consumes one argument and calls the
appropriate method.
- getevents_day(self, date, usejournal=None, truncate=None, prefersubject=None, noprops=None)
- getevents_last(self, howmany=None, beforedate=None, usejournal=None, truncate=None, prefersubject=None, noprops=None)
- getevents_sync(self, lastsync=None, usejournal=None, truncate=None, prefersubject=None, noprops=None)
- getfriendgroups(self, friendoflimit=None)
- getfriendgroups - Retrieves a list of the user's defined groups of friends.
Retrieves a list of the user's defined groups of friends.
- getfriends(self, includefriendof=None, includegroups=None, friendlimit=None)
- getfriends - Returns a list of which other LiveJournal users this user lists as their friend.
Returns a verbose list of information on friends a user has listed.
Optionally able to include their friends of list, the friends group
associated with each user, and a limit on the number of friends to
return.
- login(self, user, password, getmoods=None, getmenus=None, getpickws=None, getpickwurls=None)
- login - validate user's password and get base information needed for
client to function
Login to the server, while announcing your client version. The server
returns with whether the password is good or not, the user's name, an
optional message to be displayed to the user, the list of the user's
friend groups, and other things.
- postevent(self, event, subject=None, usejournal=None, security=None, when=None, props=None)
- postevent - The most important mode, this is how a user actually submits a new log entry to the server.
Given all of the require information on a post, optioanlly adding
security or meta data, will create a new entry. Will return the itemid
of the new post.
- syncitems(self, lastsync=None)
- syncitems - Returns a list of all the items that have been created or updated for a user.
Returns a list (or part of a list) of all the items (journal entries,
to-do items, comments) that have been created or updated on LiveJournal
since you last downloaded them. Note that the items themselves are not
returned --- only the item type and the item number. After you get this
you have to go fetch the items using another protocol mode. For journal
entries (type "L"), use the getevents mode with a selecttype of
"syncitems".
Data and non-method functions defined here:
- __doc__ = 'Main interface class\n\n Instance attributes:\n ... is stored and used from that moment on.\n'
- __module__ = 'livejournal.protocol'
|
class Moods |
| |
Helper class to deal with moods. |
| |
Methods defined here:
- __init__(self)
Data and non-method functions defined here:
- __doc__ = 'Helper class to deal with moods.'
- __module__ = 'livejournal.protocol'
|
class record |
| |
helper class to represent structures |
| |
Methods defined here:
- __init__(self, **kw)
Data and non-method functions defined here:
- __doc__ = 'helper class to represent structures'
- __module__ = 'livejournal.protocol'
| |