Package googleapiclient :: Module schema :: Class Schemas
[hide private]
[frames] | no frames]

Class Schemas

source code


Schemas for an API.

Instance Methods [hide private]
 
__init__(self, discovery)
Constructor.
source code
 
_prettyPrintByName(self, name, seen=None, dent=0)
Get pretty printed object prototype from the schema name.
source code
 
prettyPrintByName(self, name)
Get pretty printed object prototype from the schema name.
source code
 
_prettyPrintSchema(self, schema, seen=None, dent=0)
Get pretty printed object prototype of schema.
source code
 
prettyPrintSchema(self, schema)
Get pretty printed object prototype of schema.
source code
 
get(self, name, default=None)
Get deserialized JSON schema from the schema name.
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, discovery)
(Constructor)

source code 
Constructor.

Args:
  discovery: object, Deserialized discovery document from which we pull
    out the named schema.

Overrides: object.__init__

_prettyPrintByName(self, name, seen=None, dent=0)

source code 
Get pretty printed object prototype from the schema name.

Args:
  name: string, Name of schema in the discovery document.
  seen: list of string, Names of schema already seen. Used to handle
    recursive definitions.

Returns:
  string, A string that contains a prototype object with
    comments that conforms to the given schema.

Decorators:
  • @util.positional(2)

prettyPrintByName(self, name)

source code 
Get pretty printed object prototype from the schema name.

Args:
  name: string, Name of schema in the discovery document.

Returns:
  string, A string that contains a prototype object with
    comments that conforms to the given schema.

_prettyPrintSchema(self, schema, seen=None, dent=0)

source code 
Get pretty printed object prototype of schema.

Args:
  schema: object, Parsed JSON schema.
  seen: list of string, Names of schema already seen. Used to handle
    recursive definitions.

Returns:
  string, A string that contains a prototype object with
    comments that conforms to the given schema.

Decorators:
  • @util.positional(2)

prettyPrintSchema(self, schema)

source code 
Get pretty printed object prototype of schema.

Args:
  schema: object, Parsed JSON schema.

Returns:
  string, A string that contains a prototype object with
    comments that conforms to the given schema.

get(self, name, default=None)

source code 
Get deserialized JSON schema from the schema name.

Args:
  name: string, Schema name.
  default: object, return value if name not found.