mc5-api-client 1.0.15__py3-none-any.whl → 1.0.17__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- mc5_api_client/__init__.py +107 -2
- mc5_api_client/account.py +352 -0
- mc5_api_client/account_quick.py +246 -0
- mc5_api_client/alerts.py +336 -0
- mc5_api_client/alerts_quick.py +210 -0
- mc5_api_client/cli.py +1 -1
- mc5_api_client/client.py +875 -34
- mc5_api_client/debug.py +259 -0
- mc5_api_client/federation.py +257 -0
- mc5_api_client/federation_quick.py +198 -0
- mc5_api_client/platform.py +109 -0
- mc5_api_client/simple_client.py +563 -19
- mc5_api_client/squad_battle.py +439 -0
- mc5_api_client/squad_battle_quick.py +223 -0
- mc5_api_client/telemetry.py +344 -0
- mc5_api_client/transfer.py +348 -0
- mc5_api_client/transfer_quick.py +280 -0
- {mc5_api_client-1.0.15.dist-info → mc5_api_client-1.0.17.dist-info}/METADATA +581 -7
- mc5_api_client-1.0.17.dist-info/RECORD +28 -0
- mc5_api_client-1.0.15.dist-info/RECORD +0 -15
- {mc5_api_client-1.0.15.dist-info → mc5_api_client-1.0.17.dist-info}/WHEEL +0 -0
- {mc5_api_client-1.0.15.dist-info → mc5_api_client-1.0.17.dist-info}/entry_points.txt +0 -0
- {mc5_api_client-1.0.15.dist-info → mc5_api_client-1.0.17.dist-info}/licenses/LICENSE +0 -0
- {mc5_api_client-1.0.15.dist-info → mc5_api_client-1.0.17.dist-info}/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: mc5_api_client
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.17
|
|
4
4
|
Summary: A comprehensive Python library for interacting with the Modern Combat 5 API
|
|
5
5
|
Home-page: https://pypi.org/project/mc5-api-client/
|
|
6
6
|
Author: Chizoba
|
|
@@ -81,10 +81,23 @@ Dynamic: requires-python
|
|
|
81
81
|
[](https://python.org)
|
|
82
82
|
[](LICENSE)
|
|
83
83
|
[](mailto:chizoba2026@hotmail.com)
|
|
84
|
-
[](https://pypi.org/project/mc5-api-client/)
|
|
85
85
|
[](https://pypi.org/project/mc5-api-client/)
|
|
86
86
|
|
|
87
|
-
Hey there! 👋 Welcome to the **Modern Combat 5 API Client** -
|
|
87
|
+
Hey there! 👋 Welcome to the **Modern Combat 5 API Client** - Comprehensive Python library for interacting with Modern Combat 5 game servers
|
|
88
|
+
|
|
89
|
+
## ✨ **New in v1.0.17: Enhanced Android Support & Squad Management!**
|
|
90
|
+
|
|
91
|
+
- 📱 **NEW: Android Friend Removal** - Remove friends and send notifications
|
|
92
|
+
- 🏰 **NEW: Android Squad Editing** - Complete squad management with rating updates
|
|
93
|
+
- 🗑️ **NEW: Friend Management** - Complete friend lifecycle (add, check, remove, notify)
|
|
94
|
+
- 📊 **Enhanced Squad Features** - Update squad info, rating, member limits, and more
|
|
95
|
+
- 🔄 **Platform Switching** - Switch between PC and Android at runtime
|
|
96
|
+
- 📊 **Automatic Error Reporting** - Errors sent to Discord webhook for debugging
|
|
97
|
+
- 🔍 **Enhanced Debug Mode** - One-command debugging with colored output
|
|
98
|
+
- ⚡ **Performance Monitoring** - Automatic timing and performance metrics
|
|
99
|
+
- 🛠 **Better Error Analysis** - Intelligent suggestions based on error types
|
|
100
|
+
- 🎯 **Production Ready** - Comprehensive logging and monitoring system
|
|
88
101
|
|
|
89
102
|
## 🌟 What Can You Do With This?
|
|
90
103
|
|
|
@@ -97,9 +110,11 @@ Think of this as your remote control for Modern Combat 5! Here's what you can do
|
|
|
97
110
|
- 💬 **Complete Communication System**: Private messages, squad wall posts, and alerts
|
|
98
111
|
- 🎯 **Kill Signature Management**: Update player kill signatures and colors
|
|
99
112
|
- 📊 **Statistics & Analytics**: Track squad performance, member activity, and progress
|
|
100
|
-
- 🎮 **Friend Management**: Send friend requests and manage connections
|
|
113
|
+
- 🎮 **Friend Management**: Send friend requests, accept requests, and manage connections
|
|
101
114
|
- 📅 **Daily Tasks & Events**: Never miss your daily rewards and special events
|
|
102
115
|
- 🏆 **Leaderboards**: See how you rank against other players
|
|
116
|
+
- 🎯 **Event Management**: Sign up for events and track your rankings
|
|
117
|
+
- 👥 **Squad Invitations**: Accept or decline squad invitations
|
|
103
118
|
- 🎮 **Game Data**: Access weapons, items, and game configuration
|
|
104
119
|
- 🖥️ **Modern CLI**: A beautiful command-line tool with colors and emojis
|
|
105
120
|
- 🔄 **Auto-Refresh**: Tokens refresh automatically - no interruptions!
|
|
@@ -111,17 +126,35 @@ Think of this as your remote control for Modern Combat 5! Here's what you can do
|
|
|
111
126
|
- 🎯 **NEW: Player Score Updates**: Update any player's score, XP, and kill signatures!
|
|
112
127
|
- 🛡️ **NEW: Built-in Help System**: Comprehensive help commands and examples!
|
|
113
128
|
- 🔐 **NEW: Encrypted Token Support**: Generate and encrypt tokens for additional security!
|
|
129
|
+
- 📱 **NEW: Android Platform Support**: Full Android API compatibility with proper client IDs!
|
|
130
|
+
- 🔄 **NEW: Platform Switching**: Switch between PC and Android at runtime!
|
|
114
131
|
|
|
115
132
|
## 🚀 Installation
|
|
116
133
|
|
|
117
|
-
### 🎉 MC5 API Client v1.0.
|
|
134
|
+
### 🎉 MC5 API Client v1.0.17 - Enhanced Android & Squad Management!
|
|
118
135
|
|
|
119
136
|
```bash
|
|
120
|
-
pip install mc5_api_client==1.0.
|
|
137
|
+
pip install mc5_api_client==1.0.17
|
|
121
138
|
```
|
|
122
139
|
|
|
123
140
|
### ✅ **Major Enhancements Completed!**
|
|
124
141
|
|
|
142
|
+
**� Android Squad Management (NEW in v1.0.17):**
|
|
143
|
+
- ✅ **Squad Information Retrieval**: Get current squad info, rating, and settings
|
|
144
|
+
- ✅ **Squad Editing**: Update squad rating, name, description, member limits
|
|
145
|
+
- ✅ **Friend Removal**: Remove friends and send notification messages
|
|
146
|
+
- ✅ **Complete Friend Lifecycle**: Add, check, remove, and notify friends
|
|
147
|
+
- ✅ **Enhanced Chat Features**: Squad messages, global chat, private messages
|
|
148
|
+
- ✅ **Batch Profiles**: Get multiple player profiles in single request
|
|
149
|
+
|
|
150
|
+
**�🎯 Event & Squad Management (NEW in v1.0.16):**
|
|
151
|
+
- ✅ **Event Signups**: Sign up for events and track participation
|
|
152
|
+
- ✅ **Event Leaderboards**: Get event rankings and your position
|
|
153
|
+
- ✅ **Squad Invitations**: Accept or decline squad invitations automatically
|
|
154
|
+
- ✅ **Friend Request Acceptance**: Accept incoming friend requests
|
|
155
|
+
- ✅ **Complete Friend Management**: Send, accept, check status, and remove friends
|
|
156
|
+
- ✅ **Message Cleanup**: Automatic invitation message deletion
|
|
157
|
+
|
|
125
158
|
**🚀 Advanced Automation Features (NEW in v1.0.8+):**
|
|
126
159
|
- ✅ **AdminMC5Client**: Enhanced client with admin privileges
|
|
127
160
|
- ✅ **Player Score Management**: Update individual player scores, XP, and kill signatures
|
|
@@ -168,7 +201,271 @@ pip install mc5_api_client==1.0.8
|
|
|
168
201
|
pip install mc5_api_client
|
|
169
202
|
```
|
|
170
203
|
|
|
171
|
-
✅ **Published and Available!** The MC5 API Client v1.0.
|
|
204
|
+
✅ **Published and Available!** The MC5 API Client v1.0.17 is now live on PyPI with enhanced Android support and squad management features!
|
|
205
|
+
|
|
206
|
+
## 📱 **Android Platform Support (Enhanced in v1.0.17)**
|
|
207
|
+
|
|
208
|
+
### **⭐ PC & Android Platforms:**
|
|
209
|
+
```python
|
|
210
|
+
from mc5_api_client import MC5Client, Platform
|
|
211
|
+
|
|
212
|
+
# PC Client (Default)
|
|
213
|
+
pc_client = MC5Client()
|
|
214
|
+
|
|
215
|
+
# Android Client
|
|
216
|
+
android_client = MC5Client(platform=Platform.ANDROID)
|
|
217
|
+
|
|
218
|
+
# Show platform info
|
|
219
|
+
info = android_client.get_platform_info()
|
|
220
|
+
print(f"Platform: {info['platform']}")
|
|
221
|
+
print(f"Client ID: {info['client_id']}")
|
|
222
|
+
print(f"Device Model: {info['device_info']['device_model']}")
|
|
223
|
+
```
|
|
224
|
+
|
|
225
|
+
### **⭐ Platform Switching:**
|
|
226
|
+
```python
|
|
227
|
+
# Start with PC
|
|
228
|
+
client = MC5Client()
|
|
229
|
+
print(f"Platform: {client.get_platform_info()['platform']}")
|
|
230
|
+
|
|
231
|
+
# Switch to Android
|
|
232
|
+
client.switch_platform(Platform.ANDROID)
|
|
233
|
+
print(f"New Platform: {client.get_platform_info()['platform']}")
|
|
234
|
+
```
|
|
235
|
+
|
|
236
|
+
### **⭐ Android Authentication:**
|
|
237
|
+
```python
|
|
238
|
+
from mc5_api_client import MC5Client, Platform, get_android_anonymous_credential
|
|
239
|
+
|
|
240
|
+
# Generate Android credential
|
|
241
|
+
android_credential = get_android_anonymous_credential()
|
|
242
|
+
|
|
243
|
+
# Create Android client and authenticate
|
|
244
|
+
android_client = MC5Client(platform=Platform.ANDROID)
|
|
245
|
+
token_data = android_client.authenticate(android_credential, "YOUR_PASSWORD_HERE")
|
|
246
|
+
```
|
|
247
|
+
|
|
248
|
+
### **⭐ Android Chat & Messaging:**
|
|
249
|
+
```python
|
|
250
|
+
from mc5_api_client import MC5Client, Platform
|
|
251
|
+
|
|
252
|
+
# Android client for chat features
|
|
253
|
+
android_client = MC5Client(platform=Platform.ANDROID)
|
|
254
|
+
android_client.authenticate(android_credential, android_password)
|
|
255
|
+
|
|
256
|
+
# Subscribe to chat room
|
|
257
|
+
room_id = "0ab3827a-012e-11f1-bd7d-b8ca3a709038"
|
|
258
|
+
chat_subscription = android_client.subscribe_to_chat_room(room_id, language="en")
|
|
259
|
+
print(f"Chat URL: {chat_subscription['listen_url']}")
|
|
260
|
+
|
|
261
|
+
# Send message to squad
|
|
262
|
+
squad_message = android_client.send_squad_message(
|
|
263
|
+
room_id,
|
|
264
|
+
"hi squad",
|
|
265
|
+
kill_sign="default_killsig_03",
|
|
266
|
+
kill_sign_color="1212155"
|
|
267
|
+
)
|
|
268
|
+
|
|
269
|
+
# Send global chat message
|
|
270
|
+
global_message = android_client.send_global_message(
|
|
271
|
+
"hi",
|
|
272
|
+
nickname="Falcon",
|
|
273
|
+
kill_sign="default_killsig_03"
|
|
274
|
+
)
|
|
275
|
+
|
|
276
|
+
# Get squad wall posts
|
|
277
|
+
wall_posts = android_client.get_squad_wall(
|
|
278
|
+
room_id,
|
|
279
|
+
limit=20,
|
|
280
|
+
include_fields=["actor", "creation", "id", "text"]
|
|
281
|
+
)
|
|
282
|
+
```
|
|
283
|
+
|
|
284
|
+
### **⭐ Android Private Messaging:**
|
|
285
|
+
```python
|
|
286
|
+
# Send private message
|
|
287
|
+
pm_result = android_client.send_private_message(
|
|
288
|
+
target_credential="anonymous:YW5kcm9pZF92Ml9BTk1QLkdsb2Z0TTVITV8xNzcwMTM2NzkxX0zMRc+hRRtDwFLgohGRt0A=",
|
|
289
|
+
message=".",
|
|
290
|
+
from_name="Falcon",
|
|
291
|
+
kill_sign="default_killsig_03",
|
|
292
|
+
kill_sign_color="1212155"
|
|
293
|
+
)
|
|
294
|
+
|
|
295
|
+
# Check friend connection
|
|
296
|
+
friend_status = android_client.check_friend_connection(
|
|
297
|
+
target_credential="anonymous:TARGET_CREDENTIAL_HERE"
|
|
298
|
+
)
|
|
299
|
+
|
|
300
|
+
# Remove friend
|
|
301
|
+
remove_result = android_client.remove_friend(
|
|
302
|
+
target_credential="anonymous:TARGET_CREDENTIAL_HERE"
|
|
303
|
+
)
|
|
304
|
+
|
|
305
|
+
# Send friend removed notification
|
|
306
|
+
removed_message = android_client.send_friend_removed_message(
|
|
307
|
+
target_credential="anonymous:TARGET_CREDENTIAL_HERE",
|
|
308
|
+
message="removed",
|
|
309
|
+
from_name="Falcon",
|
|
310
|
+
kill_sign="default_killsig_03",
|
|
311
|
+
kill_sign_color="1212155"
|
|
312
|
+
)
|
|
313
|
+
```
|
|
314
|
+
|
|
315
|
+
### **⭐ Android Squad Editing:**
|
|
316
|
+
```python
|
|
317
|
+
# Get current squad info
|
|
318
|
+
clan_id = "7c219936-d85e-11f0-be62-b8ca3a7095d0"
|
|
319
|
+
squad_info = android_client.get_squad_info(clan_id)
|
|
320
|
+
print(f"Current score: {squad_info.get('score', 0)}")
|
|
321
|
+
print(f"Current rating: {squad_info.get('_rating', 'N/A')}")
|
|
322
|
+
|
|
323
|
+
# Update squad information
|
|
324
|
+
update_result = android_client.update_squad_info(
|
|
325
|
+
clan_id=clan_id,
|
|
326
|
+
rating=1411,
|
|
327
|
+
score=5000,
|
|
328
|
+
name="the pro warrior1",
|
|
329
|
+
description="Hellllo",
|
|
330
|
+
member_count=2,
|
|
331
|
+
member_limit=300,
|
|
332
|
+
membership="owner_approved",
|
|
333
|
+
logo="1",
|
|
334
|
+
logo_color_primary=12722475,
|
|
335
|
+
logo_color_secondary=16777215,
|
|
336
|
+
min_join_value=996699,
|
|
337
|
+
currency=10000,
|
|
338
|
+
active_clan_label=True
|
|
339
|
+
)
|
|
340
|
+
|
|
341
|
+
if update_result:
|
|
342
|
+
print("✅ Squad updated successfully!")
|
|
343
|
+
|
|
344
|
+
# Verify update
|
|
345
|
+
updated_info = android_client.get_squad_info(clan_id)
|
|
346
|
+
print(f"Updated rating: {updated_info.get('_rating', 'N/A')}")
|
|
347
|
+
print(f"Updated name: {updated_info.get('name', 'N/A')}")
|
|
348
|
+
```
|
|
349
|
+
```
|
|
350
|
+
|
|
351
|
+
### **⭐ Android Squad Wall Posts:**
|
|
352
|
+
```python
|
|
353
|
+
# Post to squad wall
|
|
354
|
+
wall_post = android_client.post_to_squad_wall(
|
|
355
|
+
room_id,
|
|
356
|
+
message="hi",
|
|
357
|
+
kill_sign="default_killsig_03",
|
|
358
|
+
kill_sign_color=1212155,
|
|
359
|
+
language="en"
|
|
360
|
+
)
|
|
361
|
+
print(f"Wall post ID: {wall_post['id']}")
|
|
362
|
+
```
|
|
363
|
+
|
|
364
|
+
### **⭐ Android Game Alias:**
|
|
365
|
+
```python
|
|
366
|
+
# Get game alias
|
|
367
|
+
alias_info = android_client.get_game_alias()
|
|
368
|
+
print(f"Game Alias: {alias_info['alias']}")
|
|
369
|
+
```
|
|
370
|
+
|
|
371
|
+
### **⭐ Android Batch Profiles:**
|
|
372
|
+
```python
|
|
373
|
+
# Get batch profiles for multiple players
|
|
374
|
+
credentials = [
|
|
375
|
+
"fed_id:EXAMPLE_PLAYER_ID_1",
|
|
376
|
+
"fed_id:EXAMPLE_PLAYER_ID_2"
|
|
377
|
+
]
|
|
378
|
+
|
|
379
|
+
batch_profiles = android_client.get_batch_profiles(
|
|
380
|
+
credentials,
|
|
381
|
+
include_fields=["_game_save", "inventory"]
|
|
382
|
+
)
|
|
383
|
+
|
|
384
|
+
# Process batch results
|
|
385
|
+
for credential, profile_data in batch_profiles.items():
|
|
386
|
+
if profile_data and "_game_save" in profile_data:
|
|
387
|
+
game_save = profile_data["_game_save"]
|
|
388
|
+
inventory = profile_data.get("inventory", {})
|
|
389
|
+
|
|
390
|
+
print(f"Player: {credential}")
|
|
391
|
+
print(f" Rating: {game_save.get('rating', 0)}")
|
|
392
|
+
print(f" XP: {inventory.get('xp', 0)}")
|
|
393
|
+
print(f" Weapons: {len(game_save.get('inventory', {}).get('weapons', {}))}")
|
|
394
|
+
|
|
395
|
+
# Get loadouts
|
|
396
|
+
loadouts = game_save.get('loadouts', [])
|
|
397
|
+
print(f" Loadouts: {len(loadouts)}")
|
|
398
|
+
|
|
399
|
+
# Get statistics
|
|
400
|
+
stats = game_save.get('statistics', {})
|
|
401
|
+
if stats:
|
|
402
|
+
mp_stats = stats.get('mp', {})
|
|
403
|
+
sp_stats = stats.get('sp', {})
|
|
404
|
+
print(f" MP Kills: {mp_stats.get('kill.total', 0)}")
|
|
405
|
+
print(f" SP Kills: {sp_stats.get('kill.total', 0)}")
|
|
406
|
+
```
|
|
407
|
+
|
|
408
|
+
## 🎯 **Event Management (NEW in v1.0.16)**
|
|
409
|
+
|
|
410
|
+
### **⭐ Event Signups & Leaderboards:**
|
|
411
|
+
```python
|
|
412
|
+
from mc5_api_client import quick_sign_up_for_event, quick_get_event_leaderboard, quick_get_my_event_rank
|
|
413
|
+
|
|
414
|
+
# Sign up for an event
|
|
415
|
+
event_id = "0c646c6a-e61c-11f0-be58-b8ca3a634708"
|
|
416
|
+
success = quick_sign_up_for_event(event_id, "username", "password")
|
|
417
|
+
|
|
418
|
+
# Get event leaderboard
|
|
419
|
+
leaderboard = quick_get_event_leaderboard(event_id, "username", "password", limit=10)
|
|
420
|
+
if leaderboard:
|
|
421
|
+
print(f"Top players: {len(leaderboard['data'])} entries")
|
|
422
|
+
for player in leaderboard['data'][:3]:
|
|
423
|
+
print(f"{player['display_name']}: {player['score']} points")
|
|
424
|
+
|
|
425
|
+
# Get your event rank
|
|
426
|
+
my_rank = quick_get_my_event_rank(event_id, "username", "password")
|
|
427
|
+
if my_rank:
|
|
428
|
+
print(f"Your rank: {my_rank['my_entry']['rank']}, Score: {my_rank['my_entry']['score']}")
|
|
429
|
+
```
|
|
430
|
+
|
|
431
|
+
## 👥 **Squad & Friend Management (NEW in v1.0.16)**
|
|
432
|
+
|
|
433
|
+
### **⭐ Squad Invitations:**
|
|
434
|
+
```python
|
|
435
|
+
from mc5_api_client import quick_get_squad_invitations, quick_accept_squad_invitation, quick_decline_squad_invitation
|
|
436
|
+
|
|
437
|
+
# Get squad invitations
|
|
438
|
+
invitations = quick_get_squad_invitations("username", "password")
|
|
439
|
+
for invite in invitations:
|
|
440
|
+
squad_name = invite['group']['name']
|
|
441
|
+
requester = invite['requester']['name']
|
|
442
|
+
print(f"Invitation to {squad_name} from {requester}")
|
|
443
|
+
|
|
444
|
+
# Accept invitation
|
|
445
|
+
success = quick_accept_squad_invitation(invite, "username", "password")
|
|
446
|
+
|
|
447
|
+
# Or decline invitation
|
|
448
|
+
# success = quick_decline_squad_invitation(invite, "username", "password")
|
|
449
|
+
```
|
|
450
|
+
|
|
451
|
+
### **⭐ Friend Request Management:**
|
|
452
|
+
```python
|
|
453
|
+
from mc5_api_client import quick_send_friend_request, quick_accept_friend_request, quick_check_friend_status
|
|
454
|
+
|
|
455
|
+
# Send friend request
|
|
456
|
+
success = quick_send_friend_request("target_user_id", "username", "password")
|
|
457
|
+
|
|
458
|
+
# Accept incoming friend request
|
|
459
|
+
request_id = "57f0e450-010c-11f1-bffe-b8ca3a709038"
|
|
460
|
+
result = quick_accept_friend_request(request_id, "username", "password")
|
|
461
|
+
if result:
|
|
462
|
+
print(f"Accepted friend request from {result['requester']['name']}")
|
|
463
|
+
|
|
464
|
+
# Check friend status
|
|
465
|
+
status = quick_check_friend_status("target_user_id", "username", "password")
|
|
466
|
+
if status:
|
|
467
|
+
print(f"Friend status: {status.get('type', 'Unknown')}")
|
|
468
|
+
```
|
|
172
469
|
|
|
173
470
|
## 🚀 **Admin Features & Squad Management**
|
|
174
471
|
|
|
@@ -1558,6 +1855,51 @@ client.close()
|
|
|
1558
1855
|
- ✅ Background task support
|
|
1559
1856
|
- ✅ Scheduled operations
|
|
1560
1857
|
|
|
1858
|
+
## 📋 **Changelog**
|
|
1859
|
+
|
|
1860
|
+
### **v1.0.16 - Event & Squad Management (Latest)**
|
|
1861
|
+
- ✅ **Event Management**: Sign up for events, get leaderboards, track rankings
|
|
1862
|
+
- ✅ **Squad Invitations**: Accept or decline squad invitations automatically
|
|
1863
|
+
- ✅ **Friend Request Acceptance**: Accept incoming friend requests
|
|
1864
|
+
- ✅ **Complete Friend Management**: Send, accept, check status, and remove friends
|
|
1865
|
+
- ✅ **Message Cleanup**: Automatic invitation message deletion
|
|
1866
|
+
- ✅ **Real API Testing**: All features tested with actual MC5 game data
|
|
1867
|
+
- ✅ **Production Ready**: Thoroughly tested and verified
|
|
1868
|
+
|
|
1869
|
+
### **v1.0.15 - Friend Management System**
|
|
1870
|
+
- ✅ **Friend Requests**: Send friend requests to other players
|
|
1871
|
+
- ✅ **Friend Status**: Check connection status with friends
|
|
1872
|
+
- ✅ **Friend Removal**: Remove friends with notifications
|
|
1873
|
+
- ✅ **Connection Management**: Complete friend relationship handling
|
|
1874
|
+
|
|
1875
|
+
### **v1.0.14 - Help System & Documentation**
|
|
1876
|
+
- ✅ **Built-in Help**: Comprehensive help commands and examples
|
|
1877
|
+
- ✅ **Quick Reference**: Easy access to common operations
|
|
1878
|
+
- ✅ **Usage Examples**: Real-world code examples
|
|
1879
|
+
- ✅ **API Documentation**: Complete method documentation
|
|
1880
|
+
|
|
1881
|
+
### **v1.0.13 - Enhanced Security**
|
|
1882
|
+
- ✅ **Encrypted Tokens**: Generate and encrypt tokens for security
|
|
1883
|
+
- ✅ **Token Management**: Advanced token handling capabilities
|
|
1884
|
+
- ✅ **Security Features**: Additional authentication options
|
|
1885
|
+
|
|
1886
|
+
### **v1.0.12 - Admin Capabilities**
|
|
1887
|
+
- ✅ **AdminMC5Client**: Enhanced client with admin privileges
|
|
1888
|
+
- ✅ **Player Score Updates**: Update any player's score, XP, and kill signatures
|
|
1889
|
+
- ✅ **Advanced Squad Management**: Admin-level squad operations
|
|
1890
|
+
|
|
1891
|
+
### **v1.0.11 - Automation Features**
|
|
1892
|
+
- ✅ **Batch Processing**: Search multiple players with loops
|
|
1893
|
+
- ✅ **Real-time Monitoring**: Continuous activity tracking
|
|
1894
|
+
- ✅ **Smart Clan Cleanup**: Intelligent member management
|
|
1895
|
+
- ✅ **Production Ready**: Thoroughly tested features
|
|
1896
|
+
|
|
1897
|
+
### **v1.0.10 - Core Features**
|
|
1898
|
+
- ✅ **Basic Clan Management**: Create and manage clans
|
|
1899
|
+
- ✅ **Player Profiles**: Check stats and update profiles
|
|
1900
|
+
- ✅ **Communication**: Private messages and squad wall posts
|
|
1901
|
+
- ✅ **Authentication**: Secure login system
|
|
1902
|
+
|
|
1561
1903
|
## 🧪 For Developers
|
|
1562
1904
|
|
|
1563
1905
|
Want to contribute or modify the library?
|
|
@@ -1672,6 +2014,238 @@ mc5 --help # See all commands!
|
|
|
1672
2014
|
|
|
1673
2015
|
---
|
|
1674
2016
|
|
|
2017
|
+
## 🌐 **Federation & Session Management (NEW in v1.0.16)**
|
|
2018
|
+
|
|
2019
|
+
### **⭐ Active Session Tracking:**
|
|
2020
|
+
```python
|
|
2021
|
+
from mc5_api_client import quick_get_active_sessions, quick_get_session_statistics
|
|
2022
|
+
|
|
2023
|
+
# Get all active sessions
|
|
2024
|
+
sessions = quick_get_active_sessions(username, password)
|
|
2025
|
+
print(f"Found {sessions.get('total_count', 0)} active sessions")
|
|
2026
|
+
|
|
2027
|
+
# Get session statistics
|
|
2028
|
+
stats = quick_get_session_statistics(username, password)
|
|
2029
|
+
print(f"Server distribution: {stats.get('server_type_distribution', {})}")
|
|
2030
|
+
|
|
2031
|
+
# Filter by server type
|
|
2032
|
+
ts_sessions = quick_get_server_type_sessions(username, password, "ts")
|
|
2033
|
+
print(f"Found {ts_sessions.get('total_count', 0)} team server sessions")
|
|
2034
|
+
```
|
|
2035
|
+
|
|
2036
|
+
### **⭐ User Session Management:**
|
|
2037
|
+
```python
|
|
2038
|
+
from mc5_api_client import quick_get_my_sessions, quick_check_session_status
|
|
2039
|
+
|
|
2040
|
+
# Get current user's sessions
|
|
2041
|
+
my_sessions = quick_get_my_sessions(username, password)
|
|
2042
|
+
print(f"You have {my_sessions.get('total_count', 0)} active sessions")
|
|
2043
|
+
|
|
2044
|
+
# Check specific session status
|
|
2045
|
+
status = quick_check_session_status(username, password, fed_id)
|
|
2046
|
+
if status.get('found'):
|
|
2047
|
+
print(f"Session is active: {status.get('status')}")
|
|
2048
|
+
```
|
|
2049
|
+
|
|
2050
|
+
### **⭐ Activity Analysis:**
|
|
2051
|
+
```python
|
|
2052
|
+
from mc5_api_client import quick_analyze_session_activity
|
|
2053
|
+
|
|
2054
|
+
# Analyze overall activity
|
|
2055
|
+
analysis = quick_analyze_session_activity(username, password)
|
|
2056
|
+
print(f"Most active server: {analysis.get('most_active_server_type')}")
|
|
2057
|
+
print(f"Most active country: {analysis.get('most_active_country')}")
|
|
2058
|
+
```
|
|
2059
|
+
|
|
2060
|
+
## 📝 **Squad Wall Messages (NEW in v1.0.16)**
|
|
2061
|
+
|
|
2062
|
+
### **⭐ Wall Message Posting:**
|
|
2063
|
+
```python
|
|
2064
|
+
from mc5_api_client import quick_post_squad_wall_message
|
|
2065
|
+
|
|
2066
|
+
# Post message to squad wall
|
|
2067
|
+
message_id = quick_post_squad_wall_message(
|
|
2068
|
+
username, password, squad_id,
|
|
2069
|
+
"Welcome to the squad! 🎮",
|
|
2070
|
+
player_killsig="default_killsig_42",
|
|
2071
|
+
player_killsig_color=-974646126
|
|
2072
|
+
)
|
|
2073
|
+
|
|
2074
|
+
if message_id:
|
|
2075
|
+
print(f"Message posted! ID: {message_id}")
|
|
2076
|
+
```
|
|
2077
|
+
|
|
2078
|
+
### **⭐ Advanced Wall Posting:**
|
|
2079
|
+
```python
|
|
2080
|
+
from mc5_api_client import SimpleMC5Client
|
|
2081
|
+
|
|
2082
|
+
with SimpleMC5Client(username, password) as client:
|
|
2083
|
+
if client.connect():
|
|
2084
|
+
# Post with custom settings
|
|
2085
|
+
result = client.client.post_squad_wall_message(
|
|
2086
|
+
squad_id=squad_id,
|
|
2087
|
+
message="Victory! Great teamwork! 🎉",
|
|
2088
|
+
player_killsig="default_killsig_80",
|
|
2089
|
+
player_killsig_color=16777215, # White
|
|
2090
|
+
language="en"
|
|
2091
|
+
)
|
|
2092
|
+
|
|
2093
|
+
message_id = result.get('id')
|
|
2094
|
+
print(f"Posted with ID: {message_id}")
|
|
2095
|
+
```
|
|
2096
|
+
|
|
2097
|
+
## Account Management (NEW in v1.0.16)
|
|
2098
|
+
|
|
2099
|
+
### Comprehensive Account Information:
|
|
2100
|
+
```python
|
|
2101
|
+
from mc5_api_client import quick_get_account_info, quick_get_account_overview
|
|
2102
|
+
|
|
2103
|
+
# Get complete account information
|
|
2104
|
+
account_info = quick_get_account_info(username, password)
|
|
2105
|
+
print(f"Account ID: {account_info['account_data']['account']}")
|
|
2106
|
+
print(f"Credentials: {len(account_info['account_data']['credentials'])}")
|
|
2107
|
+
print(f"Installations: {len(account_info['account_data']['installations'])}")
|
|
2108
|
+
|
|
2109
|
+
# Get complete account overview
|
|
2110
|
+
overview = quick_get_account_overview(username, password)
|
|
2111
|
+
print(f"Security Score: {overview['security_summary']['security_score']}/100")
|
|
2112
|
+
print(f"Total Devices: {overview['device_summary']['total_devices']}")
|
|
2113
|
+
```
|
|
2114
|
+
|
|
2115
|
+
### **⭐ Device History Analysis:**
|
|
2116
|
+
```python
|
|
2117
|
+
from mc5_api_client import quick_get_device_history
|
|
2118
|
+
|
|
2119
|
+
# Get device installation history
|
|
2120
|
+
device_history = quick_get_device_history(username, password)
|
|
2121
|
+
timeline = device_history['device_timeline']
|
|
2122
|
+
|
|
2123
|
+
for device in timeline[-5:]: # Last 5 devices
|
|
2124
|
+
print(f"Device: {device['model']} ({device['country']})")
|
|
2125
|
+
print(f" Resolution: {device['resolution']}")
|
|
2126
|
+
print(f" Firmware: {device['firmware']}")
|
|
2127
|
+
```
|
|
2128
|
+
|
|
2129
|
+
### **⭐ Credential Management:**
|
|
2130
|
+
```python
|
|
2131
|
+
from mc5_api_client import quick_get_credential_summary
|
|
2132
|
+
|
|
2133
|
+
# Get credential summary
|
|
2134
|
+
credentials = quick_get_credential_summary(username, password)
|
|
2135
|
+
print(f"Total credentials: {credentials['credential_count']}")
|
|
2136
|
+
print(f"Types: {', '.join(credentials['credential_types'])}")
|
|
2137
|
+
|
|
2138
|
+
# Analyze credential types
|
|
2139
|
+
for cred in credentials['credential_details'][:5]:
|
|
2140
|
+
print(f"{cred['type']}: {cred['value']}")
|
|
2141
|
+
```
|
|
2142
|
+
|
|
2143
|
+
### **⭐ Security Analysis:**
|
|
2144
|
+
```python
|
|
2145
|
+
from mc5_api_client import quick_analyze_account_security
|
|
2146
|
+
|
|
2147
|
+
# Analyze account security
|
|
2148
|
+
security = quick_analyze_account_security(username, password)
|
|
2149
|
+
print(f"Security Score: {security['security_score']}/100")
|
|
2150
|
+
print(f"Risk Level: {security['risk_level']}")
|
|
2151
|
+
|
|
2152
|
+
if security['security_issues']:
|
|
2153
|
+
print("Security Issues:")
|
|
2154
|
+
for issue in security['security_issues']:
|
|
2155
|
+
print(f" • {issue}")
|
|
2156
|
+
```
|
|
2157
|
+
|
|
2158
|
+
### **⭐ Data Export:**
|
|
2159
|
+
```python
|
|
2160
|
+
from mc5_api_client import quick_export_account_data
|
|
2161
|
+
|
|
2162
|
+
# Export complete account data
|
|
2163
|
+
success = quick_export_account_data(username, password, "my_account.json")
|
|
2164
|
+
if success:
|
|
2165
|
+
print("Account data exported successfully!")
|
|
2166
|
+
```
|
|
2167
|
+
|
|
2168
|
+
## �🔍 **Enhanced Debugging & Telemetry (NEW in v1.0.16)**
|
|
2169
|
+
|
|
2170
|
+
### **⭐ Enhanced Debug Mode:**
|
|
2171
|
+
```python
|
|
2172
|
+
from mc5_api_client import debug_mode, telemetry, debug_print
|
|
2173
|
+
|
|
2174
|
+
# Enable debug mode (enables telemetry + debugging)
|
|
2175
|
+
debug_mode(True)
|
|
2176
|
+
|
|
2177
|
+
# Enable/disable telemetry separately
|
|
2178
|
+
telemetry(True) # Enable error reporting
|
|
2179
|
+
telemetry(False) # Disable error reporting
|
|
2180
|
+
|
|
2181
|
+
# Print debug messages
|
|
2182
|
+
debug_print("This is a debug message", "info")
|
|
2183
|
+
debug_print("This is a warning", "warning")
|
|
2184
|
+
debug_print("This is an error", "error")
|
|
2185
|
+
debug_print("This is success", "success")
|
|
2186
|
+
```
|
|
2187
|
+
|
|
2188
|
+
### **⭐ Function Debugging:**
|
|
2189
|
+
```python
|
|
2190
|
+
from mc5_api_client import debug_function
|
|
2191
|
+
|
|
2192
|
+
# Add debugging to any function
|
|
2193
|
+
@debug_function
|
|
2194
|
+
def my_function():
|
|
2195
|
+
# This will automatically track performance and errors
|
|
2196
|
+
pass
|
|
2197
|
+
|
|
2198
|
+
# Enhanced SimpleMC5Client with debugging
|
|
2199
|
+
from mc5_api_client import SimpleMC5Client, debug_mode
|
|
2200
|
+
|
|
2201
|
+
debug_mode(True) # Enable debug mode
|
|
2202
|
+
client = SimpleMC5Client(username, password)
|
|
2203
|
+
if client.connect():
|
|
2204
|
+
# All operations will be logged with timing
|
|
2205
|
+
profile = client.client.get_profile()
|
|
2206
|
+
invitations = client.get_squad_invitations()
|
|
2207
|
+
```
|
|
2208
|
+
|
|
2209
|
+
### **⭐ Automatic Error Reporting:**
|
|
2210
|
+
When telemetry is enabled, errors are automatically sent to Discord webhook with:
|
|
2211
|
+
- 🎨 **Beautiful Discord Embeds** with colored formatting
|
|
2212
|
+
- 📊 **System Information** (Python version, platform, architecture)
|
|
2213
|
+
- ⏱️ **Performance Data** (request duration, response size)
|
|
2214
|
+
- 🎯 **Context Information** (function name, parameters)
|
|
2215
|
+
- 💡 **Error Analysis** with intelligent suggestions
|
|
2216
|
+
|
|
2217
|
+
### **⭐ Debug Output Examples:**
|
|
2218
|
+
```
|
|
2219
|
+
[17:14:16] 🔍 Debug: Making GET request to accounts/me
|
|
2220
|
+
[17:14:16] ✅ Debug: GET request successful (0.43s)
|
|
2221
|
+
[17:14:16] ❌ Debug: Authentication failed (0.12s)
|
|
2222
|
+
[17:14:16] ❌ Error Analysis: AuthenticationError
|
|
2223
|
+
[17:14:16] ❌ Suggestions:
|
|
2224
|
+
1. Check your username and password
|
|
2225
|
+
2. Verify your account is not banned
|
|
2226
|
+
3. Try re-authenticating with a fresh token
|
|
2227
|
+
```
|
|
2228
|
+
|
|
2229
|
+
### **⭐ Performance Monitoring:**
|
|
2230
|
+
```
|
|
2231
|
+
🔍 Debug: Starting my_function
|
|
2232
|
+
🔍 Debug: Parameters: {"args": ["test"], "kwargs": {"count": 5}}
|
|
2233
|
+
✅ Debug: my_function completed successfully (0.25s)
|
|
2234
|
+
```
|
|
2235
|
+
|
|
2236
|
+
### **⭐ Debug Report:**
|
|
2237
|
+
```python
|
|
2238
|
+
from mc5_api_client.debug import create_debug_report, print_debug_report
|
|
2239
|
+
|
|
2240
|
+
# Print comprehensive debug report
|
|
2241
|
+
print_debug_report()
|
|
2242
|
+
|
|
2243
|
+
# Save debug report to file
|
|
2244
|
+
report = create_debug_report()
|
|
2245
|
+
```
|
|
2246
|
+
|
|
2247
|
+
---
|
|
2248
|
+
|
|
1675
2249
|
## 🎉 **Production Status: READY!**
|
|
1676
2250
|
|
|
1677
2251
|
✅ **All Tests Passed**: 9/9 production readiness tests successful
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
mc5_api_client/__init__.py,sha256=SoxWaYsDV9lOwGBqwPI2uHlUea6S1EPSXyJFzW5lKeo,6750
|
|
2
|
+
mc5_api_client/account.py,sha256=EmydXCsCXaKqMw21oVttQfYuDl50pa2dwhcTeHtnxbQ,14396
|
|
3
|
+
mc5_api_client/account_quick.py,sha256=t4ki4ujYENmcnd_004f0pO9SPxPyCllz4WHpBG9wNbo,10458
|
|
4
|
+
mc5_api_client/admin_client.py,sha256=527aavolxVhY2M5ceFxVbbE5YTczU9Z86Fdt1UzdRZM,15220
|
|
5
|
+
mc5_api_client/alerts.py,sha256=zW-cEwSSShuHkGxTBQaS8Ynf1a0hh5RMQ0G3WC_ajI0,13223
|
|
6
|
+
mc5_api_client/alerts_quick.py,sha256=D1j0RiHteYqoAgc4KYqTxYG1Hkud3b-xWRV_VOUEnY0,7946
|
|
7
|
+
mc5_api_client/auth.py,sha256=z8vmyQIHUdAzk0pUyKCesT8gTv4jboLIFGBxAu1v_-8,13396
|
|
8
|
+
mc5_api_client/cli.py,sha256=6xciRjWkUMOxgxlbDsoOiHRuirXPy7uc9WURXPKmgGc,17255
|
|
9
|
+
mc5_api_client/client.py,sha256=nrroNwDFpyDID7xECCZBgH2RbJyeChmwuOR-n1j2SMY,110021
|
|
10
|
+
mc5_api_client/debug.py,sha256=524vNCE7jM_KP5JM81-3eI2cmFBBA-Hf7Uy0cIL75W0,8240
|
|
11
|
+
mc5_api_client/exceptions.py,sha256=o7od4GrEIlgq6xSNUjZdh74xoDTytF3PLcMq5ewRiJw,2683
|
|
12
|
+
mc5_api_client/federation.py,sha256=2asesdDm0DjfskYNliM_WueMhGPn66T5QnLjF4wgZJM,10093
|
|
13
|
+
mc5_api_client/federation_quick.py,sha256=t4xGyOIz28OCvkSQusNZLuNb8YPpGwbDrz0dMZPt4Ig,7671
|
|
14
|
+
mc5_api_client/help.py,sha256=sqf3R6VHQuSYLvAMzh8nXAgCX5URsvXydvw8P0ATabg,7246
|
|
15
|
+
mc5_api_client/platform.py,sha256=mdUR1hNiopbUs-IrVmTApaJsCac1du8Re1JK6IAwAZ4,4462
|
|
16
|
+
mc5_api_client/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
17
|
+
mc5_api_client/simple_client.py,sha256=szjfZR7c8h7Zdd-E3oZGbrkaPQ2ffx8YnkhPNWODsxo,43750
|
|
18
|
+
mc5_api_client/squad_battle.py,sha256=miBrVbWTta71k_xEAgJyNPthxfZy8qBQ-2vNEAtPTXc,18012
|
|
19
|
+
mc5_api_client/squad_battle_quick.py,sha256=ehMtSPnSQiTQYUIY2SvtO6EOXT1HmqI1F9rU9-eIEp4,8363
|
|
20
|
+
mc5_api_client/telemetry.py,sha256=k8qOimPg-AKsnMclIgeqYCJ_97j2pWyiN7Lg80D4sKo,13246
|
|
21
|
+
mc5_api_client/transfer.py,sha256=-pln70360mo4cKBQIUzp_wt9ce1Cr4YA6aJDFPKEjzQ,14381
|
|
22
|
+
mc5_api_client/transfer_quick.py,sha256=HhRbp4FVzFwuzHDcqOyYiVjeVEIfgezlWd8SN6sh874,11310
|
|
23
|
+
mc5_api_client-1.0.17.dist-info/licenses/LICENSE,sha256=M0UBQ4B3pB9XcV54_jhVP681xyauF8GB6YK_rKmuXzk,1064
|
|
24
|
+
mc5_api_client-1.0.17.dist-info/METADATA,sha256=LNE_Re5lUFTlt1tF87cQoFeOHuS4DjdTfW0ZUT7tdm8,75352
|
|
25
|
+
mc5_api_client-1.0.17.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
|
|
26
|
+
mc5_api_client-1.0.17.dist-info/entry_points.txt,sha256=2kruOpleFYK3Jl1MoQwGyqCd-Pj4kQWngXmIjnXx_gE,48
|
|
27
|
+
mc5_api_client-1.0.17.dist-info/top_level.txt,sha256=eYJe4ue9j1ig_jFY5Z05mDqpizUEV7TYpk5lBXVd4kA,15
|
|
28
|
+
mc5_api_client-1.0.17.dist-info/RECORD,,
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
mc5_api_client/__init__.py,sha256=Y8JWDAVjx-RMveEDkvoZVNiHwjNnEt80JEVmzqUUMaM,3296
|
|
2
|
-
mc5_api_client/admin_client.py,sha256=527aavolxVhY2M5ceFxVbbE5YTczU9Z86Fdt1UzdRZM,15220
|
|
3
|
-
mc5_api_client/auth.py,sha256=z8vmyQIHUdAzk0pUyKCesT8gTv4jboLIFGBxAu1v_-8,13396
|
|
4
|
-
mc5_api_client/cli.py,sha256=zgAfBANZo06oDjNyzhWiI5S5hKinDCDcnged6g2RApQ,17255
|
|
5
|
-
mc5_api_client/client.py,sha256=1UYaX8UVl_edf-uRh-H_ja5BUWz1ytw52BdOKLuZq0I,80571
|
|
6
|
-
mc5_api_client/exceptions.py,sha256=o7od4GrEIlgq6xSNUjZdh74xoDTytF3PLcMq5ewRiJw,2683
|
|
7
|
-
mc5_api_client/help.py,sha256=sqf3R6VHQuSYLvAMzh8nXAgCX5URsvXydvw8P0ATabg,7246
|
|
8
|
-
mc5_api_client/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
9
|
-
mc5_api_client/simple_client.py,sha256=1sVytpSU-TMyDBOe1y_3Y6KjIc8tsZGWdI1eHIUmhmc,23747
|
|
10
|
-
mc5_api_client-1.0.15.dist-info/licenses/LICENSE,sha256=M0UBQ4B3pB9XcV54_jhVP681xyauF8GB6YK_rKmuXzk,1064
|
|
11
|
-
mc5_api_client-1.0.15.dist-info/METADATA,sha256=BqJrMgqyGn1_BPV8uxXoULsD7kSpLm1_yR4tYl2gm9E,55416
|
|
12
|
-
mc5_api_client-1.0.15.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
|
|
13
|
-
mc5_api_client-1.0.15.dist-info/entry_points.txt,sha256=2kruOpleFYK3Jl1MoQwGyqCd-Pj4kQWngXmIjnXx_gE,48
|
|
14
|
-
mc5_api_client-1.0.15.dist-info/top_level.txt,sha256=eYJe4ue9j1ig_jFY5Z05mDqpizUEV7TYpk5lBXVd4kA,15
|
|
15
|
-
mc5_api_client-1.0.15.dist-info/RECORD,,
|
|
File without changes
|