example php code on how to move subscribers to another list please #10

Closed
surfdemon opened this Issue Oct 3, 2011 · 2 comments

Comments

Projects
None yet
3 participants
@surfdemon

Please can you provide examples of how to move subscribers from one list to another there appears to be the option with a move method but no examples on how to use this method.

@ghost

This comment has been minimized.

Show comment
Hide comment
@ghost

ghost Oct 4, 2011

Hello:

To move subscribers via the API:

  1. call the 'move' operation on the subscriber
  2. pass in an instance of an AWeber list

here is an example of moving all subscribers :

X, Y, Z are the appropriate ID's of the account and lists you're using.

loadFromUrl('/accounts/X/lists/Y/subscribers'); $new_list = $account->loadFromUrl('/accounts/X/lists/Z'); foreach($subscribers as $subscriber) { if($subscriber->status == 'subscribed') { $subscriber->move($new_list); } } ?>

Let us know if you need further assistance.

ghost commented Oct 4, 2011

Hello:

To move subscribers via the API:

  1. call the 'move' operation on the subscriber
  2. pass in an instance of an AWeber list

here is an example of moving all subscribers :

X, Y, Z are the appropriate ID's of the account and lists you're using.

loadFromUrl('/accounts/X/lists/Y/subscribers'); $new_list = $account->loadFromUrl('/accounts/X/lists/Z'); foreach($subscribers as $subscriber) { if($subscriber->status == 'subscribed') { $subscriber->move($new_list); } } ?>

Let us know if you need further assistance.

@ghost ghost closed this Oct 4, 2011

@CreativForm

This comment has been minimized.

Show comment
Hide comment
@CreativForm

CreativForm May 12, 2016

Can you pprovide info how todo that for one subscriber by email? Thanks!

Can you pprovide info how todo that for one subscriber by email? Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment