giantbomb::giantbomb_api::gamedbQueries Class Reference

List of all members.

Public Member Functions

def __init__
def massageText
def textUtf8
def ampReplace
def htmlToString
def getHtmlData
def pubDate
def futureReleaseDate
def findImages
def getImages
def supportedJobs
def translateName
def buildFuncDict
def gameSearch
def gameData

Public Attributes

 config
 error_messages
 baseProcessingDir
 pubDateFormat
 xmlParser
 supportedJobList
 tagTranslations
 imageElements
 FuncDict

Detailed Description

Methods that query api.giantbomb.com for metadata and outputs the results to stdout any errors are output
to stderr.

Definition at line 85 of file giantbomb_api.py.


Member Function Documentation

def giantbomb::giantbomb_api::gamedbQueries::__init__ (   self,
  apikey,
  debug = False 
)
apikey (str/unicode):
    Specify the api.giantbomb.com API key. Applications need their own key.
    See http://api.giantbomb.com to get your own API key

debug (True/False):
     shows verbose debugging information

Definition at line 89 of file giantbomb_api.py.

def giantbomb::giantbomb_api::gamedbQueries::massageText (   self,
  text 
)
Removes HTML markup from a text string.
@param text The HTML source.
@return The plain text.  If the HTML source contains non-ASCII
entities or character references, this is a Unicode string.

Definition at line 135 of file giantbomb_api.py.

def giantbomb::giantbomb_api::gamedbQueries::textUtf8 (   self,
  text 
)

Definition at line 169 of file giantbomb_api.py.

def giantbomb::giantbomb_api::gamedbQueries::ampReplace (   self,
  text 
)
Replace all "&" characters with "&"

Definition at line 181 of file giantbomb_api.py.

def giantbomb::giantbomb_api::gamedbQueries::htmlToString (   self,
  context,
  html 
)
Remove HTML tags and LFs from a string
return the string without HTML tags or LFs

Definition at line 189 of file giantbomb_api.py.

def giantbomb::giantbomb_api::gamedbQueries::getHtmlData (   self,
  context,
  args 
)
Take a HTML string and convert it to an HTML element. Then apply a filter and return
the results.
return filter array
return an empty array if the filter failed to find any values.

Definition at line 198 of file giantbomb_api.py.

def giantbomb::giantbomb_api::gamedbQueries::pubDate (   self,
  context,
  inputArgs 
)
Convert a date/time string in a specified format into a pubDate. The default is the
MNV item format
return the formatted pubDate string
return on error return the original date string

Definition at line 224 of file giantbomb_api.py.

def giantbomb::giantbomb_api::gamedbQueries::futureReleaseDate (   self,
  context,
  gameElement 
)
Convert the "expected" release date into the default MNV item format.
return the formatted pubDate string
return If there is not enough information to make a date then return an empty string

Definition at line 265 of file giantbomb_api.py.

def giantbomb::giantbomb_api::gamedbQueries::findImages (   self,
  context,
  args 
)
Parse the "image" and "description" elements for images and put in a persistant array
return True when there are images available
return False if there are no images

Definition at line 298 of file giantbomb_api.py.

def giantbomb::giantbomb_api::gamedbQueries::getImages (   self,
  context,
  arg 
)
Return an array of image elements that was created be a previous "findImages" function call
return the array of image elements

Definition at line 342 of file giantbomb_api.py.

def giantbomb::giantbomb_api::gamedbQueries::supportedJobs (   self,
  context,
  inputArgs 
)
Validate that the job category is supported by the
Universal Metadata Format item format
return True is supported
return False if not supported

Definition at line 349 of file giantbomb_api.py.

def giantbomb::giantbomb_api::gamedbQueries::translateName (   self,
  context,
  inputArgs 
)
Translate a tag name into the Universal Metadata Format item equivalent
return the translated tag equivalent
return the input name as the name does not need translating and is already been validated

Definition at line 365 of file giantbomb_api.py.

def giantbomb::giantbomb_api::gamedbQueries::buildFuncDict (   self  ) 
Build a dictionary of the XPath extention function for the XSLT stylesheets
Returns nothing

Definition at line 377 of file giantbomb_api.py.

def giantbomb::giantbomb_api::gamedbQueries::gameSearch (   self,
  gameTitle 
)
Display a Game query in XML format:
http://www.mythtv.org/wiki/MythTV_Universal_Metadata_Format
Returns nothing

Definition at line 394 of file giantbomb_api.py.

def giantbomb::giantbomb_api::gamedbQueries::gameData (   self,
  gameId 
)
Display a Game details in XML format:
http://www.mythtv.org/wiki/MythTV_Universal_Metadata_Format
Returns nothing

Definition at line 425 of file giantbomb_api.py.


Member Data Documentation

Definition at line 97 of file giantbomb_api.py.

Definition at line 105 of file giantbomb_api.py.

Definition at line 107 of file giantbomb_api.py.

Definition at line 109 of file giantbomb_api.py.

Definition at line 110 of file giantbomb_api.py.

Definition at line 112 of file giantbomb_api.py.

Definition at line 113 of file giantbomb_api.py.

Definition at line 315 of file giantbomb_api.py.

Definition at line 381 of file giantbomb_api.py.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends
Generated on Fri May 25 06:42:33 2012 for MythTV by  doxygen 1.6.3