(self)
Loop over the resources in the discovery doc and build definitions.
Loop over the resources in the discovery doc and build definitions.
Loop over the resources in the discovery doc and build definitions .
def _BuildResourceDefinitions(self):
    """Loop over the resources in the discovery doc and build definitions."""
    self._resources = []
    def_dict = self.values.get('resources') or {}
    for name in sorted(def_dict):
      method_dict = def_dict[name].get('methods', {})
      for n in method_dict:
        # make sure all parameters are of type dict (and not list)
        if not method_dict[n].get('parameters'):
          method_dict[n]['parameters'] = {}
      resource = api.Resource(self, name, def_dict[name], parent=self)
      self._resources.append(resource)
def _BuildResourceDefinitions ( self ) : self . _resources = [ ] def_dict = self . values . get ( 'resources' ) or { } for name in sorted ( def_dict ) : method_dict = def_dict [ name ] . get ( 'methods' , { } ) for n in method_dict : # make sure all parameters are of type dict (and not list) if not method_dict [ n ] . get ( 'parameters' ) : method_dict [ n ] [ 'parameters' ] = { } resource = api . Resource ( self , name , def_dict [ name ] , parent = self ) self . _resources . append ( resource )