gdata.codesearch | index /usr/local/svn/gdata-python-client/src/gdata/codesearch/__init__.py

`Contains extensions to Atom objects used by Google Codesearch`

Package Contents

``

service |  |  |

Classes

``

atom.AtomBase(atom.ExtensionContainer)
  File
  Match
  Package
gdata.GDataEntry(atom.Entry, gdata.LinkFinder)
  CodesearchEntry
gdata.GDataFeed(atom.Feed, gdata.LinkFinder)
  CodesearchFeed

class CodesearchEntry(gdata.GDataEntry)
`` | `Google codesearch atom entry`

Method resolution order:
  CodesearchEntry
  gdata.GDataEntry
  atom.Entry
  atom.FeedEntryParent
  atom.AtomBase
  atom.ExtensionContainer
  gdata.LinkFinder
  atom.LinkFinder
  __builtin__.object

Methods defined here:

__init__(self, author=None, category=None, content=None, atom_id=None, link=None, published=None, title=None, updated=None, match=None, extension_elements=None, extension_attributes=None, text=None)

Methods inherited from gdata.GDataEntry:

GetMediaURL(self)
  `Returns the URL to the media content, if the entry is a media entry.
  Otherwise returns None.`

IsMedia(self)
  `Determines whether or not an entry is a GData Media entry.`

Data descriptors inherited from gdata.GDataEntry:

id

Methods inherited from atom.AtomBase:

ToString(self, string_encoding='UTF-8')
  `Converts the Atom object to a string containing XML.`

__str__(self)

Methods inherited from atom.ExtensionContainer:

FindExtensions(self, tag=None, namespace=None)
  `Searches extension elements for child nodes with the desired name.
  Returns a list of extension elements within this object whose tag
  and/or namespace match those passed in. To find all extensions in
  a particular namespace, specify the namespace but not the tag name.
  If you specify only the tag, the result list may contain extension
  elements in multiple namespaces.
  Args:
  tag: str (optional) The desired tag
  namespace: str (optional) The desired namespace
  Returns:
  A list of elements whose tag and/or namespace match the parameters
  values`

Data descriptors inherited from atom.ExtensionContainer:

__dict__
  `dictionary for instance variables (if defined)`

__weakref__
  `list of weak references to the object (if defined)`

Methods inherited from gdata.LinkFinder:

GetAclLink(self)

GetEditLink(self)

GetEditMediaLink(self)
  `The Picasa API mistakenly returns media-edit rather than edit-media, but
  this may change soon.`

GetFeedLink(self)

GetHtmlLink(self)
  `Find the first link with rel of alternate and type of text/html
  Returns:
  An atom.Link or None if no links matched`

GetNextLink(self)

GetPostLink(self)
  `Get a link containing the POST target URL.
  The POST target URL is used to insert new entries.
  Returns:
  A link object with a rel matching the POST type.`

GetPrevLink(self)

GetSelfLink(self)
  `Find the first link with rel set to 'self'
  Returns:
  An atom.Link or none if none of the links had rel equal to 'self'`

Methods inherited from atom.LinkFinder:

GetAlternateLink(self)

GetLicenseLink(self)

class CodesearchFeed(gdata.GDataFeed)
`` | `feed containing list of Google codesearch Items`

Method resolution order:
  CodesearchFeed
  gdata.GDataFeed
  atom.Feed
  atom.Source
  atom.FeedEntryParent
  atom.AtomBase
  atom.ExtensionContainer
  gdata.LinkFinder
  atom.LinkFinder
  __builtin__.object

Methods inherited from gdata.GDataFeed:

__init__(self, author=None, category=None, contributor=None, generator=None, icon=None, atom_id=None, link=None, logo=None, rights=None, subtitle=None, title=None, updated=None, entry=None, total_results=None, start_index=None, items_per_page=None, extension_elements=None, extension_attributes=None, text=None)
  `Constructor for Source
  Args:
  author: list (optional) A list of Author instances which belong to this
  class.
  category: list (optional) A list of Category instances
  contributor: list (optional) A list on Contributor instances
  generator: Generator (optional)
  icon: Icon (optional)
  id: Id (optional) The entry's Id element
  link: list (optional) A list of Link instances
  logo: Logo (optional)
  rights: Rights (optional) The entry's Rights element
  subtitle: Subtitle (optional) The entry's subtitle element
  title: Title (optional) the entry's title element
  updated: Updated (optional) the entry's updated element
  entry: list (optional) A list of the Entry instances contained in the
  feed.
  text: String (optional) The text contents of the element. This is the
  contents of the Entry's XML text node.
  (Example: <foo>This is the text</foo>)
  extension_elements: list (optional) A list of ExtensionElement instances
  which are children of this element.
  extension_attributes: dict (optional) A dictionary of strings which are
  the values for additional XML attributes of this element.`

Data descriptors inherited from gdata.GDataFeed:

generator

id

Methods inherited from atom.AtomBase:

ToString(self, string_encoding='UTF-8')
  `Converts the Atom object to a string containing XML.`

__str__(self)

Methods inherited from atom.ExtensionContainer:

FindExtensions(self, tag=None, namespace=None)
  `Searches extension elements for child nodes with the desired name.
  Returns a list of extension elements within this object whose tag
  and/or namespace match those passed in. To find all extensions in
  a particular namespace, specify the namespace but not the tag name.
  If you specify only the tag, the result list may contain extension
  elements in multiple namespaces.
  Args:
  tag: str (optional) The desired tag
  namespace: str (optional) The desired namespace
  Returns:
  A list of elements whose tag and/or namespace match the parameters
  values`

Data descriptors inherited from atom.ExtensionContainer:

__dict__
  `dictionary for instance variables (if defined)`

__weakref__
  `list of weak references to the object (if defined)`

Methods inherited from gdata.LinkFinder:

GetAclLink(self)

GetEditLink(self)

GetEditMediaLink(self)
  `The Picasa API mistakenly returns media-edit rather than edit-media, but
  this may change soon.`

GetFeedLink(self)

GetHtmlLink(self)
  `Find the first link with rel of alternate and type of text/html
  Returns:
  An atom.Link or None if no links matched`

GetNextLink(self)

GetPostLink(self)
  `Get a link containing the POST target URL.
  The POST target URL is used to insert new entries.
  Returns:
  A link object with a rel matching the POST type.`

GetPrevLink(self)

GetSelfLink(self)
  `Find the first link with rel set to 'self'
  Returns:
  An atom.Link or none if none of the links had rel equal to 'self'`

Methods inherited from atom.LinkFinder:

GetAlternateLink(self)

GetLicenseLink(self)

class File(atom.AtomBase)
`` | `The Google Codesearch file element`

Method resolution order:
  File
  atom.AtomBase
  atom.ExtensionContainer
  __builtin__.object

Methods defined here:

__init__(self, name=None, extension_elements=None, extension_attributes=None, text=None)

Methods inherited from atom.AtomBase:

ToString(self, string_encoding='UTF-8')
  `Converts the Atom object to a string containing XML.`

__str__(self)

Methods inherited from atom.ExtensionContainer:

FindExtensions(self, tag=None, namespace=None)
  `Searches extension elements for child nodes with the desired name.
  Returns a list of extension elements within this object whose tag
  and/or namespace match those passed in. To find all extensions in
  a particular namespace, specify the namespace but not the tag name.
  If you specify only the tag, the result list may contain extension
  elements in multiple namespaces.
  Args:
  tag: str (optional) The desired tag
  namespace: str (optional) The desired namespace
  Returns:
  A list of elements whose tag and/or namespace match the parameters
  values`

Data descriptors inherited from atom.ExtensionContainer:

__dict__
  `dictionary for instance variables (if defined)`

__weakref__
  `list of weak references to the object (if defined)`

class Match(atom.AtomBase)
`` | `The Google Codesearch match element`

Method resolution order:
  Match
  atom.AtomBase
  atom.ExtensionContainer
  __builtin__.object

Methods defined here:

__init__(self, line_number=None, type=None, extension_elements=None, extension_attributes=None, text=None)

Methods inherited from atom.AtomBase:

ToString(self, string_encoding='UTF-8')
  `Converts the Atom object to a string containing XML.`

__str__(self)

Methods inherited from atom.ExtensionContainer:

FindExtensions(self, tag=None, namespace=None)
  `Searches extension elements for child nodes with the desired name.
  Returns a list of extension elements within this object whose tag
  and/or namespace match those passed in. To find all extensions in
  a particular namespace, specify the namespace but not the tag name.
  If you specify only the tag, the result list may contain extension
  elements in multiple namespaces.
  Args:
  tag: str (optional) The desired tag
  namespace: str (optional) The desired namespace
  Returns:
  A list of elements whose tag and/or namespace match the parameters
  values`

Data descriptors inherited from atom.ExtensionContainer:

__dict__
  `dictionary for instance variables (if defined)`

__weakref__
  `list of weak references to the object (if defined)`

class Package(atom.AtomBase)
`` | `The Google Codesearch package element`

Method resolution order:
  Package
  atom.AtomBase
  atom.ExtensionContainer
  __builtin__.object

Methods defined here:

__init__(self, name=None, uri=None, extension_elements=None, extension_attributes=None, text=None)

Methods inherited from atom.AtomBase:

ToString(self, string_encoding='UTF-8')
  `Converts the Atom object to a string containing XML.`

__str__(self)

Methods inherited from atom.ExtensionContainer:

FindExtensions(self, tag=None, namespace=None)
  `Searches extension elements for child nodes with the desired name.
  Returns a list of extension elements within this object whose tag
  and/or namespace match those passed in. To find all extensions in
  a particular namespace, specify the namespace but not the tag name.
  If you specify only the tag, the result list may contain extension
  elements in multiple namespaces.
  Args:
  tag: str (optional) The desired tag
  namespace: str (optional) The desired namespace
  Returns:
  A list of elements whose tag and/or namespace match the parameters
  values`

Data descriptors inherited from atom.ExtensionContainer:

__dict__
  `dictionary for instance variables (if defined)`

__weakref__
  `list of weak references to the object (if defined)`

Functions

``

CodesearchEntryFromString(xml_string)
  `Converts an XML string into a CodesearchEntry object.
  Args:
  xml_string: string The XML describing a Codesearch feed entry.
  Returns:
  A CodesearchEntry object corresponding to the given XML.`

CodesearchFeedFromString(xml_string)
  `Converts an XML string into a CodesearchFeed object.
  Args:
  xml_string: string The XML describing a Codesearch feed.
  Returns:
  A CodeseartchFeed object corresponding to the given XML.`

Data
`` |  | CODESEARCH_NAMESPACE = 'http://schemas.google.com/codesearch/2006' CODESEARCH_TEMPLATE = '{http://shema.google.com/codesearch/2006}%s' __author__ = 'Benoit Chesneau'

Author
`` |  | Benoit Chesneau