Skip Navigation Links.
展开 最小化

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.