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.

参见