Package googleapiclient :: Module discovery :: Class ResourceMethodParameters
[hide private]
[frames] | no frames]

Class ResourceMethodParameters

source code

object --+
         |
        ResourceMethodParameters

Represents the parameters associated with a method.

Attributes:
  argmap: Map from method parameter name (string) to query parameter name
      (string).
  required_params: List of required parameters (represented by parameter
      name as string).
  repeated_params: List of repeated parameters (represented by parameter
      name as string).
  pattern_params: Map from method parameter name (string) to regular
      expression (as a string). If the pattern is set for a parameter, the
      value for that parameter must match the regular expression.
  query_params: List of parameters (represented by parameter name as string)
      that will be used in the query string.
  path_params: Set of parameters (represented by parameter name as string)
      that will be used in the base URL path.
  param_types: Map from method parameter name (string) to parameter type. Type
      can be any valid JSON schema type; valid values are 'any', 'array',
      'boolean', 'integer', 'number', 'object', or 'string'. Reference:
      http://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.1
  enum_params: Map from method parameter name (string) to list of strings,
     where each list of strings is the list of acceptable enum values.

Instance Methods [hide private]
 
__init__(self, method_desc)
Constructor for ResourceMethodParameters.
source code
 
set_parameters(self, method_desc)
Populates maps and lists based on method description.
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, method_desc)
(Constructor)

source code 
Constructor for ResourceMethodParameters.

Sets default values and defers to set_parameters to populate.

Args:
  method_desc: Dictionary with metadata describing an API method. Value
      comes from the dictionary of methods stored in the 'methods' key in
      the deserialized discovery document.

Overrides: object.__init__

set_parameters(self, method_desc)

source code 
Populates maps and lists based on method description.

Iterates through each parameter for the method and parses the values from
the parameter dictionary.

Args:
  method_desc: Dictionary with metadata describing an API method. Value
      comes from the dictionary of methods stored in the 'methods' key in
      the deserialized discovery document.