SpreadWebServcie.AddSubscribersByInfo Method

 

添加多個訂閱者到一個現有的聯繫人lieb由他/她的電子郵件以及其他信息.如姓名、公司、職位等.

public Dataset addSubscribersByInfo (

string loginEmail,

string password,

Subscriber[] subscriberArgs,

string subscription,

DoubleOptIn optInType

)

參數

參數

類型

描述

loginEmail

String

Spread帳號登錄郵箱.

password

String

Spread帳號的密碼或者 API Key.

subscriberArgs

Subscriber[]

被添加訂閱者信息的數組.

subscription

String

添加到聯繫人列表的名稱.

optInType

DoubleOptIn

Double Opt-in option.

返回結果

Dataset 包含所有的錯誤信息.

例子

string loginName = "spread@reasonables.com";

string loginPassword = "spread";

string customerEmail = "alan@reasonables.com";

string targetSubscription = "NoClone VIP";

DoubleOptIn addOption = DoubleOptIn.Off;

Dataset errors;

 

//Create an array of subscriber

Subscriber[] customer = new Subscriber[2];

 

//Create more then one Subscriber objects

Subscriber customerA = new Subscriber();
customerA.email =
"alan@reasonables.com";
customerA.firstName =
"Alan";
customerA.lastName =
"Wo";
customerA.company =
"Reasonable Software";

 

Subscriber customerB = new Subscriber();
customerB.email =
" circle@reasonables.com";
customerB.firstName =
"Circle";
customerB.lastName =
"Ching";
customerB.jobTitle =
"CEO";

 

//Put the Subscriber objects into array

customer[0] = customerA;

customer[1] = customerB;

 

//Create a SpreadWebService object and use its method.

SpreadWebService MySpread = new SpreadWebService();

 

errors = MySpread.addSubscribersByInfo (loginName, loginPassword, customer, targetSubscription, addOption);

參見

SpreadWebService Class | Spread Web Service Namespace

Subscriber Class

DoubleOptIn Enumeration