parameters: (self)
return_statement: return encoded_str.replace('+', '%20').replace('%7E', '~')
docstring: Return a string that contains the parameters that must be signed.
docstring_summary: Return a string that contains the parameters that must be signed.
docstring_tokens: Return a string that contains the parameters that must be signed .
function: def get_normalized_parameters(self):
          """Return a string that contains the parameters that must be signed."""
          items = []
          for key, value in self.iteritems():
              if key == 'oauth_signature':
                  continue
              # 1.0a/9.1.1 states that kvp must be sorted by key, then by value,
              # so we unpack sequence values into multiple items for sorting.
              if hasattr(value, '__iter__'):
                  items.extend((key, item) for item in value)
              else:
                  items.append((key, value))
  
          # Include any query string parameters from the provided URL
          query = urlparse.urlparse(self.url)[4]
          
          url_items = self._split_url_string(query).items()
          non_oauth_url_items = list([(k, v) for k, v in url_items  if not k.startswith('oauth_')])
          items.extend(non_oauth_url_items)
  
          encoded_str = urllib.urlencode(sorted(items))
          # Encode signature parameters per Oauth Core 1.0 protocol
          # spec draft 7, section 3.6
          # (http://tools.ietf.org/html/draft-hammer-oauth-07#section-3.6)
          # Spaces must be encoded with "%20" instead of "+"
          return encoded_str.replace('+', '%20').replace('%7E', '~')
function_tokens: def get_normalized_parameters ( self ) : items = [ ] for key , value in self . iteritems ( ) : if key == 'oauth_signature' : continue # 1.0a/9.1.1 states that kvp must be sorted by key, then by value, # so we unpack sequence values into multiple items for sorting. if hasattr ( value , '__iter__' ) : items . extend ( ( key , item ) for item in value ) else : items . append ( ( key , value ) ) # Include any query string parameters from the provided URL query = urlparse . urlparse ( self . url ) [ 4 ] url_items = self . _split_url_string ( query ) . items ( ) non_oauth_url_items = list ( [ ( k , v ) for k , v in url_items if not k . startswith ( 'oauth_' ) ] ) items . extend ( non_oauth_url_items ) encoded_str = urllib . urlencode ( sorted ( items ) ) # Encode signature parameters per Oauth Core 1.0 protocol # spec draft 7, section 3.6 # (http://tools.ietf.org/html/draft-hammer-oauth-07#section-3.6) # Spaces must be encoded with "%20" instead of "+" return encoded_str . replace ( '+' , '%20' ) . replace ( '%7E' , '~' )