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.