JacobBennett / SendyPHP

A PHP class built to interface with the Sendy API

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Support for /api/subscribers/delete.php

JorisDebonnet opened this issue · comments

Sendy 2.1.1.4 has added an endpoint to delete, rather than unsubscribe, people. Could you add support for this?

https://sendy.co/api

@JorisDebonnet This was originally written for the 1.0 API I believe. Should probably consider rewriting some of this and tagging a new version for those using the 2.1 Api endpoints.

Would you be interested in making a PR for this or is this something that you need immediately?

I've been waiting for a delete option for awhile now (years actually), however, my specific use case needs something other than 'email' as the key for what to delete. In my situation (using this as a newsletter for account holders) it is possible the same email address could be used for multiple accounts. So say someone has three accounts all with the same email address and they want to change one of them... I would like to be able to delete that specific subscription (not email) and then subscribe them with the new one. I'm afraid the only way to do this would be to have an auto-inc/unique key for each subscriber in the database which Sendy does not do.

Purchased Sendy atleast 2 years ago and have never used it as it will not work for my situation.

Ow, looks like I didn't see this was already replied to.
Right now, when a user switches from one list to another, I unsubscribe them from the first and then subscribe them to the second - which works but would be more ideal with the 'delete' of course. But I notice that the API docs say the delete endpoint uses list_id while the others use list?... So I'm starting to wonder whether one of us shouldn't just write an entirely new api v2 for Sendy as a plugin or something ... :)

Yeah, I haven't really been keeping up with the API changes as I made this a few years ago when I was using Sendy for a few work things. Has the API changed a bunch or is there just more features available? I would be willing to create a new branch for V2 that we could tag as a new release if we wanted to rewrite the thing 👍