omixed
index
/Users/buggy/Documents/code/OmixedPythonLibrary/omixed.py

 
Modules
       
httplib
xml.dom.minidom
xml.sax.saxutils
sys
traceback
urllib
urllib2
urllib2_file

 
Classes
       
exceptions.Exception(exceptions.BaseException)
OmixedException
FileInfo
OmixedClient
OmixedItem
urllib2.HTTPDefaultErrorHandler(urllib2.BaseHandler)
DefaultErrorHandler

 
class DefaultErrorHandler(urllib2.HTTPDefaultErrorHandler)
    # taken from http://www.diveintopython.org/http_web_services/
 
 
Method resolution order:
DefaultErrorHandler
urllib2.HTTPDefaultErrorHandler
urllib2.BaseHandler

Methods defined here:
http_error_default(self, req, fp, code, msg, headers)

Methods inherited from urllib2.BaseHandler:
__lt__(self, other)
add_parent(self, parent)
close(self)

Data and other attributes inherited from urllib2.BaseHandler:
handler_order = 500

 
class FileInfo
     Methods defined here:
__init__(self, xml)
__str__(self)

Data and other attributes defined here:
accessGroup = ''
fileID = ''
format = ''
originalName = ''
ownerName = ''
sizeInBytes = ''
uploadTime = ''

 
class OmixedClient
     Methods defined here:
__init__(self, baseURL)
# supply a base url to the server on initialisation
callPost(self, url, data)
# web-service call
connect(self, resourceName, userName, password)
# connect to the resource
create(self, omixedItem)
# creates an item
delete(self, itemID)
# deletes an item
describeSchemaItemType(self, itemType)
# returns the schema as an xml
disconnect(self)
# disconnect from the resource
download(self, fileID, filePath='', fileName=None)
# downloads a file, option to specify your own file name
getDomainName(self)
# get the omixed domain name for this server
getFileInfo(self, fileID)
# returns a FileInfo object for a particular file ID
getItemIDFromType(self, itemType)
# for a particular item type, return the id
getItemIDs(self, partialItemID)
getItemIDsForItemType(self, itemType)
# get the item ids for a particular item type
# not in the server api
getItemTypes(self)
# get the item types for the connected resource
getItems(self, partialItemID, linkExpansionDepth=0)
# get the details for an item
getResourceName(self)
getSessionID(self)
getUserName(self)
getVisibleFiles(self)
# returns a list of FileInfo objects
setExistingSession(self, sessionID, userName, resourceName)
# allows you to pass an existing session to a new client object (instead of connecting)
update(self, omixedItem)
# updates an item
upload(self, filename, accessGroup='public')
# uploads a file and returns a fileID
# uses urllib2_file
validate(self, omixedItem, intendedForUpdate=False)
# creates an item

 
class OmixedException(exceptions.Exception)
    
Method resolution order:
OmixedException
exceptions.Exception
exceptions.BaseException
__builtin__.object

Methods defined here:
__init__(self, value)
__str__(self)

Data descriptors defined here:
__weakref__
list of weak references to the object (if defined)

Data and other attributes inherited from exceptions.Exception:
__new__ = <built-in method __new__ of type object at 0xefb60>
T.__new__(S, ...) -> a new object with type S, a subtype of T

Methods inherited from exceptions.BaseException:
__delattr__(...)
x.__delattr__('name') <==> del x.name
__getattribute__(...)
x.__getattribute__('name') <==> x.name
__getitem__(...)
x.__getitem__(y) <==> x[y]
__reduce__(...)
__repr__(...)
x.__repr__() <==> repr(x)
__setattr__(...)
x.__setattr__('name', value) <==> x.name = value
__setstate__(...)

Data descriptors inherited from exceptions.BaseException:
__dict__
args
message
exception message

 
class OmixedItem
     Methods defined here:
__init__(self)
__str__(self)
# the to string method
getAttribute(self, name)
getFiles(self, name)
getLinks(self, name)
getXML(self)
# returns the item's xml
setAttribute(self, name, attributeValue)
setFile(self, name, fileID)
setLink(self, name, itemID)
setupNewItem(self, client, itemType, itemName, accessGroup='public')
# set up a totally new item
setupXML(self, client, itemID, itemXML)
# create an omixed item from some xml
# itemXML must be an XML node, not a document