コード例 #1
0
        print 'Code: ' + str(getResponse.code)
        print 'Message: ' + str(getResponse.message)
        print 'MoreResults: ' + str(getResponse.more_results)
        print 'RequestID: ' + str(getResponse.request_id)
        print 'Results Length: ' + str(len(getResponse.results))
    '''

    """
    Asynchronous Soap request to perform Subscriber POST
    """
    ######################################################

    # Explicitly passing the parameter, RequestType and QueuePriority
    createOptions = ET_CreateOptions(RequestType, QueuePriority)
    createOptions.auth_stub = stubObj
    subscriber = ET_Subscriber()
    subscriber.auth_stub = stubObj
    subscriber.props = {"EmailAddress": "*****@*****.**", "SubscriberKey": "exacrtarget001"}
    subscriber.props['Attributes'] = [{'Name': 'First Name', 'Value': 'John'}]
    subscriber.createOptions = createOptions
    results = subscriber.post()
    print 'Post Status: ' + str(results.status)
    print 'Code: ' + str(results.code)
    print 'Message: ' + str(results.message)
    print 'Result Count: ' + str(len(results.results))
    print 'Results: ' + str(results.results)

    """
    Asynchronous Soap request to perform Subscirber PATCH
    """
    #######################################################
コード例 #2
0
        print 'Retrieve Status: ' + str(getResponse.status)
        print 'Code: ' + str(getResponse.code)
        print 'Message: ' + str(getResponse.message)
        print 'MoreResults: ' + str(getResponse.more_results)
        print 'RequestID: ' + str(getResponse.request_id)
        print 'Results Length: ' + str(len(getResponse.results))
    '''
    """
    Asynchronous Soap request to perform Subscriber POST
    """
    ######################################################

    # Explicitly passing the parameter, RequestType and QueuePriority
    createOptions = ET_CreateOptions(RequestType, QueuePriority)
    createOptions.auth_stub = stubObj
    subscriber = ET_Subscriber()
    subscriber.auth_stub = stubObj
    subscriber.props = {
        "EmailAddress": "*****@*****.**",
        "SubscriberKey": "exacrtarget001"
    }
    subscriber.props['Attributes'] = [{'Name': 'First Name', 'Value': 'John'}]
    subscriber.createOptions = createOptions
    results = subscriber.post()
    print 'Post Status: ' + str(results.status)
    print 'Code: ' + str(results.code)
    print 'Message: ' + str(results.message)
    print 'Result Count: ' + str(len(results.results))
    print 'Results: ' + str(results.results)
    """
    Asynchronous Soap request to perform Subscirber PATCH
コード例 #3
0
        deleteSub.props = {"ID" : newListID}
        deleteResponse = deleteSub.delete()
        print 'Delete Status: ' + str(deleteResponse.status)
        print 'Code: ' + str(deleteResponse.code)
        print 'Message: ' + str(deleteResponse.message)
        print 'Results Length: ' + str(len(deleteResponse.results))
        print 'Results: ' + str(deleteResponse.results)


        #Asynchronous Soap request to create Subscriber, POST method
        ############################################################

        #Explicitly passing the parameter, RequestType & QueuePriority
        createOptions = ET_CreateOptions(RequestType, QueuePriority)
        createOptions.auth_stub = myClient
        subscriber = ET_Subscriber()
        subscriber.auth_stub = myClient
        subscriber.props = {"EmailAddress": "*****@*****.**", "SubscriberKey": "xyz@exacttarget", "Status": "Active"}
        subscriber.createOptions = createOptions
        results = subscriber.post()
        print 'Post Status: ' + str(results.status)
        print 'Code: ' + str(results.code)
        print 'Message: ' + str(results.message)
        print 'Result Count: ' + str(len(results.results))
        print 'Results: ' + str(results.results)

        # Asynchronous Soap request to update Subscriber, Patch method
        ############################################################

        # Explicitly passing the parameter, RequestType & QueuePriority
        updateOptions = ET_UpdateOptions(RequestType, QueuePriority)
コード例 #4
0
        deleteSub.auth_stub = stubObj
        deleteSub.props = {"ID": newListID}
        deleteResponse = deleteSub.delete()
        print 'Delete Status: ' + str(deleteResponse.status)
        print 'Code: ' + str(deleteResponse.code)
        print 'Message: ' + str(deleteResponse.message)
        print 'Results Length: ' + str(len(deleteResponse.results))
        print 'Results: ' + str(deleteResponse.results)

        #Asynchronous Soap request to create Subscriber, POST method
        ############################################################

        #Explicitly passing the parameter, RequestType & QueuePriority
        createOptions = ET_CreateOptions(RequestType, QueuePriority)
        createOptions.auth_stub = myClient
        subscriber = ET_Subscriber()
        subscriber.auth_stub = myClient
        subscriber.props = {
            "EmailAddress": "*****@*****.**",
            "SubscriberKey": "xyz@exacttarget",
            "Status": "Active"
        }
        subscriber.createOptions = createOptions
        results = subscriber.post()
        print 'Post Status: ' + str(results.status)
        print 'Code: ' + str(results.code)
        print 'Message: ' + str(results.message)
        print 'Result Count: ' + str(len(results.results))
        print 'Results: ' + str(results.results)

        # Asynchronous Soap request to update Subscriber, Patch method