Skip Navigation Links.
展开 最小化

SpreadWebServcie.GetCampaigns Method

Get Campaigns.

Parameters

Parameter

Type

Description

loginEmail

String

The login email of your Spread account.

APIKey

String

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

pageNumber

Integer

The index of page, the value must greater than 0.

pageSize

Integer

The size of page, the value must greater than 0.

Return Value

Dataset containing a single table with the columns RowNumber, campaign_id,campaign_name,campaign_email,campaign_from,campaign_subject, status_id, cdate_updated

Example

string loginEmail = "Spread@reasonables.com";

string APIKey = "Spread";

int pageNumber = 1;

int pageSize = 10;

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

DataSet result = MySpread.GetCampaigns(loginEmail, APIKey, pageNumber, pageSize);

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

Dim APIKey As String = "Spread"

Dim pageNumber As Integer = 1

Dim pageSize As Integer = 1

Dim MySpread As New SpreadAPI. SpreadWebService

Dim result As DataSet = MySpread.GetCampaigns(loginEmail, APIKey, pageNumber, pageSize)

    /**
    * @name     getUserCampaigns
    * @function get campaigns in the account
    * @return
    *  all campaigns      
    */
    public function getUserCampaigns($loginEmail,$apiKey,$pageNumber,$pageSize){
        $sendArr = array(
	        'loginEmail'        => $loginEmail,
	        'apiKey'	    => $apiKey,
	        'pageNumber'	    => $pageNumber,
	        'pageSize'	    => $pageSize
        );
        $Client=new SoapClient("http://service.rspread.com/Service.asmx?WSDL");
        $result = $Client -> GetCampaigns( $sendArr );
        if( empty( $result ) ){
	        return -1;
        }
        return $result;
    }

         
No sample.