def add_oauth_entries_to_fields_dict(secret, params, nonce=None, timestamp=None):
    " Adds dict entries to the user's params dict which are required for OAuth1.0 signature generation\n\n        :param secret: API secret\n        :param params: dictionary of values which will be sent in the query\n        :param nonce: (Optional) random string used in signature creation, uuid4() is used if not provided\n        :param timestamp: (Optional) integer-format timestamp, time.time() is used if not provided\n        :return: dict containing params and the OAuth1.0 fields required before executing signature.create\n\n        :type secret: str\n        :type params: dict\n        :type nonce: str\n        :type timestamp: int\n\n        :Example:\n\n        >>> from emailage.signature import add_oauth_entries_to_fields_dict\n        >>> query_params = dict(user_email='example@example.com',            query='example@example.com'        )\n        >>> query_params = add_oauth_entries_to_fields_dict('YOUR_API_SECRET', query_params)\n        >>> query_params['oauth_consumer_key']\n        'YOUR_API_SECRET'\n        >>> query_params['oauth_signature_method']\n        'HMAC-SHA1'\n        >>> query_params['oauth_version']\n        1.0\n    "
    if (nonce is None):
        nonce = uuid4()
    if (timestamp is None):
        timestamp = int(time.time())
    params['oauth_consumer_key'] = secret
    params['oauth_nonce'] = nonce
    params['oauth_signature_method'] = 'HMAC-SHA1'
    params['oauth_timestamp'] = timestamp
    params['oauth_version'] = 1.0
    return params
Adds dict entries to the user's params dict which are required for OAuth1.0 signature generation

:param secret: API secret
:param params: dictionary of values which will be sent in the query
:param nonce: (Optional) random string used in signature creation, uuid4() is used if not provided
:param timestamp: (Optional) integer-format timestamp, time.time() is used if not provided
:return: dict containing params and the OAuth1.0 fields required before executing signature.create

:type secret: str
:type params: dict
:type nonce: str
:type timestamp: int

:Example:

>>> from emailage.signature import add_oauth_entries_to_fields_dict
>>> query_params = dict(user_email='example@example.com',            query='example@example.com'        )
>>> query_params = add_oauth_entries_to_fields_dict('YOUR_API_SECRET', query_params)
>>> query_params['oauth_consumer_key']
'YOUR_API_SECRET'
>>> query_params['oauth_signature_method']
'HMAC-SHA1'
>>> query_params['oauth_version']
1.0
def add_oauth_entries_to_fields_dict(secret, params, nonce=None, timestamp=None):
    " Adds dict entries to the user's params dict which are required for OAuth1.0 signature generation\n\n        :param secret: API secret\n        :param params: dictionary of values which will be sent in the query\n        :param nonce: (Optional) random string used in signature creation, uuid4() is used if not provided\n        :param timestamp: (Optional) integer-format timestamp, time.time() is used if not provided\n        :return: dict containing params and the OAuth1.0 fields required before executing signature.create\n\n        :type secret: str\n        :type params: dict\n        :type nonce: str\n        :type timestamp: int\n\n        :Example:\n\n        >>> from emailage.signature import add_oauth_entries_to_fields_dict\n        >>> query_params = dict(user_email='example@example.com',            query='example@example.com'        )\n        >>> query_params = add_oauth_entries_to_fields_dict('YOUR_API_SECRET', query_params)\n        >>> query_params['oauth_consumer_key']\n        'YOUR_API_SECRET'\n        >>> query_params['oauth_signature_method']\n        'HMAC-SHA1'\n        >>> query_params['oauth_version']\n        1.0\n    "
    if (nonce is None):
        nonce = uuid4()
    if (timestamp is None):
        timestamp = int(time.time())
    params['oauth_consumer_key'] = secret
    params['oauth_nonce'] = nonce
    params['oauth_signature_method'] = 'HMAC-SHA1'
    params['oauth_timestamp'] = timestamp
    params['oauth_version'] = 1.0
    return params