Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
81 changes: 73 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,88 @@
# basic_zoom

A simple, modern, and developer-friendly REST API client for Zoom, supporting both synchronous and asynchronous operations.

## Package Installation
## Features

- **Sync & Async**: Choice of `ZoomAPIClient` (blocking) or `AsyncZoomAPIClient` (non-blocking), both powered by `httpx`.
- **Modern Auth**: Built-in support for Zoom Server-to-Server (S2S) OAuth.
- **Automatic Pagination**: Handles `next_page_token` automatically for list endpoints.
- **Automatic Retries**: Built-in retry logic for 429 (Rate Limit) and 5xx errors.
- **Custom Exceptions**: Specific error classes for better error handling (e.g., `RateLimitError`, `AuthenticationError`).
- **Resource Models**: Clean separation between HTTP logic and data models (e.g., `User`).
- **Type Hinting**: Full PEP 484 type hinting for excellent IDE support.

## Installation

```bash
pip install basic-zoom
```

## Quick Start

## Example Package Usage Server-to-Server app
### Synchronous Usage

```
```python
from basic_zoom import ZoomAPIClient

zoomapi = ZoomAPIClient(
ACCOUNT_ID=" <Zoom Account ID here> ",
S2S_CLIENT_ID=" <Zoom S2S App Client ID here> ",
S2S_CLIENT_SECRET=" <Zoom S2S App Client Secret here> ",)
# Initialize with S2S OAuth credentials
with ZoomAPIClient(
account_id="your_account_id",
s2s_client_id="your_client_id",
s2s_client_secret="your_client_secret"
) as client:
# Fetch call logs with automatic pagination
call_logs = client.get("/phone/call_logs")
print(f"Fetched {len(call_logs['call_logs'])} records.")
```

### Asynchronous Usage

result = zoomapi.get(endpoint_url="/phone/call_logs")
```python
import asyncio
from basic_zoom import AsyncZoomAPIClient

async def main():
async with AsyncZoomAPIClient(
account_id="your_account_id",
s2s_client_id="your_client_id",
s2s_client_secret="your_client_secret"
) as client:
result = await client.get("/users")
print(result)

asyncio.run(main())
```

## Resource Models

You can use provided models to work with typed data:

```python
from basic_zoom import User

data = client.get("/users/me")
user = User.from_dict(data)
print(f"Hello, {user.first_name}!")
```

## Error Handling

```python
from basic_zoom import ZoomAPIClient, RateLimitError, AuthenticationError

try:
with ZoomAPIClient(...) as client:
result = client.get("/users")
except RateLimitError:
print("Slow down!")
except AuthenticationError:
print("Check your credentials.")
```

## Development

```bash
pip install "basic-zoom[test]"
pytest
```
1 change: 0 additions & 1 deletion basic_zoom/__init__.py

This file was deleted.

195 changes: 0 additions & 195 deletions basic_zoom/base.py

This file was deleted.

42 changes: 0 additions & 42 deletions basic_zoom/exceptions.py

This file was deleted.

36 changes: 0 additions & 36 deletions basic_zoom/print.py

This file was deleted.

Loading