示例#1
0
def delete_draft(account_id, draft_id, args):
    """
    Delete a draft from the remote backend. `args` should contain an
    `inbox_uid` or a `message_id_header` key. This is used to find the draft on
    "the backend.

    """
    inbox_uid = args.get('inbox_uid')
    message_id_header = args.get('message_id_header')
    assert inbox_uid or message_id_header, 'Need at least one header value'
    remote_delete_draft(account_id, inbox_uid, message_id_header)
示例#2
0
def delete_draft(crispin_client, account_id, draft_id, args):
    """
    Delete a draft from the remote backend. `args` should contain an
    `nylas_uid` or a `message_id_header` key. This is used to find the draft on
    "the backend.

    """
    nylas_uid = args.get("nylas_uid")
    message_id_header = args.get("message_id_header")
    assert nylas_uid or message_id_header, "Need at least one header value"
    remote_delete_draft(crispin_client, account_id, nylas_uid, message_id_header)
示例#3
0
文件: base.py 项目: gisho/sync-engine
def delete_draft(account_id, draft_id, args):
    """
    Delete a draft from the remote backend. `args` should contain an
    `inbox_uid` or a `message_id_header` key. This is used to find the draft on
    "the backend.

    """
    inbox_uid = args.get('inbox_uid')
    message_id_header = args.get('message_id_header')
    assert inbox_uid or message_id_header, 'Need at least one header value'
    remote_delete_draft(account_id, inbox_uid, message_id_header)
示例#4
0
def delete_draft(crispin_client, account_id, draft_id, args):
    """
    Delete a draft from the remote backend. `args` should contain an
    `nylas_uid` or a `message_id_header` key. This is used to find the draft on
    "the backend.

    """
    nylas_uid = args.get('nylas_uid')
    message_id_header = args.get('message_id_header')
    assert nylas_uid or message_id_header, 'Need at least one header value'
    remote_delete_draft(crispin_client, account_id, nylas_uid,
                        message_id_header)