Skip Navigation Links.
展开 最小化

SpreadWebServcie.GetUserCredit Method

Get User Credit (the credit information depends on the situation of your account)

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).

accountType

AccountType

the type of account , Email or SMS or WhatsApp

Return Value

Dataset containing a single table with columns Credit(Total), Sent and ExpiryDate

Example

string loginEmail = "Spread@reasonables.com";

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

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

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

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

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

Dim MySpread As New SpreadAPI.SpreadWebService

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

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

         
No sample.