Re: Subetha 0.9 and Web services
From
Jeff Schnitzer
Oct 26, 2006 12:21 AM
Nadeem M Nayeck wrote:
> A simple web service client that can make calls to subscribe and
> unsubscribe a user. This ws could be embedded in any application, for
> example, web application that uses AJAX could display a hyperlink to
> user to subscribe/unsubscribe to a list with a single click.
>
> I think this could be the simplest use case.
>
Not as specific as I was hoping, but I'll try to fill in the rest. Tell
me if this is what you have in mind:
1) You want an AJAX page that has a box that the user types in their
email address, clicks subscribe, and it sends a subscribe token to the
email address.
You can do this right now with the AccountMgr API. Perhaps you want to
make it easier to craft the page by referring to the list by it's email
address rather than it's id. Ok, that's reasonable, how about this API:
void AccountMgr.requestSubscribeByListEmail(String listEmail, String
myEmail, String name) throws NotFoundException;
Note that this only sends a token by email. The user still has to click
on the link in the email to confirm the subscription.
There is an API that will allow anyone to subscribe any address to any
list, however it requires siteAdmin (or at least list administrator)
privelage to use. Obviously, you can't do this directly from an
(untrusted) AJAX app making SOAP requests.
2) You want an AJAX page that allows a user to unsubscribe.
This is already offered by the existing API using the listId; an
additional convenience method which is keyed off of the list email
address can be added. However, the user still needs to enter their
email address and password. If you want to avoid this, you could just
use the "forgot your password" method call to send the user a link to
their home page.
Does that cover everything?
Jeff
Thread History