zoom-notifier 0.6.0
A package for sending Zoom messages.
Requires Python: >=3.6


# zoom-notifier

`zoom-notifier` is a Python package for sending formatted messages to Zoom contacts or channels. It provides an easy-to-use interface for configuring Zoom API credentials and sending notifications.

## Installation

You can install the package using pip:

```sh
pip install zoom-notifier
```

## Configuration

Before sending notifications, you need to configure the Zoom API credentials. Use the `zoom_client.config` function to set up the necessary credentials.

### Arguments for `zoom_client.config`

- `client_id` (str): The client ID for your Zoom application.
- `client_secret` (str): The client secret for your Zoom application.
- `account_id` (str): The account ID for your Zoom account.
- `to_contacts` (list): A list of email addresses to send messages to.
- `to_channel` (list): Channel id to send messages to.
- `message_to_type` (str): Type of message recipient (`contact` or `channel`).

### Example

```python
from zoom_notifier import zoom_client

zoom_client.config(
    client_id="your_client_id",
    client_secret="your_client_secret",
    account_id="your_account_id",
    to_contacts=["contact1@example.com", "contact2@example.com"],
    message_to_type="contact"  # or "channel"
)
```

## Sending Notifications

Use the `zoom_client.send_zoom_notification` function to send notifications to your configured contacts or channels.

### Arguments for `zoom_client.send_zoom_notification`

- `message_heading` (str): The heading of the message (optional).
- `message_body` (str): The body of the message (required if not using a custom template).
- `message_footer` (str): The footer of the message (optional).
- `message_category` (str): The category of the message (optional).
- `message_type` (str): The type of the message (`Success`, `Failure`, etc.).
- `custom_divider` (str): A custom divider for the message (optional).
- `is_custom_template` (bool): Whether to use a custom message template (default is `False`).
- `custom_message` (str): The custom message to be sent (required if `is_custom_template` is `True`).

### Example

#### Using Default Template

```python
zoom_client.send_zoom_notification(
    message_heading="Message Heading",
    message_body="This is the body of the message.",
    message_footer="Message Footer",
    message_category="Information",
    message_type="Success"
)
```

#### Using Custom Template

```python
zoom_client.send_zoom_notification(
    is_custom_template=True,
    custom_message="This is a custom message."
)
```

## Example Script

Here's an example script that configures the Zoom API credentials and sends a notification:

```python
from zoom_notifier import zoom_client

# Configure Zoom API credentials
zoom_client.config(
    client_id="your_client_id",
    client_secret="your_client_secret",
    account_id="your_account_id",
    to_contacts=["contact1@example.com", "contact2@example.com"],
    message_to_type="contact"
)

# Send a notification using the default template
zoom_client.send_zoom_notification(
    message_heading="Message Heading",
    message_body="This is the body of the message.",
    message_footer="Message Footer",
    message_category="Information",
    message_type="Success"
)

# Send a notification using a custom template
zoom_client.send_zoom_notification(
    is_custom_template=True,
    custom_message="This is a custom message."
)
```

## License

This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.

## Contributing

Contributions are welcome! Please open an issue or submit a pull request for any changes or improvements.