semvec/pypi-packages huggingface dataset:
discord-sensor-api 1.0.1
Discord-Sensor.com API wrapper
License: MIT
Requires Python: >=3.10
Keywords: discord discord-sensor api wrapper

# discord-sensor-api

Unofficial Python wrapper for the [discord-sensor.com](https://discord-sensor.com) API.
Easily access user and server data, history, stats, and more.

## Installation

```bash
pip install discord-sensor-api
```

## Quick Start

```python
import discord_sensor_api as dsapi

# User Data
user_id = "1352144578395766825"
user_info = dsapi.get_user_info(user_id)
print(user_info)

# Server Data
guild_id = "1090281117740961922"
server_info = dsapi.get_server_info(guild_id)
print(server_info)
```

## API Reference

### User Methods

| Function | Arguments | Description |
| :--- | :--- | :--- |
| `get_user_info` | `user_id` | Get general user information. |
| `get_user_servers` | `user_id` | Get mutual guilds. |
| `get_user_nicknames` | `user_id`, `page=0` | Get username history. |
| `get_user_friends` | `user_id`, `page=0` | Get friends list/history. |
| `get_user_history_servers` | `user_id`, `page=1`, `limit=20` | Get server join/leave history. |
| `get_user_history_boost` | `user_id`, `page=1`, `limit=20` | Get boost history. |
| `get_user_history_bio` | `user_id`, `page=1`, `limit=20` | Get bio/about me history. |
| `get_user_history_voice` | `user_id`, `page=1`, `limit=20` | Get voice channel history. |
| `get_user_games_stats` | `user_id` | Get gaming statistics. |
| `get_user_avatars` | `user_id`, `page=1` | Get avatar history. |
| `get_user_screenshots` | `user_id`, `page=1` | Get stream screenshots. |
| `get_user_selfie` | `user_id`, `page=1` | Get selfie history. |
| `get_user_deleted_images` | `user_id`, `page=1` | Get deleted images. |
| `get_user_banners` | `user_id`, `page=1` | Get banner history. |

### Server Methods

| Function | Arguments | Description |
| :--- | :--- | :--- |
| `get_server_info` | `guild_id` | Get general server information. |
| `get_server_roles` | `guild_id` | Get server roles. |
| `get_server_stats` | `guild_id`, `range="month"` | Get server statistics. Range: `month`, `week`, `day`, `all`. |
| `get_server_avatars` | `guild_id`, `page=1`, `limit=20` | Get server icon history. |
| `get_server_emoji` | `guild_id`, `page=1`, `limit=50` | Get server emojis. |
| `get_server_channels` | `guild_id` | Get server channels. |
| `get_server_functions` | `guild_id` | Get active server functions/features. |
| `get_server_joins_leaves` | `guild_id`, `page=1`, `limit=20` | Get member join/leave logs. |
| `get_server_boosts` | `guild_id`, `page=1`, `limit=20` | Get boost logs. |
| `get_server_tags` | `guild_id`, `page=1`, `limit=20` | Get tag update logs. |
| `get_server_names` | `guild_id`, `page=1`, `limit=20` | Get server rename logs. |

## License

MIT