Skip Navigation Links.
展开 最小化

SpreadWebServcie.CreateNewAccount Method

下面的例子展示如何添加新的子賬號.

參數

參數

類型

描述

loginEmail

String

Spread賬號的登錄郵箱.

password

String

Spread賬號的密碼或者API Key.

newAccountName 

String

新賬號的名稱.

newAccountEmail

String

新賬號的登錄郵箱.

newAccountPassword

String

新賬號的密碼.

返回結果

True 如果成功,否則False.

例子

string loginName = "spread@reasonables.com";

string loginPassword = "spread";

string newAccountName = "newAccount";

string newAccountEmail = "newSpreader@reasonables.com";

string newAccountPassword = "password";

 

SpreadWS.SpreadWebService mySpread = new SpreadWS.SpreadWebService();

bool result = mySpread.CreateNewAccount (loginName, loginPassword,newAccountName

     ,newAccountEmail ,newAccountPassword );

Visual Basic

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

Dim loginPassword As String = "Spread"

Dim newAccountName As String = "SpreaderName"

Dim newAccountEmail As String = "NewSpread@reasonables.com"

Dim newAccountPassword As String = "password"

 

Dim MySpread As New SpreadAPI.SpreadWebService()

Dim result As Boolean = MySpread.CreateNewAccount(loginName, loginPassword, _

newAccountName , newAccountEmail, newAccountPassword)

  /**
    * @name     CreateNewAccount
    * @function Create a new account.(This method is only for reseller.)
    * @param
    *  loginEmail         The login email of your Spread account.
    *  password 	      The login password of your Spread account.
    *  newAccountName     New account name.
    *  newAccountEmail    New account email.
    *  newAccountPassword New account password.
    *  @return
    *  		true if success.
    */
    public function CreateNewAccount($loginEmail,$password,$newAccountName,$newAccountEmail,$newAccountPassword){
        $paraArray = array(
	            'loginEmail' 	 	=> $loginEmail,
	            'password'     	 	=> $password,
		    'newAccountName'     	=> $newAccountName,
		    'newAccountEmail'     	=> $newAccountEmail,
		    'newAccountPassword'        => $newAccountPassword
        );
        $Client = new SoapClient("http://service.rspread.com/Service.asmx?WSDL");
        Return $Client -> CreateNewAccount( $paraArray );
    }

         
No sample.