I'm having some trouble using the .NET API Wrapper.
I have retrieved a PagedCollection<SubscriberDetail> result from List.Active()
I have stepped through another list I have of CMS users and removed the users I don't want based on certain criteria, so my PagedCollection<SubscriberDetail> now only contains users I want to subscribe.
Next thing I'm doing is trying to use the .Import method to add multiple users to a list, but the .Import method does not accept a PagedCollection<SubscriberDetail>, it accepts a List<ScubscriberDeatil>.
The issue is that I cannot seem to convert the PagedCollection to a List and the PagedCollection does not implement IEnumerable so I can't step through the PagedCollection to add items to a list.
Can anyone help?
As an aside, I'm wondering why the .Import method is of the Subscriber class? It seems odd that I have to instantiate the Subscriber object and then call the .Import method on that.
Or am I doing it wrong?
Any help will be greatly appreciated.
If you're looking for a way to get the List<SubscriberDetail> from a PagedCollection all you need to do is call .Results. As for why the .Import method is in the Subscriber class, it's because we tried to mimic API documentation for Campaign Monitor which has the Import method on the Subscriber page.
Do let me know if you have any further questions!
Thanks for the response.
I can't believe it was that easy!!
Sometimes the answer is right under your nose :D
One other question, if you don't mind - It's great that there's a mass subscribe method in the way of .Import() but do you know if there is a mass unsubscribe equivalent? I can't see anything.
Thanks again for your response.
I'm afraid we don't have that functionality through our API. I've gone ahead and added a vote for you should we decide to add this feature in the future!