mc5-api-client 1.0.21__tar.gz → 1.0.22__tar.gz

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.
Files changed (71) hide show
  1. {mc5_api_client-1.0.21/src/mc5_api_client.egg-info → mc5_api_client-1.0.22}/PKG-INFO +270 -17
  2. {mc5_api_client-1.0.21 → mc5_api_client-1.0.22}/README.md +269 -16
  3. mc5_api_client-1.0.22/examples/automatic_squad_management.py +203 -0
  4. mc5_api_client-1.0.22/examples/complete_squad_customization.py +400 -0
  5. {mc5_api_client-1.0.21 → mc5_api_client-1.0.22}/pyproject.toml +1 -1
  6. {mc5_api_client-1.0.21 → mc5_api_client-1.0.22}/setup.py +1 -1
  7. {mc5_api_client-1.0.21 → mc5_api_client-1.0.22}/src/mc5_api_client/__init__.py +6 -1
  8. {mc5_api_client-1.0.21 → mc5_api_client-1.0.22}/src/mc5_api_client/client.py +206 -0
  9. {mc5_api_client-1.0.21 → mc5_api_client-1.0.22/src/mc5_api_client.egg-info}/PKG-INFO +270 -17
  10. {mc5_api_client-1.0.21 → mc5_api_client-1.0.22}/src/mc5_api_client.egg-info/SOURCES.txt +2 -0
  11. {mc5_api_client-1.0.21 → mc5_api_client-1.0.22}/.gitignore +0 -0
  12. {mc5_api_client-1.0.21 → mc5_api_client-1.0.22}/LICENSE +0 -0
  13. {mc5_api_client-1.0.21 → mc5_api_client-1.0.22}/MANIFEST.in +0 -0
  14. {mc5_api_client-1.0.21 → mc5_api_client-1.0.22}/examples/admin_squad_management.py +0 -0
  15. {mc5_api_client-1.0.21 → mc5_api_client-1.0.22}/examples/admin_tools.py +0 -0
  16. {mc5_api_client-1.0.21 → mc5_api_client-1.0.22}/examples/advanced_automation.py +0 -0
  17. {mc5_api_client-1.0.21 → mc5_api_client-1.0.22}/examples/advanced_features.py +0 -0
  18. {mc5_api_client-1.0.21 → mc5_api_client-1.0.22}/examples/authentication_example.py +0 -0
  19. {mc5_api_client-1.0.21 → mc5_api_client-1.0.22}/examples/basic_usage.py +0 -0
  20. {mc5_api_client-1.0.21 → mc5_api_client-1.0.22}/examples/clan_management.py +0 -0
  21. {mc5_api_client-1.0.21 → mc5_api_client-1.0.22}/examples/clan_management_complete.py +0 -0
  22. {mc5_api_client-1.0.21 → mc5_api_client-1.0.22}/examples/device_id_example.py +0 -0
  23. {mc5_api_client-1.0.21 → mc5_api_client-1.0.22}/examples/events_and_tasks.py +0 -0
  24. {mc5_api_client-1.0.21 → mc5_api_client-1.0.22}/examples/everyday_mc5.py +0 -0
  25. {mc5_api_client-1.0.21 → mc5_api_client-1.0.22}/examples/everyday_mc5_easy.py +0 -0
  26. {mc5_api_client-1.0.21 → mc5_api_client-1.0.22}/examples/game_launch_example.py +0 -0
  27. {mc5_api_client-1.0.21 → mc5_api_client-1.0.22}/examples/help_system.py +0 -0
  28. {mc5_api_client-1.0.21 → mc5_api_client-1.0.22}/examples/message_management.py +0 -0
  29. {mc5_api_client-1.0.21 → mc5_api_client-1.0.22}/examples/player_stats.py +0 -0
  30. {mc5_api_client-1.0.21 → mc5_api_client-1.0.22}/examples/private_messaging.py +0 -0
  31. {mc5_api_client-1.0.21 → mc5_api_client-1.0.22}/examples/quick_help.py +0 -0
  32. {mc5_api_client-1.0.21 → mc5_api_client-1.0.22}/examples/quick_reference.py +0 -0
  33. {mc5_api_client-1.0.21 → mc5_api_client-1.0.22}/examples/service_location_example.py +0 -0
  34. {mc5_api_client-1.0.21 → mc5_api_client-1.0.22}/examples/simple_usage.py +0 -0
  35. {mc5_api_client-1.0.21 → mc5_api_client-1.0.22}/examples/squad_management.py +0 -0
  36. {mc5_api_client-1.0.21 → mc5_api_client-1.0.22}/examples/squad_wall_management.py +0 -0
  37. {mc5_api_client-1.0.21 → mc5_api_client-1.0.22}/requirements.txt +0 -0
  38. {mc5_api_client-1.0.21 → mc5_api_client-1.0.22}/setup.cfg +0 -0
  39. {mc5_api_client-1.0.21 → mc5_api_client-1.0.22}/src/mc5_api_client/account.py +0 -0
  40. {mc5_api_client-1.0.21 → mc5_api_client-1.0.22}/src/mc5_api_client/account_quick.py +0 -0
  41. {mc5_api_client-1.0.21 → mc5_api_client-1.0.22}/src/mc5_api_client/admin_client.py +0 -0
  42. {mc5_api_client-1.0.21 → mc5_api_client-1.0.22}/src/mc5_api_client/alerts.py +0 -0
  43. {mc5_api_client-1.0.21 → mc5_api_client-1.0.22}/src/mc5_api_client/alerts_quick.py +0 -0
  44. {mc5_api_client-1.0.21 → mc5_api_client-1.0.22}/src/mc5_api_client/auth.py +0 -0
  45. {mc5_api_client-1.0.21 → mc5_api_client-1.0.22}/src/mc5_api_client/cli.py +0 -0
  46. {mc5_api_client-1.0.21 → mc5_api_client-1.0.22}/src/mc5_api_client/debug.py +0 -0
  47. {mc5_api_client-1.0.21 → mc5_api_client-1.0.22}/src/mc5_api_client/easy_mc5.py +0 -0
  48. {mc5_api_client-1.0.21 → mc5_api_client-1.0.22}/src/mc5_api_client/exceptions.py +0 -0
  49. {mc5_api_client-1.0.21 → mc5_api_client-1.0.22}/src/mc5_api_client/federation.py +0 -0
  50. {mc5_api_client-1.0.21 → mc5_api_client-1.0.22}/src/mc5_api_client/federation_quick.py +0 -0
  51. {mc5_api_client-1.0.21 → mc5_api_client-1.0.22}/src/mc5_api_client/help.py +0 -0
  52. {mc5_api_client-1.0.21 → mc5_api_client-1.0.22}/src/mc5_api_client/pc_storage_client.py +0 -0
  53. {mc5_api_client-1.0.21 → mc5_api_client-1.0.22}/src/mc5_api_client/pc_storage_quick.py +0 -0
  54. {mc5_api_client-1.0.21 → mc5_api_client-1.0.22}/src/mc5_api_client/platform.py +0 -0
  55. {mc5_api_client-1.0.21 → mc5_api_client-1.0.22}/src/mc5_api_client/py.typed +0 -0
  56. {mc5_api_client-1.0.21 → mc5_api_client-1.0.22}/src/mc5_api_client/simple_client.py +0 -0
  57. {mc5_api_client-1.0.21 → mc5_api_client-1.0.22}/src/mc5_api_client/squad_battle.py +0 -0
  58. {mc5_api_client-1.0.21 → mc5_api_client-1.0.22}/src/mc5_api_client/squad_battle_quick.py +0 -0
  59. {mc5_api_client-1.0.21 → mc5_api_client-1.0.22}/src/mc5_api_client/storage_admin.py +0 -0
  60. {mc5_api_client-1.0.21 → mc5_api_client-1.0.22}/src/mc5_api_client/telemetry.py +0 -0
  61. {mc5_api_client-1.0.21 → mc5_api_client-1.0.22}/src/mc5_api_client/transfer.py +0 -0
  62. {mc5_api_client-1.0.21 → mc5_api_client-1.0.22}/src/mc5_api_client/transfer_quick.py +0 -0
  63. {mc5_api_client-1.0.21 → mc5_api_client-1.0.22}/src/mc5_api_client.egg-info/dependency_links.txt +0 -0
  64. {mc5_api_client-1.0.21 → mc5_api_client-1.0.22}/src/mc5_api_client.egg-info/entry_points.txt +0 -0
  65. {mc5_api_client-1.0.21 → mc5_api_client-1.0.22}/src/mc5_api_client.egg-info/not-zip-safe +0 -0
  66. {mc5_api_client-1.0.21 → mc5_api_client-1.0.22}/src/mc5_api_client.egg-info/requires.txt +0 -0
  67. {mc5_api_client-1.0.21 → mc5_api_client-1.0.22}/src/mc5_api_client.egg-info/top_level.txt +0 -0
  68. {mc5_api_client-1.0.21 → mc5_api_client-1.0.22}/tests/__init__.py +0 -0
  69. {mc5_api_client-1.0.21 → mc5_api_client-1.0.22}/tests/test_auth.py +0 -0
  70. {mc5_api_client-1.0.21 → mc5_api_client-1.0.22}/tests/test_cli.py +0 -0
  71. {mc5_api_client-1.0.21 → mc5_api_client-1.0.22}/tests/test_client.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: mc5_api_client
3
- Version: 1.0.21
3
+ Version: 1.0.22
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,22 +81,27 @@ Dynamic: requires-python
81
81
  [![Python Version](https://img.shields.io/badge/python-3.8+-blue.svg)](https://python.org)
82
82
  [![License](https://img.shields.io/badge/license-MIT-green.svg)](LICENSE)
83
83
  [![Author](https://img.shields.io/badge/author-Chizoba-orange.svg)](mailto:chizoba2026@hotmail.com)
84
- [![PyPI Version](https://img.shields.io/badge/pypi-1.0.18-blue.svg)](https://pypi.org/project/mc5-api-client/)
84
+ [![PyPI Version](https://img.shields.io/badge/pypi-1.0.21-blue.svg)](https://pypi.org/project/mc5-api-client/)
85
85
  [![Production Ready](https://img.shields.io/badge/production-ready-brightgreen.svg)](https://pypi.org/project/mc5-api-client/)
86
86
 
87
87
  Hey there! 👋 Welcome to the **Modern Combat 5 API Client** - Comprehensive Python library for interacting with Modern Combat 5 game servers
88
88
 
89
- ## ✨ **New in v1.0.18: Super Easy Interface & Complete Game Management!**
90
-
91
- - 🎯 **NEW: MC5Easy** - Super simple one-line functions for everyday tasks
92
- - 🚀 **NEW: One-Liner Functions** - `check_my_daily_tasks()`, `get_my_mc5_profile()`, `find_mc5_player()`
93
- - 📝 **NEW: Context Manager** - Auto-connect and auto-cleanup with `with MC5Easy()`
94
- - 🔧 **NEW: Environment Variables** - Secure credential management with `MC5_USERNAME` and `MC5_PASSWORD`
95
- - 🌐 **NEW: Service Location** - Dynamic MC5 service endpoint discovery
96
- - 🎮 **NEW: Federation Sessions** - Complete game launch preparation
97
- - 🌍 **NEW: Global ID Management** - Device tracking and identification
98
- - 🔗 **NEW: Connection Monitoring** - Service health and status tracking
99
- - 🏠 **NEW: Room Discovery** - Find available game rooms
89
+ ## ✨ **New in v1.0.21: Revolutionary Automatic Squad Management!**
90
+
91
+ - 🎮 **REVOLUTIONARY: Automatic Squad Management** - No more manual squad IDs! Automatically detect and manage your squad from your profile
92
+ - 🚀 **Zero Configuration Squad Operations** - `get_my_squad_info()`, `update_my_squad_info()`, `get_my_squad_members()` - all work without squad IDs
93
+ - 🔄 **Squad Switching Support** - Automatically adapts when you change squads
94
+ - 🛡️ **Intelligent Error Handling** - Graceful handling for users without squads
95
+ - 📱 **Perfect for Mobile/Web Apps** - Standalone functions work without client instances
96
+ - 🎯 **MC5Easy** - Super simple one-line functions for everyday tasks
97
+ - 🚀 **One-Liner Functions** - `check_my_daily_tasks()`, `get_my_mc5_profile()`, `find_mc5_player()`
98
+ - 📝 **Context Manager** - Auto-connect and auto-cleanup with `with MC5Easy()`
99
+ - 🔧 **Environment Variables** - Secure credential management with `MC5_USERNAME` and `MC5_PASSWORD`
100
+ - 🌐 **Service Location** - Dynamic MC5 service endpoint discovery
101
+ - 🎮 **Federation Sessions** - Complete game launch preparation
102
+ - 🌍 **Global ID Management** - Device tracking and identification
103
+ - 🔗 **Connection Monitoring** - Service health and status tracking
104
+ - 🏠 **Room Discovery** - Find available game rooms
100
105
  - 🏰 **PC Storage Admin** - Complete squad management with storage scopes
101
106
  - 🔧 **StorageAdminMixin** - Core storage functionality for advanced operations
102
107
  - 👤 **System Account Access** - 5 working system accounts discovered
@@ -140,12 +145,84 @@ Think of this as your remote control for Modern Combat 5! Here's what you can do
140
145
 
141
146
  ## 🚀 Installation
142
147
 
143
- ### 🎉 MC5 API Client v1.0.18 - Super Easy Interface & Clean API!
148
+ ### 🎉 MC5 API Client v1.0.21 - Revolutionary Automatic Squad Management!
144
149
 
145
150
  ```bash
146
- pip install mc5_api_client==1.0.20
151
+ pip install mc5_api_client==1.0.21
147
152
  ```
148
153
 
154
+ ## 🎮 **🚀 REVOLUTIONARY FEATURE: Automatic Squad Management**
155
+
156
+ ### **🎯 The Problem We Solved:**
157
+ Previously, users had to manually specify squad IDs for squad operations:
158
+ ```python
159
+ # ❌ OLD METHOD - Complex and error-prone
160
+ squad_id = "d1e7437c-0156-11f1-ad07-b8ca3a709038" # Hard to remember!
161
+ squad_info = client.get_clan_settings(squad_id) # Manual ID required
162
+ ```
163
+
164
+ ### **✅ Our Solution - Automatic Detection:**
165
+ ```python
166
+ # ✅ NEW METHOD - Simple and automatic
167
+ squad_info = client.get_my_squad_info() # Auto-fetched from profile!
168
+ ```
169
+
170
+ ### **🎮 Key Benefits:**
171
+ - 🎯 **No Squad ID Memorization** - Automatically detected from your profile
172
+ - 🔄 **Squad Switching Support** - Works when you change squads
173
+ - 🛡️ **Intelligent Error Handling** - Graceful handling for users without squads
174
+ - 📱 **Perfect for Mobile/Web Apps** - Standalone functions work without client instances
175
+ - 🚀 **Zero Configuration** - Just call the methods, no setup required
176
+
177
+ ### **🔧 Available Methods:**
178
+
179
+ #### **Client Methods:**
180
+ ```python
181
+ from mc5_api_client import MC5Client
182
+
183
+ client = MC5Client(username, password)
184
+
185
+ # Get squad ID automatically
186
+ squad_id = client.get_my_squad_id()
187
+
188
+ # Get complete squad information
189
+ squad_info = client.get_my_squad_info()
190
+
191
+ # Get squad members
192
+ members = client.get_my_squad_members()
193
+
194
+ # Update squad (no squad ID needed!)
195
+ client.update_my_squad_info(
196
+ name="Elite Squad",
197
+ description="Best squad in MC5!",
198
+ rating=2000
199
+ )
200
+ ```
201
+
202
+ #### **Standalone Functions:**
203
+ ```python
204
+ from mc5_api_client import get_my_squad_info, update_my_squad_info
205
+
206
+ # Work without creating a client!
207
+ squad_info = get_my_squad_info(
208
+ username="your_credential",
209
+ password="your_password"
210
+ )
211
+
212
+ # Update squad without client
213
+ result = update_my_squad_info(
214
+ username="your_credential",
215
+ password="your_password",
216
+ name="New Squad Name"
217
+ )
218
+ ```
219
+
220
+ ### **🔄 Real-World Impact:**
221
+ - **10x easier** squad management
222
+ - **Zero configuration** required
223
+ - **Automatic adaptation** to squad changes
224
+ - **Perfect for** modern applications
225
+
149
226
  ## 🎯 **Usage Examples**
150
227
 
151
228
  ### **🎮 Basic Usage (MC5Client)**
@@ -245,6 +322,179 @@ with MC5Easy(username, password) as mc5:
245
322
  print(f"Device: {device_info}")
246
323
  ```
247
324
 
325
+ ### **🎮 Automatic Squad Management (REVOLUTIONARY!)**
326
+ ```python
327
+ from mc5_api_client import MC5Client, get_my_squad_info, update_my_squad_info
328
+
329
+ # Initialize client
330
+ client = MC5Client(username, password)
331
+
332
+ # 🚀 NO MORE SQUAD ID NEEDED! Automatically detected from your profile!
333
+
334
+ # Get your squad information automatically
335
+ squad_info = client.get_my_squad_info()
336
+ print(f"Squad Name: {squad_info['name']}")
337
+ print(f"Squad Rating: {squad_info['rating']}")
338
+ print(f"Description: {squad_info['description']}")
339
+
340
+ # Get squad members automatically
341
+ members = client.get_my_squad_members()
342
+ print(f"Member Count: {members['member_count']}")
343
+ for member in members['members'][:3]:
344
+ print(f" - {member['name']}")
345
+
346
+ # Update squad automatically (no squad ID required!)
347
+ client.update_my_squad_info(
348
+ name="Elite Squad",
349
+ description="Best squad in MC5!",
350
+ rating=2000,
351
+ min_join_value=1000
352
+ )
353
+
354
+ # 🔄 Works even when you switch squads!
355
+ # The methods automatically detect your current squad
356
+ ```
357
+
358
+ ### **🚀 Standalone Squad Management (No Client Required!)**
359
+ ```python
360
+ from mc5_api_client import get_my_squad_id, get_my_squad_info, update_my_squad_info
361
+
362
+ # Get squad ID without creating client
363
+ squad_id = get_my_squad_id(
364
+ username="your_credential",
365
+ password="your_password"
366
+ )
367
+ print(f"Your Squad ID: {squad_id}")
368
+
369
+ # Get squad info without creating client
370
+ squad_info = get_my_squad_info(
371
+ username="your_credential",
372
+ password="your_password"
373
+ )
374
+ print(f"Squad: {squad_info['name']}")
375
+
376
+ # Update squad without creating client
377
+ result = update_my_squad_info(
378
+ username="your_credential",
379
+ password="your_password",
380
+ name="New Squad Name",
381
+ description="Updated description"
382
+ )
383
+ print(f"Update Result: {result}")
384
+ ```
385
+
386
+ ### **🔄 Traditional vs Automatic Squad Management**
387
+ ```python
388
+ # ❌ OLD METHOD - Manual squad ID required
389
+ squad_id = "d1e7437c-0156-11f1-ad07-b8ca3a709038" # Hard to remember!
390
+ squad_info = client.get_clan_settings(squad_id) # Manual ID required
391
+ members = client.get_clan_members(squad_id) # Manual ID required
392
+ client.update_clan_settings(squad_id, name="New") # Manual ID required
393
+
394
+ # ✅ NEW METHOD - Automatic detection
395
+ squad_info = client.get_my_squad_info() # Auto-fetched!
396
+ members = client.get_my_squad_members() # Auto-fetched!
397
+ client.update_my_squad_info(name="New") # Auto-fetched!
398
+
399
+ # Benefits:
400
+ # 🎯 No squad ID memorization
401
+ # 🔄 Works when switching squads
402
+ # 🛡️ Error handling for users without squads
403
+ # 🚀 Simpler API for everyday use
404
+ ```
405
+
406
+ ### **🎨 Complete Squad Customization (NEW!)**
407
+ ```python
408
+ from mc5_api_client import MC5Client
409
+
410
+ client = MC5Client(username, password)
411
+
412
+ # 🎯 Set squad to specific level (1-10)
413
+ client.set_squad_level(8, "Level 8 Elite")
414
+ # Automatically sets XP, rating, member limit, etc.
415
+
416
+ # 🎨 Apply color themes
417
+ client.customize_squad_theme('fire', 'Fire Warriors') # Red/Orange theme
418
+ client.customize_squad_theme('ice', 'Ice Legion') # Blue/Cyan theme
419
+ client.customize_squad_theme('dark', 'Dark Knights') # Black/White theme
420
+ client.customize_squad_theme('nature', 'Nature Guardians') # Green/Lime theme
421
+
422
+ # 🔧 Complete customization with validation
423
+ client.customize_squad_complete(
424
+ name="452e55e84897+",
425
+ description="Professional squad with active members!",
426
+ rating=3573,
427
+ score=5200,
428
+ member_limit=300,
429
+ membership="owner_approved",
430
+ _logo="1",
431
+ _logo_clr_prim=client.get_color_value("red"), # Red color
432
+ _logo_clr_sec=client.get_color_value("white"), # White color
433
+ _min_join_value=996699,
434
+ _xp=client.calculate_xp_for_level(9), # Level 9 = 9000 XP
435
+ _killsig_id="default_killsig_01",
436
+ currency="10000",
437
+ active_clan_label="true",
438
+ active_clan_threshold="50"
439
+ )
440
+
441
+ # 🎯 Helper functions
442
+ xp = client.calculate_xp_for_level(5) # Returns 5000
443
+ color = client.get_color_value('blue') # Returns '255'
444
+ ```
445
+
446
+ ### **📊 Squad Parameters You Can Customize:**
447
+ ```python
448
+ # 📝 Basic Information
449
+ name: "Your Squad Name"
450
+ description: "Your squad description"
451
+ rating: 5000
452
+ score: 5200
453
+
454
+ # 👥 Member Settings
455
+ member_limit: 300 # 1-300 members
456
+ membership: "owner_approved" # or "open"
457
+ _min_join_value: 1000 # Minimum score to join
458
+
459
+ # 🎨 Visual Customization
460
+ _logo: "1" # Logo ID
461
+ _logo_clr_prim: "16711680" # Primary color (RGB decimal)
462
+ _logo_clr_sec: "16777215" # Secondary color (RGB decimal)
463
+ # Colors: black=0, white=16777215, red=16711680, blue=255, green=65280
464
+
465
+ # ⭐ Level & Progress
466
+ _xp: "5000" # Level 5 (1000-10000, Level 1-10)
467
+ # Level 1: 1000, Level 2: 2000, ..., Level 10: 10000
468
+
469
+ # 💰 Economy
470
+ currency: "10000"
471
+ _killsig_id: "default_killsig_01"
472
+
473
+ # 🏃 Activity Settings
474
+ active_clan_label: "true"
475
+ active_clan_threshold: "50"
476
+ ```
477
+
478
+ ### **🎮 Quick Customization Examples:**
479
+ ```python
480
+ # 🚀 One-line level upgrades
481
+ client.set_squad_level(10) # Max level squad
482
+ client.set_squad_level(5, "Level 5 Warriors") # Custom name
483
+
484
+ # 🎨 One-line theme applications
485
+ client.customize_squad_theme('fire') # Fire theme
486
+ client.customize_squad_theme('ice', 'Ice Squad') # Custom name
487
+
488
+ # 🔧 Complete professional setup
489
+ client.customize_squad_complete(
490
+ name="Elite Squad",
491
+ rating=8000,
492
+ _xp=client.calculate_xp_for_level(8),
493
+ _logo_clr_prim=client.get_color_value('purple'),
494
+ member_limit=100
495
+ )
496
+ ```
497
+
248
498
  ## 📱 **Run Examples:** Completed!
249
499
 
250
500
  **🎯 Super Easy Interface (NEW in v1.0.18):**
@@ -329,8 +579,11 @@ python examples/service_location_example.py
329
579
  # Game launch and federation sessions:
330
580
  python examples/game_launch_example.py
331
581
 
332
- # Device ID management:
333
- python examples/device_id_example.py
582
+ # Automatic squad management:
583
+ python examples/automatic_squad_management.py
584
+
585
+ # Complete squad customization:
586
+ python examples/complete_squad_customization.py
334
587
 
335
588
  # Authentication examples:
336
589
  python examples/authentication_example.py
@@ -3,22 +3,27 @@
3
3
  [![Python Version](https://img.shields.io/badge/python-3.8+-blue.svg)](https://python.org)
4
4
  [![License](https://img.shields.io/badge/license-MIT-green.svg)](LICENSE)
5
5
  [![Author](https://img.shields.io/badge/author-Chizoba-orange.svg)](mailto:chizoba2026@hotmail.com)
6
- [![PyPI Version](https://img.shields.io/badge/pypi-1.0.18-blue.svg)](https://pypi.org/project/mc5-api-client/)
6
+ [![PyPI Version](https://img.shields.io/badge/pypi-1.0.21-blue.svg)](https://pypi.org/project/mc5-api-client/)
7
7
  [![Production Ready](https://img.shields.io/badge/production-ready-brightgreen.svg)](https://pypi.org/project/mc5-api-client/)
8
8
 
9
9
  Hey there! 👋 Welcome to the **Modern Combat 5 API Client** - Comprehensive Python library for interacting with Modern Combat 5 game servers
10
10
 
11
- ## ✨ **New in v1.0.18: Super Easy Interface & Complete Game Management!**
12
-
13
- - 🎯 **NEW: MC5Easy** - Super simple one-line functions for everyday tasks
14
- - 🚀 **NEW: One-Liner Functions** - `check_my_daily_tasks()`, `get_my_mc5_profile()`, `find_mc5_player()`
15
- - 📝 **NEW: Context Manager** - Auto-connect and auto-cleanup with `with MC5Easy()`
16
- - 🔧 **NEW: Environment Variables** - Secure credential management with `MC5_USERNAME` and `MC5_PASSWORD`
17
- - 🌐 **NEW: Service Location** - Dynamic MC5 service endpoint discovery
18
- - 🎮 **NEW: Federation Sessions** - Complete game launch preparation
19
- - 🌍 **NEW: Global ID Management** - Device tracking and identification
20
- - 🔗 **NEW: Connection Monitoring** - Service health and status tracking
21
- - 🏠 **NEW: Room Discovery** - Find available game rooms
11
+ ## ✨ **New in v1.0.21: Revolutionary Automatic Squad Management!**
12
+
13
+ - 🎮 **REVOLUTIONARY: Automatic Squad Management** - No more manual squad IDs! Automatically detect and manage your squad from your profile
14
+ - 🚀 **Zero Configuration Squad Operations** - `get_my_squad_info()`, `update_my_squad_info()`, `get_my_squad_members()` - all work without squad IDs
15
+ - 🔄 **Squad Switching Support** - Automatically adapts when you change squads
16
+ - 🛡️ **Intelligent Error Handling** - Graceful handling for users without squads
17
+ - 📱 **Perfect for Mobile/Web Apps** - Standalone functions work without client instances
18
+ - 🎯 **MC5Easy** - Super simple one-line functions for everyday tasks
19
+ - 🚀 **One-Liner Functions** - `check_my_daily_tasks()`, `get_my_mc5_profile()`, `find_mc5_player()`
20
+ - 📝 **Context Manager** - Auto-connect and auto-cleanup with `with MC5Easy()`
21
+ - 🔧 **Environment Variables** - Secure credential management with `MC5_USERNAME` and `MC5_PASSWORD`
22
+ - 🌐 **Service Location** - Dynamic MC5 service endpoint discovery
23
+ - 🎮 **Federation Sessions** - Complete game launch preparation
24
+ - 🌍 **Global ID Management** - Device tracking and identification
25
+ - 🔗 **Connection Monitoring** - Service health and status tracking
26
+ - 🏠 **Room Discovery** - Find available game rooms
22
27
  - 🏰 **PC Storage Admin** - Complete squad management with storage scopes
23
28
  - 🔧 **StorageAdminMixin** - Core storage functionality for advanced operations
24
29
  - 👤 **System Account Access** - 5 working system accounts discovered
@@ -62,12 +67,84 @@ Think of this as your remote control for Modern Combat 5! Here's what you can do
62
67
 
63
68
  ## 🚀 Installation
64
69
 
65
- ### 🎉 MC5 API Client v1.0.18 - Super Easy Interface & Clean API!
70
+ ### 🎉 MC5 API Client v1.0.21 - Revolutionary Automatic Squad Management!
66
71
 
67
72
  ```bash
68
- pip install mc5_api_client==1.0.20
73
+ pip install mc5_api_client==1.0.21
69
74
  ```
70
75
 
76
+ ## 🎮 **🚀 REVOLUTIONARY FEATURE: Automatic Squad Management**
77
+
78
+ ### **🎯 The Problem We Solved:**
79
+ Previously, users had to manually specify squad IDs for squad operations:
80
+ ```python
81
+ # ❌ OLD METHOD - Complex and error-prone
82
+ squad_id = "d1e7437c-0156-11f1-ad07-b8ca3a709038" # Hard to remember!
83
+ squad_info = client.get_clan_settings(squad_id) # Manual ID required
84
+ ```
85
+
86
+ ### **✅ Our Solution - Automatic Detection:**
87
+ ```python
88
+ # ✅ NEW METHOD - Simple and automatic
89
+ squad_info = client.get_my_squad_info() # Auto-fetched from profile!
90
+ ```
91
+
92
+ ### **🎮 Key Benefits:**
93
+ - 🎯 **No Squad ID Memorization** - Automatically detected from your profile
94
+ - 🔄 **Squad Switching Support** - Works when you change squads
95
+ - 🛡️ **Intelligent Error Handling** - Graceful handling for users without squads
96
+ - 📱 **Perfect for Mobile/Web Apps** - Standalone functions work without client instances
97
+ - 🚀 **Zero Configuration** - Just call the methods, no setup required
98
+
99
+ ### **🔧 Available Methods:**
100
+
101
+ #### **Client Methods:**
102
+ ```python
103
+ from mc5_api_client import MC5Client
104
+
105
+ client = MC5Client(username, password)
106
+
107
+ # Get squad ID automatically
108
+ squad_id = client.get_my_squad_id()
109
+
110
+ # Get complete squad information
111
+ squad_info = client.get_my_squad_info()
112
+
113
+ # Get squad members
114
+ members = client.get_my_squad_members()
115
+
116
+ # Update squad (no squad ID needed!)
117
+ client.update_my_squad_info(
118
+ name="Elite Squad",
119
+ description="Best squad in MC5!",
120
+ rating=2000
121
+ )
122
+ ```
123
+
124
+ #### **Standalone Functions:**
125
+ ```python
126
+ from mc5_api_client import get_my_squad_info, update_my_squad_info
127
+
128
+ # Work without creating a client!
129
+ squad_info = get_my_squad_info(
130
+ username="your_credential",
131
+ password="your_password"
132
+ )
133
+
134
+ # Update squad without client
135
+ result = update_my_squad_info(
136
+ username="your_credential",
137
+ password="your_password",
138
+ name="New Squad Name"
139
+ )
140
+ ```
141
+
142
+ ### **🔄 Real-World Impact:**
143
+ - **10x easier** squad management
144
+ - **Zero configuration** required
145
+ - **Automatic adaptation** to squad changes
146
+ - **Perfect for** modern applications
147
+
71
148
  ## 🎯 **Usage Examples**
72
149
 
73
150
  ### **🎮 Basic Usage (MC5Client)**
@@ -167,6 +244,179 @@ with MC5Easy(username, password) as mc5:
167
244
  print(f"Device: {device_info}")
168
245
  ```
169
246
 
247
+ ### **🎮 Automatic Squad Management (REVOLUTIONARY!)**
248
+ ```python
249
+ from mc5_api_client import MC5Client, get_my_squad_info, update_my_squad_info
250
+
251
+ # Initialize client
252
+ client = MC5Client(username, password)
253
+
254
+ # 🚀 NO MORE SQUAD ID NEEDED! Automatically detected from your profile!
255
+
256
+ # Get your squad information automatically
257
+ squad_info = client.get_my_squad_info()
258
+ print(f"Squad Name: {squad_info['name']}")
259
+ print(f"Squad Rating: {squad_info['rating']}")
260
+ print(f"Description: {squad_info['description']}")
261
+
262
+ # Get squad members automatically
263
+ members = client.get_my_squad_members()
264
+ print(f"Member Count: {members['member_count']}")
265
+ for member in members['members'][:3]:
266
+ print(f" - {member['name']}")
267
+
268
+ # Update squad automatically (no squad ID required!)
269
+ client.update_my_squad_info(
270
+ name="Elite Squad",
271
+ description="Best squad in MC5!",
272
+ rating=2000,
273
+ min_join_value=1000
274
+ )
275
+
276
+ # 🔄 Works even when you switch squads!
277
+ # The methods automatically detect your current squad
278
+ ```
279
+
280
+ ### **🚀 Standalone Squad Management (No Client Required!)**
281
+ ```python
282
+ from mc5_api_client import get_my_squad_id, get_my_squad_info, update_my_squad_info
283
+
284
+ # Get squad ID without creating client
285
+ squad_id = get_my_squad_id(
286
+ username="your_credential",
287
+ password="your_password"
288
+ )
289
+ print(f"Your Squad ID: {squad_id}")
290
+
291
+ # Get squad info without creating client
292
+ squad_info = get_my_squad_info(
293
+ username="your_credential",
294
+ password="your_password"
295
+ )
296
+ print(f"Squad: {squad_info['name']}")
297
+
298
+ # Update squad without creating client
299
+ result = update_my_squad_info(
300
+ username="your_credential",
301
+ password="your_password",
302
+ name="New Squad Name",
303
+ description="Updated description"
304
+ )
305
+ print(f"Update Result: {result}")
306
+ ```
307
+
308
+ ### **🔄 Traditional vs Automatic Squad Management**
309
+ ```python
310
+ # ❌ OLD METHOD - Manual squad ID required
311
+ squad_id = "d1e7437c-0156-11f1-ad07-b8ca3a709038" # Hard to remember!
312
+ squad_info = client.get_clan_settings(squad_id) # Manual ID required
313
+ members = client.get_clan_members(squad_id) # Manual ID required
314
+ client.update_clan_settings(squad_id, name="New") # Manual ID required
315
+
316
+ # ✅ NEW METHOD - Automatic detection
317
+ squad_info = client.get_my_squad_info() # Auto-fetched!
318
+ members = client.get_my_squad_members() # Auto-fetched!
319
+ client.update_my_squad_info(name="New") # Auto-fetched!
320
+
321
+ # Benefits:
322
+ # 🎯 No squad ID memorization
323
+ # 🔄 Works when switching squads
324
+ # 🛡️ Error handling for users without squads
325
+ # 🚀 Simpler API for everyday use
326
+ ```
327
+
328
+ ### **🎨 Complete Squad Customization (NEW!)**
329
+ ```python
330
+ from mc5_api_client import MC5Client
331
+
332
+ client = MC5Client(username, password)
333
+
334
+ # 🎯 Set squad to specific level (1-10)
335
+ client.set_squad_level(8, "Level 8 Elite")
336
+ # Automatically sets XP, rating, member limit, etc.
337
+
338
+ # 🎨 Apply color themes
339
+ client.customize_squad_theme('fire', 'Fire Warriors') # Red/Orange theme
340
+ client.customize_squad_theme('ice', 'Ice Legion') # Blue/Cyan theme
341
+ client.customize_squad_theme('dark', 'Dark Knights') # Black/White theme
342
+ client.customize_squad_theme('nature', 'Nature Guardians') # Green/Lime theme
343
+
344
+ # 🔧 Complete customization with validation
345
+ client.customize_squad_complete(
346
+ name="452e55e84897+",
347
+ description="Professional squad with active members!",
348
+ rating=3573,
349
+ score=5200,
350
+ member_limit=300,
351
+ membership="owner_approved",
352
+ _logo="1",
353
+ _logo_clr_prim=client.get_color_value("red"), # Red color
354
+ _logo_clr_sec=client.get_color_value("white"), # White color
355
+ _min_join_value=996699,
356
+ _xp=client.calculate_xp_for_level(9), # Level 9 = 9000 XP
357
+ _killsig_id="default_killsig_01",
358
+ currency="10000",
359
+ active_clan_label="true",
360
+ active_clan_threshold="50"
361
+ )
362
+
363
+ # 🎯 Helper functions
364
+ xp = client.calculate_xp_for_level(5) # Returns 5000
365
+ color = client.get_color_value('blue') # Returns '255'
366
+ ```
367
+
368
+ ### **📊 Squad Parameters You Can Customize:**
369
+ ```python
370
+ # 📝 Basic Information
371
+ name: "Your Squad Name"
372
+ description: "Your squad description"
373
+ rating: 5000
374
+ score: 5200
375
+
376
+ # 👥 Member Settings
377
+ member_limit: 300 # 1-300 members
378
+ membership: "owner_approved" # or "open"
379
+ _min_join_value: 1000 # Minimum score to join
380
+
381
+ # 🎨 Visual Customization
382
+ _logo: "1" # Logo ID
383
+ _logo_clr_prim: "16711680" # Primary color (RGB decimal)
384
+ _logo_clr_sec: "16777215" # Secondary color (RGB decimal)
385
+ # Colors: black=0, white=16777215, red=16711680, blue=255, green=65280
386
+
387
+ # ⭐ Level & Progress
388
+ _xp: "5000" # Level 5 (1000-10000, Level 1-10)
389
+ # Level 1: 1000, Level 2: 2000, ..., Level 10: 10000
390
+
391
+ # 💰 Economy
392
+ currency: "10000"
393
+ _killsig_id: "default_killsig_01"
394
+
395
+ # 🏃 Activity Settings
396
+ active_clan_label: "true"
397
+ active_clan_threshold: "50"
398
+ ```
399
+
400
+ ### **🎮 Quick Customization Examples:**
401
+ ```python
402
+ # 🚀 One-line level upgrades
403
+ client.set_squad_level(10) # Max level squad
404
+ client.set_squad_level(5, "Level 5 Warriors") # Custom name
405
+
406
+ # 🎨 One-line theme applications
407
+ client.customize_squad_theme('fire') # Fire theme
408
+ client.customize_squad_theme('ice', 'Ice Squad') # Custom name
409
+
410
+ # 🔧 Complete professional setup
411
+ client.customize_squad_complete(
412
+ name="Elite Squad",
413
+ rating=8000,
414
+ _xp=client.calculate_xp_for_level(8),
415
+ _logo_clr_prim=client.get_color_value('purple'),
416
+ member_limit=100
417
+ )
418
+ ```
419
+
170
420
  ## 📱 **Run Examples:** Completed!
171
421
 
172
422
  **🎯 Super Easy Interface (NEW in v1.0.18):**
@@ -251,8 +501,11 @@ python examples/service_location_example.py
251
501
  # Game launch and federation sessions:
252
502
  python examples/game_launch_example.py
253
503
 
254
- # Device ID management:
255
- python examples/device_id_example.py
504
+ # Automatic squad management:
505
+ python examples/automatic_squad_management.py
506
+
507
+ # Complete squad customization:
508
+ python examples/complete_squad_customization.py
256
509
 
257
510
  # Authentication examples:
258
511
  python examples/authentication_example.py