rawsc.rats.service.RatsService Class Reference

Inherits rawsc.service.RawsService.

List of all members.


Detailed Description

RatsService extends RawsService to provide an interface for RATS requests.

Public Member Functions

def __init__
def delete
def getInputFeed
def getInput
def createInput
def updateInput
def getFormatFeed
def getFormat
def createFormat
def updateFormat
def getJobFeed
def getJob
def createJob
def getSrcFeed
def getSrc
def createSrc
def getSrcFromFilename
def deleteSrcFromFilename
def getTranscFeed
def getTransc
def getTranscFromFilename
def deleteTranscFromFilename
def getTranscFile
def getTranscFileFromFilename
def getUser

Member Function Documentation

def rawsc.rats.service.RatsService.__init__ (   self,
  username = None,
  password = None,
  source = None,
  server = SERVER_DEFAULT,
  port = None,
  additional_headers = None,
  handler = None,
  ssl = False 
)

Creates an object of type RawsService.

Args: username: string (optional) The username for authentication. password: string (optional) The user's password. source: string (optional) The name of the user's application. server: string (optional) The name of the server to which a connection will be opened. (eg 'rass.cdn01.rambla.be'). additional_headers: dictionary (optional) Any additional headers which should be included with CRUD operations. handler: module (optional) The module whose HttpRequest function should be used when making requests to the server. The default value is atom.service. ssl: bool (optional) Use SSL encryption.

Reimplemented from rawsc.service.RawsService.

def rawsc.rats.service.RatsService.delete (   self,
  uri 
)

Deletes any resource, given the uri.

def rawsc.rats.service.RatsService.getInputFeed (   self,
  query = None 
)

Retrieves an input feed.

Parameters:
query rawsc.Query object that contains queryset args.
Returns:
InputFeed object

def rawsc.rats.service.RatsService.getInput (   self,
  uri 
)

Retrieves an input entry.

Parameters:
uri path (relative or absolute) to the input instance.
Returns:
InputEntry object

def rawsc.rats.service.RatsService.createInput (   self,
  name,
  description = None,
  base_uri = None,
  method = None,
  cdn = None,
  max_size = None,
  params = None 
)

Tries to POST a new input resource to RATS, containing the params that were passed as string args.

Returns:
InputEntry object

def rawsc.rats.service.RatsService.updateInput (   self,
  entry,
  uri = None 
)

Update an existing input profile, using a PUT request.

Parameters:
entry the complete entry, containing the changed params
uri location of the instance to be updated, if None it will be retrieved from the entry

def rawsc.rats.service.RatsService.getFormatFeed (   self,
  query = None 
)

Retrieves an format feed.

Parameters:
query rawsc.Query object that contains queryset args.
Returns:
FormatFeed object

def rawsc.rats.service.RatsService.getFormat (   self,
  uri 
)

Retrieves an format entry.

Parameters:
uri path (relative or absolute) to the format instance.
Returns:
FormatEntry object

def rawsc.rats.service.RatsService.createFormat (   self,
  name,
  category = "Formats",
  kwargs 
)

Tries to POST a new format resource to RATS, containing the params that were passed as string args.

Returns:
FormatEntry object

def rawsc.rats.service.RatsService.updateFormat (   self,
  entry,
  uri = None 
)

Update an existing format profile, using a PUT request.

Parameters:
entry,: the complete entry, containing the changed params
uri location of the instance to be updated, if None it will be retrieved from the entry

def rawsc.rats.service.RatsService.getJobFeed (   self,
  query = None 
)

Retrieves an job feed.

Parameters:
query rawsc.Query object that contains queryset args.
Returns:
JobFeed object

def rawsc.rats.service.RatsService.getJob (   self,
  uri 
)

Retrieves a job entry.

Parameters:
uri path (relative or absolute) to the job instance.
Returns:
JobEntry object

def rawsc.rats.service.RatsService.createJob (   self,
  input = None,
  output = None,
  format = None,
  src_location = None,
  import_location = None,
  tgt_location = None,
  startpos = None,
  endpos = None,
  client_passthru = None,
  client_input = None 
)

Tries to POST a new input resource to RATS, containing the params that were passed as string args.

Use src_location if the src is already available on the RATS server. Use import_location if the src still needs to be imported.

Returns:
JobEntry object

def rawsc.rats.service.RatsService.getSrcFeed (   self,
  query = None 
)

Retrieves a src feed.

Parameters:
query rawsc.Query object that contains queryset args.
Returns:
SrcFeed object

def rawsc.rats.service.RatsService.getSrc (   self,
  uri 
)

Retrieves a src entry.

Parameters:
uri path (relative or absolute) to the src instance.
Returns:
SrcEntry object

def rawsc.rats.service.RatsService.createSrc (   self,
  filename,
  local_path 
)

Tries to POST a new src resource to RATS.

Parameters:
filename filename to be given to the uploaded file on the RATS server.
local_path location of the file to be uploaded on the local machine
Returns:
SrcEntry object

def rawsc.rats.service.RatsService.getSrcFromFilename (   self,
  filename 
)

Retrieves a src entry from the instance's filename.

Parameters:
filename src instance's filename
Returns:
SrcEntry object

def rawsc.rats.service.RatsService.deleteSrcFromFilename (   self,
  filename 
)

Deletes a src instance from the instance's filename.

Parameters:
filename src instance's filename

def rawsc.rats.service.RatsService.getTranscFeed (   self,
  query = None 
)

Retrieves a transc feed.

Parameters:
query rawsc.Query object that contains queryset args.
Returns:
TranscFeed object

def rawsc.rats.service.RatsService.getTransc (   self,
  uri 
)

Retrieves a transc entry.

Parameters:
uri path (relative or absolute) to the transc instance.
Returns:
TranscEntry object

def rawsc.rats.service.RatsService.getTranscFromFilename (   self,
  filename 
)

Retrieves a transc entry from the instance's filename.

Parameters:
filename transc instance's filename
Returns:
TranscEntry object

def rawsc.rats.service.RatsService.deleteTranscFromFilename (   self,
  filename 
)

Deletes a transc instance from the instance's filename.

Parameters:
filename transc instance's filename
Returns:
TranscEntry object

def rawsc.rats.service.RatsService.getTranscFile (   self,
  uri,
  local_path = None 
)

Downloads a transc file and (optionally) saves it to a local file location.

If local_path is given, an attempt is made to save the downloaded file and an exception is thrown in case of failure. If local_path is None, the downloaded file is not stored. The caller should store it himself using the file_handle attribute of the returned MediaSource object.

Parameters:
uri path (relative or absolute) to the transc media item.
local_path full path, including the filename, to a location where the downloaded file can be stored.
Returns:
rawsc.MediaSource object

def rawsc.rats.service.RatsService.getTranscFileFromFilename (   self,
  filename,
  local_path = None 
)

Retrieves a transc file from the instance's filename.

If local_path is given, an attempt is made to save the downloaded file and an exception is thrown in case of failure. If local_path is None, the downloaded file is not stored. The caller should store it himself using the file_handle attribute of the returned MediaSource object.

Parameters:
filename transc instance's filename
local_path full path, including the filename, to a location where the downloaded file can be stored.
Returns:
rawsc.MediaSource object

def rawsc.rats.service.RatsService.getUser (   self,
  uri 
)

Retrieves an user entry.

Parameters:
uri path (relative or absolute) to the user instance.
Returns:
UserEntry object


Generated on Mon Mar 28 15:03:40 2011 for rawsc by  doxygen 1.5.3