original_docstring: Adds arguments to the payload as necessary.
docstring: Adds arguments to the payload as necessary.
docstring_tokens: Adds arguments to the payload as necessary .
code: def _add_nec_args(self, payload):
          """Adds arguments to the payload as necessary."""
  
          payload['size'] = self.max_results_per_request
  
          if 'sort' not in payload:
              payload['sort'] = 'desc'
          elif payload.get('sort') != 'desc':
              err_msg = "Support for non-default sort has not been implemented as it may cause unexpected results"
              raise NotImplementedError(err_msg)
  
          if 'metadata' not in payload:
              payload['metadata'] = 'true'
          if 'before' not in payload:
              payload['before'] = int(dt.datetime.now().timestamp())
          if 'filter' in payload:
              if not isinstance(payload['filter'], list):
                  if isinstance(payload['filter'], str):
                      payload['filter'] = [payload['filter']]
                  else:
                      payload['filter'] = list(payload['filter'])
              # make sure that the created_utc field is returned
              if 'created_utc' not in payload['filter']:
                  payload['filter'].append('created_utc')
code_tokens: def _add_nec_args ( self , payload ) : payload [ 'size' ] = self . max_results_per_request if 'sort' not in payload : payload [ 'sort' ] = 'desc' elif payload . get ( 'sort' ) != 'desc' : err_msg = "Support for non-default sort has not been implemented as it may cause unexpected results" raise NotImplementedError ( err_msg ) if 'metadata' not in payload : payload [ 'metadata' ] = 'true' if 'before' not in payload : payload [ 'before' ] = int ( dt . datetime . now ( ) . timestamp ( ) ) if 'filter' in payload : if not isinstance ( payload [ 'filter' ] , list ) : if isinstance ( payload [ 'filter' ] , str ) : payload [ 'filter' ] = [ payload [ 'filter' ] ] else : payload [ 'filter' ] = list ( payload [ 'filter' ] ) if 'created_utc' not in payload [ 'filter' ] : payload [ 'filter' ] . append ( 'created_utc' )
short_docstring: Adds arguments to the payload as necessary.
short_docstring_tokens: Adds arguments to the payload as necessary .
comment: """Adds arguments to the payload as necessary."""$SEP$# make sure that the created_utc field is returned