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.