support for url_identifier()

pull/143/head
Chris Caron 2024-09-14 18:04:21 -04:00
parent f631a1c4f3
commit 734992ad7d
2 changed files with 15 additions and 3 deletions

View File

@ -39,11 +39,11 @@
import re
import requests
from .NotifyBase import NotifyBase
from .base import NotifyBase
from ..common import NotifyType
from ..utils import parse_list
from ..utils import validate_regex
from ..AppriseLocale import gettext_lazy as _
from ..locale import gettext_lazy as _
# Some Phone Number Detection
IS_PHONE_NO = re.compile(r'^\+?(?P<phone>[0-9\s)(+-]+)\s*$')
@ -274,6 +274,18 @@ class NotifyPlivo(NotifyBase):
return True
@property
def url_identifier(self):
"""
Returns all of the identifiers that make this URL unique from
another simliar one. Targets or end points should never be identified
here.
"""
return (
self.secure_protocol if self.secure else self.protocol,
self.auth_id, self.token, self.source,
)
def url(self, privacy=False, *args, **kwargs):
"""
Returns the URL built dynamically based on specified arguments.

View File

@ -30,7 +30,7 @@
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
from apprise.plugins.NotifyPlivo import NotifyPlivo
from apprise.plugins.plivo import NotifyPlivo
from helpers import AppriseURLTester
# Disable logging for a cleaner testing output