class documentation

class ResourceMethodParameters(object):

Constructor: ResourceMethodParameters(method_desc)

View In Hierarchy

Represents the parameters associated with a method.

Method __init__ Constructor for ResourceMethodParameters.
Method set_parameters Populates maps and lists based on method description.
Instance Variable argmap Map from method parameter name (string) to query parameter name (string).
Instance Variable 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 Variable 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...
Instance Variable path_params Set of parameters (represented by parameter name as string) that will be used in the base URL path.
Instance Variable 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.
Instance Variable query_params List of parameters (represented by parameter name as string) that will be used in the query string.
Instance Variable repeated_params List of repeated parameters (represented by parameter name as string).
Instance Variable required_params List of required parameters (represented by parameter name as string).
def __init__(self, method_desc):

Constructor for ResourceMethodParameters.

Sets default values and defers to set_parameters to populate.

Parameters
method_descDictionary with metadata describing an API method. Value comes from the dictionary of methods stored in the 'methods' key in the deserialized discovery document.
def set_parameters(self, method_desc):

Populates maps and lists based on method description.

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

Parameters
method_descDictionary with metadata describing an API method. Value comes from the dictionary of methods stored in the 'methods' key in the deserialized discovery document.
argmap: dict =

Map from method parameter name (string) to query parameter name (string).

enum_params: dict =

Map from method parameter name (string) to list of strings, where each list of strings is the list of acceptable enum values.

param_types: dict =

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

path_params: set =

Set of parameters (represented by parameter name as string) that will be used in the base URL path.

pattern_params: dict =

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 =

List of parameters (represented by parameter name as string) that will be used in the query string.

repeated_params: list =

List of repeated parameters (represented by parameter name as string).

required_params: list =

List of required parameters (represented by parameter name as string).