Skip Navigation Links.
展开 最小化

SpreadWebServcie.DeleteSubscription Method

刪除指定的聯絡人名單並移除該列表中的所有聯絡人。

參數

參數

類型

描述

loginEmail

String

Spread賬號的郵箱地址

password

String

Spread賬號的密碼或者  API Key

subscriptionName

String

被刪除的聯絡人名單名稱

返回結果

Boolean或者Exception 如果創建成功,則返回True;否則,返回False或者抛出一個異常(Exception)。

請在下列表格中找到詳細的返回信息:

狀態/場景

返回類型

返回信息

成功刪除聯絡人名單 Boolean

True

輸入錯誤的賬號或者API Key Exception

拋出一個異常含有信息「Spreader Email and Password not match!」!

填寫一個無效的subscriptionName的值 Exception

拋出一個異常含有信息「Invalid subscription Id.」!

其他錯誤情況,比如超時。 Exception

拋出一個異常含有錯誤信息!

刪除創建聯絡人名單失敗 Integer

False

例子

string loginEmail = "Spread@reasonables.com";

string loginPassword = "Spread";

string subscriptionName = "Spread Subscription Name";

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

bool result = MySpread.DeleteSubscription(loginEmail, loginPassword, subscriptionName);

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

Dim loginPassword As String = "Spread"

Dim subscriptionName As String = "Spread Subscription Name"

Dim MySpread As New SpreadAPI. SpreadWebService

Dim result As Boolean = MySpread.DeleteSubscription(loginEmail, loginPassword, subscriptionName)

    /**
    * @name     deleteSubscription
    * @function delete the subscription
    * @param
    *  subscriptionName	the subscription Name you want to delete as subscriptionName
    * @return
    *  error message       failed.
    *  1        success.
    */
    public function deleteSubscription($loginEmail,$password,$subscriptionName){
        $sendArr = array(
	        'loginEmail'        => $loginEmail,
	        'password'	    => $password,
	        'subscriptionName'  => $subscriptionName
        );
        $Client=new SoapClient("http://service.rspread.com/Service.asmx?WSDL");
        $flag = $Client -> DeleteSubscription( $sendArr );
        if( empty( $flag ) ){
	        return 0;
        }
        return 1;
    }

         
No sample.