MythTV master
Public Member Functions | Public Attributes | List of all members
giantbomb.giantbomb_api.gamedbQueries Class Reference

Public Member Functions

def __init__ (self, apikey, debug=False)
 
def massageText (self, text)
 
def textUtf8 (self, text)
 
def ampReplace (self, text)
 
def htmlToString (self, context, html)
 
def getHtmlData (self, context, *args)
 
def pubDate (self, context, *inputArgs)
 
def futureReleaseDate (self, context, gameElement)
 
def findImages (self, context, *args)
 
def getImages (self, context, arg)
 
def supportedJobs (self, context, *inputArgs)
 
def translateName (self, context, *inputArgs)
 
def buildFuncDict (self)
 
def gameSearch (self, gameTitle)
 
def gameData (self, gameId)
 

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 90 of file giantbomb_api.py.

Constructor & Destructor Documentation

◆ __init__()

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 https://www.giantbomb.com/api/ to get your own API key

debug (True/False):
     shows verbose debugging information

Definition at line 94 of file giantbomb_api.py.

Member Function Documentation

◆ ampReplace()

def giantbomb.giantbomb_api.gamedbQueries.ampReplace (   self,
  text 
)

◆ buildFuncDict()

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

Definition at line 392 of file giantbomb_api.py.

Referenced by giantbomb.giantbomb_api.gamedbQueries.gameData(), and giantbomb.giantbomb_api.gamedbQueries.gameSearch().

◆ findImages()

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 313 of file giantbomb_api.py.

◆ futureReleaseDate()

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 280 of file giantbomb_api.py.

◆ gameData()

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

Definition at line 449 of file giantbomb_api.py.

◆ gameSearch()

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

Definition at line 409 of file giantbomb_api.py.

◆ getHtmlData()

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 211 of file giantbomb_api.py.

◆ getImages()

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 357 of file giantbomb_api.py.

◆ htmlToString()

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 202 of file giantbomb_api.py.

◆ massageText()

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 141 of file giantbomb_api.py.

Referenced by giantbomb.giantbomb_api.gamedbQueries.htmlToString(), and nv_python_libs.common.common_api.Common.htmlToString().

◆ pubDate()

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 237 of file giantbomb_api.py.

◆ supportedJobs()

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 364 of file giantbomb_api.py.

◆ textUtf8()

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

◆ translateName()

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 380 of file giantbomb_api.py.

Member Data Documentation

◆ baseProcessingDir

giantbomb.giantbomb_api.gamedbQueries.baseProcessingDir

◆ config

giantbomb.giantbomb_api.gamedbQueries.config

Definition at line 105 of file giantbomb_api.py.

Referenced by hardwareprofile.gate._Gate._grants(), nv_python_libs.bliptv.bliptv_api.Videos._initLogger(), nv_python_libs.dailymotion.dailymotion_api.Videos._initLogger(), nv_python_libs.mtv.mtv_api.Videos._initLogger(), nv_python_libs.vimeo.vimeo_api.Videos._initLogger(), nv_python_libs.youtube.youtube_api.Videos._initLogger(), nv_python_libs.mainProcess.siteQueries.displayHTML(), nv_python_libs.bbciplayer.bbciplayer_api.Videos.displayTreeView(), nv_python_libs.dailymotion.dailymotion_api.Videos.displayTreeView(), nv_python_libs.hulu.hulu_api.Videos.displayTreeView(), nv_python_libs.mainProcess.siteQueries.displayTreeView(), nv_python_libs.mashups.mashups_api.Videos.displayTreeView(), nv_python_libs.rev3.rev3_api.Videos.displayTreeView(), nv_python_libs.thewb.thewb_api.Videos.displayTreeView(), nv_python_libs.vimeo.vimeo_api.Videos.displayTreeView(), giantbomb.giantbomb_api.gamedbQueries.gameData(), giantbomb.giantbomb_api.gamedbQueries.gameSearch(), nv_python_libs.bbciplayer.bbciplayer_api.Videos.getBBCConfig(), nv_python_libs.bliptv.bliptv_api.Videos.getCategories(), nv_python_libs.hulu.hulu_api.Videos.getHuluConfig(), nv_python_libs.mashups.mashups_api.Videos.getMashupsConfig(), nv_python_libs.pbs.pbs_api.Videos.getPBSConfig(), nv_python_libs.rev3.rev3_api.Videos.getRev3Config(), nv_python_libs.youtube.youtube_api.Videos.getSearchResults(), nv_python_libs.tedtalks.tedtalks_api.Videos.getTedTalksConfig(), nv_python_libs.thewb.thewb_api.Videos.getTheWBConfig(), nv_python_libs.mnvsearch.mnvsearch_api.Videos.getTreeviewData(), nv_python_libs.bbciplayer.bbciplayer_api.Videos.getUserPreferences(), nv_python_libs.hulu.hulu_api.Videos.getUserPreferences(), nv_python_libs.mashups.mashups_api.Videos.getUserPreferences(), nv_python_libs.pbs.pbs_api.Videos.getUserPreferences(), nv_python_libs.rev3.rev3_api.Videos.getUserPreferences(), nv_python_libs.tedtalks.tedtalks_api.Videos.getUserPreferences(), nv_python_libs.thewb.thewb_api.Videos.getUserPreferences(), nv_python_libs.youtube.youtube_api.Videos.getUserPreferences(), nv_python_libs.youtube.youtube_api.Videos.getVideoCategories(), nv_python_libs.rev3.rev3_api.Videos.getVideoID(), nv_python_libs.bliptv.bliptv_api.Videos.getVideos(), nv_python_libs.dailymotion.dailymotion_api.Videos.getVideos(), nv_python_libs.mtv.mtv_api.Videos.getVideos(), nv_python_libs.vimeo.vimeo_api.Videos.getVideos(), nv_python_libs.dailymotion.dailymotion_api.Videos.getVideosForGroupURL(), nv_python_libs.bliptv.bliptv_api.Videos.getVideosForURL(), nv_python_libs.dailymotion.dailymotion_api.Videos.getVideosForURL(), nv_python_libs.mtv.mtv_api.Videos.getVideosForURL(), nv_python_libs.youtube.youtube_api.Videos.getVideosForURL(), nv_python_libs.bbciplayer.bbciplayer_api.Videos.searchForVideos(), nv_python_libs.hulu.hulu_api.Videos.searchForVideos(), nv_python_libs.mashups.mashups_api.Videos.searchForVideos(), nv_python_libs.rev3.rev3_api.Videos.searchForVideos(), nv_python_libs.tedtalks.tedtalks_api.Videos.searchForVideos(), nv_python_libs.thewb.thewb_api.Videos.searchForVideos(), nv_python_libs.mnvsearch.mnvsearch_api.Videos.searchForVideos(), nv_python_libs.bbciplayer.bbciplayer_api.Videos.searchTitle(), nv_python_libs.bliptv.bliptv_api.Videos.searchTitle(), nv_python_libs.dailymotion.dailymotion_api.Videos.searchTitle(), nv_python_libs.hulu.hulu_api.Videos.searchTitle(), nv_python_libs.mtv.mtv_api.Videos.searchTitle(), nv_python_libs.rev3.rev3_api.Videos.searchTitle(), nv_python_libs.tedtalks.tedtalks_api.Videos.searchTitle(), nv_python_libs.mnvsearch.mnvsearch_api.Videos.searchTitle(), nv_python_libs.thewb.thewb_api.Videos.searchTitle(), nv_python_libs.pbs.pbs_api.Videos.updatePBS(), nv_python_libs.rev3.rev3_api.Videos.updateRev3(), nv_python_libs.tedtalks.tedtalks_api.Videos.updateTedTalks(), nv_python_libs.thewb.thewb_api.Videos.updateTheWB(), and nv_python_libs.mtv.mtv_api.Videos.videoDetails().

◆ error_messages

giantbomb.giantbomb_api.gamedbQueries.error_messages

Definition at line 114 of file giantbomb_api.py.

Referenced by nv_python_libs.bbciplayer.bbciplayer_api.Videos.displayTreeView(), nv_python_libs.hulu.hulu_api.Videos.displayTreeView(), nv_python_libs.mashups.mashups_api.Videos.displayTreeView(), nv_python_libs.rev3.rev3_api.Videos.displayTreeView(), nv_python_libs.thewb.thewb_api.Videos.displayTreeView(), nv_python_libs.vimeo.vimeo_api.Videos.displayTreeView(), nv_python_libs.bbciplayer.bbciplayer_api.Videos.getBBCConfig(), nv_python_libs.bliptv.bliptv_api.Videos.getCategories(), nv_python_libs.hulu.hulu_api.Videos.getHuluConfig(), nv_python_libs.mashups.mashups_api.Videos.getMashupsConfig(), nv_python_libs.pbs.pbs_api.Videos.getPBSConfig(), nv_python_libs.rev3.rev3_api.Videos.getRev3Config(), nv_python_libs.youtube.youtube_api.Videos.getSearchResults(), nv_python_libs.tedtalks.tedtalks_api.Videos.getTedTalksConfig(), nv_python_libs.thewb.thewb_api.Videos.getTheWBConfig(), nv_python_libs.vimeo.vimeo_api.Videos.getTreeVideos(), nv_python_libs.youtube.youtube_api.Videos.getVideoCategories(), nv_python_libs.youtube.youtube_api.Videos.getVideoDetails(), nv_python_libs.dailymotion.dailymotion_api.Videos.getVideosForGroupURL(), nv_python_libs.bliptv.bliptv_api.Videos.getVideosForURL(), nv_python_libs.dailymotion.dailymotion_api.Videos.getVideosForURL(), nv_python_libs.mtv.mtv_api.Videos.getVideosForURL(), nv_python_libs.youtube.youtube_api.Videos.getVideosForURL(), nv_python_libs.bbciplayer.bbciplayer_api.Videos.searchForVideos(), nv_python_libs.bliptv.bliptv_api.Videos.searchForVideos(), nv_python_libs.hulu.hulu_api.Videos.searchForVideos(), nv_python_libs.mashups.mashups_api.Videos.searchForVideos(), nv_python_libs.rev3.rev3_api.Videos.searchForVideos(), nv_python_libs.tedtalks.tedtalks_api.Videos.searchForVideos(), nv_python_libs.thewb.thewb_api.Videos.searchForVideos(), nv_python_libs.bbciplayer.bbciplayer_api.Videos.searchTitle(), nv_python_libs.bliptv.bliptv_api.Videos.searchTitle(), nv_python_libs.hulu.hulu_api.Videos.searchTitle(), nv_python_libs.mtv.mtv_api.Videos.searchTitle(), nv_python_libs.rev3.rev3_api.Videos.searchTitle(), nv_python_libs.tedtalks.tedtalks_api.Videos.searchTitle(), nv_python_libs.vimeo.vimeo_api.Videos.searchTitle(), nv_python_libs.mnvsearch.mnvsearch_api.Videos.searchTitle(), nv_python_libs.thewb.thewb_api.Videos.searchTitle(), nv_python_libs.pbs.pbs_api.Videos.updatePBS(), nv_python_libs.rev3.rev3_api.Videos.updateRev3(), nv_python_libs.tedtalks.tedtalks_api.Videos.updateTedTalks(), nv_python_libs.thewb.thewb_api.Videos.updateTheWB(), and nv_python_libs.mtv.mtv_api.Videos.videoDetails().

◆ FuncDict

giantbomb.giantbomb_api.gamedbQueries.FuncDict

◆ imageElements

giantbomb.giantbomb_api.gamedbQueries.imageElements

Definition at line 330 of file giantbomb_api.py.

Referenced by giantbomb.giantbomb_api.gamedbQueries.getImages().

◆ pubDateFormat

giantbomb.giantbomb_api.gamedbQueries.pubDateFormat

◆ supportedJobList

giantbomb.giantbomb_api.gamedbQueries.supportedJobList

◆ tagTranslations

giantbomb.giantbomb_api.gamedbQueries.tagTranslations

◆ xmlParser

giantbomb.giantbomb_api.gamedbQueries.xmlParser

Definition at line 119 of file giantbomb_api.py.


The documentation for this class was generated from the following file: