Skip Navigation Links.
展开 最小化

SpreadWebServcie.GetUserSentReport Method

獲取用戶發送報告。

參數

參數

類型

描述

loginEmail

String

Spread賬號的登錄郵箱.

APIKey

String

Spread賬號的密碼或者. API Key which you can retrieve from your Spread account (My account=> Settings).

accountType

AccountType

查询的账号类型, 邮件, 短信, WhatsApp

startDate

DateTime

報告的開始時間.

endDate

DateTime

報告的結束時間.

返回結果

Dataset 包含一個單表,行:Year, Month, Sent

例子

string loginEmail = "Spread@reasonables.com";

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

// suggest dateTime string format "yyyy-MM-ddTHH:mm:ss" ,such as "2023-02-06T12:11:21" .
DateTime startTime = DateTime.Parse("2023-02-06T12:11:21");
DateTime endTime = DateTime.Parse("2023-02-07T12:11:21");

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

DataSet result = MySpread.GetUserSentReport(loginEmail, APIKey , SpreadAPI.AccountType.Email , startDate , endDate);

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

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

' suggest dateTime string format "yyyy-MM-ddTHH:mm:ss" ,such as "2023-02-06T12:11:21" .
Dim startTime As DateTime = "2023-02-06T12:11:21"
Dim endTime As DateTime = "2023-02-07T12:11:21"

Dim MySpread As New SpreadAPI.SpreadWebService

Dim result As DataSet = MySpread.GetUserCredit(loginEmail, APIKey, SpreadAPI.AccountType.Email)

    /**
    * @name     GetUserSentReport
    * @function get user sent report
    * @param
    *  accountType	the type of account.
    *  startDate         Start time.
    *  endDate           End time.
    * @return
    *          dataset.
    */
    public function GetUserSentReport($loginEmail,$APIKey,$accountType,$startDate,$endDate){
        $array = array(
	        'loginEmail'        => $loginEmail,
	        'APIKey'	    => $APIKey,
	        'accountType'       => $accountType,
                'startDate'         => $startDate,
		'endDate'     	    => $endDate
        );
        $Client=new SoapClient("http://service.rspread.com/Service.asmx?WSDL");
        return $Client -> GetUserSentReport( $array );
    }

         
No sample.

參見