# Path: ntfy/config.py
# USER_AGENT = 'ntfy/{version} {default_user_agent}'.format(
#     version=__version__,
#     default_user_agent=requests.utils.default_user_agent())


import requests
from ..config import USER_AGENT
           retcode=None):
    """
    Optional parameters:
        * ``api_key`` - use your own application token
        * ``provider_key`` - if you are whitelisted
        * ``priority``
        * ``url``
    """

    data = {
        'apikey': api_key,
        'application': 'ntfy',
        'event': title,
        'description': message,
    }

    if MIN_PRIORITY <= priority <= MAX_PRIORITY:
        data['priority'] = priority
    else:
        raise ValueError('priority must be an integer from {:d} to {:d}'
                         .format(MIN_PRIORITY, MAX_PRIORITY))

    if url is not None:
        data['url'] = url

    if provider_key is not None:
        data['providerkey'] = provider_key

    resp = requests.post(
        API_URL, data=data, headers={

# Path: ntfy/config.py
# USER_AGENT = 'ntfy/{version} {default_user_agent}'.format(
#     version=__version__,
#     default_user_agent=requests.utils.default_user_agent())


# Path: ntfy/backends/prowl.py
import requests
from ..config import USER_AGENT

           retcode=None):
    """
    Optional parameters:
        * ``api_key`` - use your own application token
        * ``provider_key`` - if you are whitelisted
        * ``priority``
        * ``url``
    """

    data = {
        'apikey': api_key,
        'application': 'ntfy',
        'event': title,
        'description': message,
    }

    if MIN_PRIORITY <= priority <= MAX_PRIORITY:
        data['priority'] = priority
    else:
        raise ValueError('priority must be an integer from {:d} to {:d}'
                         .format(MIN_PRIORITY, MAX_PRIORITY))

    if url is not None:
        data['url'] = url

    if provider_key is not None:
        data['providerkey'] = provider_key

    resp = requests.post(
        API_URL, data=data, headers={

            'User-Agent': USER_AGENT,