Skip Navigation Links.
展开 最小化

SpreadWebServcie.DeleteCampaign Method

Delete the Campaign.

Parameters

Parameter

Type

Description

loginEmail

String

The login email of your Spread account.

password

String

The password of your Spread account or   API Key which you can retrieve from your Spread account (My account=> Settings).

campaignID

Integer

The ID of Campaign.

Return Value

True - success.

False - Fail. It is an invalid campaignID, or The campaign cannot be deleted.

Example

string loginEmail = "Spread@reasonables.com";

string loginPassword = "Spread";

int campaignID = 1;

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

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

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

Dim loginPassword As String = "Spread"

Dim campaignID As Integer = 1

Dim MySpread As New SpreadAPI. SpreadWebService

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

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

         
No sample.