Package buildbot :: Package status :: Package web :: Module status_json :: Class JsonResource
[frames] | no frames]

Class JsonResource

source code

twisted.web.resource.Resource --+
                                |
                               JsonResource
Known Subclasses:

Base class for json data.

Nested Classes

Inherited from twisted.web.resource.Resource: entityType

Instance Methods
 
__init__(self, status)
Adds transparent lazy-child initialization.
source code
 
getChildWithDefault(self, path, request)
Adds transparent support for url ending with /
source code
 
putChild(self, name, res)
Adds the resource's level for help links generation.
source code
 
render_GET(self, request)
Renders a HTTP GET at the http request level.
source code
 
content(*args, **kwargs)
Renders the json dictionaries.
source code
 
asDict(*args, **kwargs)
Generates the json dictionary.
source code

Inherited from twisted.web.resource.Resource: __providedBy__, __provides__, delEntity, getChild, getChildForRequest, getDynamicEntity, getStaticEntity, listDynamicEntities, listDynamicNames, listEntities, listNames, listStaticEntities, listStaticNames, reallyPutEntity, render, render_HEAD

Class Variables
  contentType = 'application/json'
  cache_seconds = 60
  help = None
hash(x)
  pageTitle = None
hash(x)
  level = 0

Inherited from twisted.web.resource.Resource: __implemented__, isLeaf, server

Method Details

__init__(self, status)
(Constructor)

source code 

Adds transparent lazy-child initialization.

Overrides: twisted.web.resource.Resource.__init__

getChildWithDefault(self, path, request)

source code 

Adds transparent support for url ending with /

Overrides: twisted.web.resource.Resource.getChildWithDefault

putChild(self, name, res)

source code 

Adds the resource's level for help links generation.

Overrides: twisted.web.resource.Resource.putChild

content(*args, **kwargs)

source code 

Renders the json dictionaries.

Decorators:
  • @defer.deferredGenerator

asDict(*args, **kwargs)

source code 

Generates the json dictionary.

By default, renders every childs.

Decorators:
  • @defer.deferredGenerator