Skip Navigation Links.
展开 最小化

SpreadWebServcie.getCampaignID Method

It gets the email campaign id with campaign name.

public int getCampaignID (

string loginEmail,

string APIKey,

string CampaignName

)

Public function getCampaignID ( _

loginEmail As String, _

APIKey As String, _

CampaignName As String _

) As Integer

No sample for PHP.
No sample.

Parameters

Parameter

Type

Description

loginEmail

String

The login email of your Spread account.

APIKey

String

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

CampaignName

String

The campaign's name.

Return Value

Integer of the ID of the campaign.

Example

string loginName = "spread@reasonables.com";

string APIKey = "TEST0000-TEST-0000-TEST-0000TEST0000"; 

string CampaignName= "NoClone Promotion";

  

//Create a SpreadWebService object and use its method.

SpreadWebService MySpread = new SpreadWebService();

 

int campaignID = MySpread.getCampaignID (loginName, loginPassword, CampaignName);

Dim loginName As String = "spread@reasonables.com"

Dim APIKey As String = "TEST0000-TEST-0000-TEST-0000TEST0000"

Dim CampaignName As String = "NoClone Promotion"

 

'Create a SpreadWebService object and use its method.

Dim MySpread As New SpreadWebService

 

Dim campaignID As Integer = MySpread.getCampaignID(loginName, APIKey , CampaignName)

  /**
    * @name     getCampaignID
    * @function get the id of Campaign
    * @param
    *  loginEmail Login Email of Spread.
    *  APIKey Spread account API Key.
    *  CampaignName   The name of campaign
    * @return
    *  		campaignID.
    */
    public function getCampaignID($loginEmail,$APIKey,$CampaignName){
        $paraArray = array(
	            'loginEmail' 	=> $loginEmail,
	            'APIKey'     	=> $APIKey,
		    'CampaignName'      => $CampaignName
        );
        $Client = new SoapClient("http://service.rspread.com/Service.asmx?WSDL");
        $campaignID = $Client -> getCampaignID( $paraArray );
        return $campaignID ;
    }
         
No sample.