Skip Navigation Links.
展开 最小化

SpreadWebServcie.UpdateCampaignStatus Method

更新邮件活动状态

参数

参数

类型

描述

loginEmail

String

Spread账号的邮箱地址

password

String

Spread账号的密码或者  API Key

campaignID

Integer

待更新的邮件活动ID

campaignStatus

CampaignStatus

新的邮件活动状态(只有邮件活动状态为"Sending"或者"Waiting"才能更新至"Pause",或者邮件活动状态为"Pause"可以被更新至"Waiting")

返回结果

True - 成功更新邮件活动状态。

False - 未能成功更新邮件活动状态。

例子

string loginEmail = "Spread@reasonables.com";

string loginPassword = "Spread";

int campaignID = 1;

campaignStatus campaignStatus = CampaignStatus.Pause;

SpreadAPI. SpreadWebService MySpread = new SpreadAPI. SpreadWebService ();

bool result = MySpread.UpdateCampaignStatus(loginEmail, loginPassword, campaignID, campaignStatus);

Dim loginEmail As String = "Spread@reasonables.com"

Dim loginPassword As String = "Spread"

Dim campaignID As Integer = 1

Dim campaignStatus As String = CampaignStatus.Pause

Dim MySpread As New SpreadAPI. SpreadWebService

Dim result As Boolean = MySpread.UpdateCampaignStatus(loginEmail, loginPassword, campaignID, campaignStatus)

    /**
    * @name     updateCampaignStatus
    * @function update campaign status
    * @param
    *  campaignID	the campaign ID you want to update as campaignID
    * @return
    *  error message       failed.
    *  1        success.
    */
    public function updateCampaignStatus($loginEmail,$password,$campaignID,$campaignStatus ){
        $sendArr = array(
	        'loginEmail'        => $loginEmail,
	        'password'	    => $password,
	        'campaignID'       => $campaignID,
	        'campaignStatus'       => $campaignStatus
        );
        $Client=new SoapClient("http://service.rspread.com/Service.asmx?WSDL");
        $flag = $Client -> UpdateCampaignStatus( $sendArr );
        if( empty( $flag ) ){
	        return -1;
        }
        return 1;
    }

         
No sample.