| | |
- exceptions.Exception(exceptions.BaseException)
-
- OmixedException
- FileInfo
- OmixedClient
- OmixedItem
- urllib2.HTTPDefaultErrorHandler(urllib2.BaseHandler)
-
- DefaultErrorHandler
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 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
| |