SpreadWebServcie.GetCampaigns Method

分頁獲取該賬號下的郵件活動

參數

參數

類型

描述

loginEmail

String

Spread賬號的郵箱地址

APIKey

String

Spread賬號的密碼或者 API Key

pageNumber

Integer

頁碼,值必須大於0。

pageSize

Integer

頁大小,值必須大於0。

返回結果

Dataset 包含一個單表,行:RowNumber, campaign_id,campaign_name,campaign_email,campaign_from,campaign_subject, status_id, cdate_updated

例子

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.