SpreadWebServcie.AddSubscribersByInfo Method

 

增加多个订阅者 为一个现有的联系人列表由他/她的电子邮件以及其他信息.如第一 姓名、公司、职位等.

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