mc5-api-client 1.0.5__tar.gz → 1.0.8__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 (42) hide show
  1. {mc5_api_client-1.0.5 → mc5_api_client-1.0.8}/CHANGELOG.md +130 -0
  2. {mc5_api_client-1.0.5 → mc5_api_client-1.0.8}/PKG-INFO +365 -39
  3. {mc5_api_client-1.0.5 → mc5_api_client-1.0.8}/README.md +340 -33
  4. mc5_api_client-1.0.8/examples/advanced_automation.py +287 -0
  5. mc5_api_client-1.0.8/examples/simple_usage.py +198 -0
  6. {mc5_api_client-1.0.5 → mc5_api_client-1.0.8}/pyproject.toml +1 -1
  7. {mc5_api_client-1.0.5 → mc5_api_client-1.0.8}/src/mc5_api_client/__init__.py +19 -1
  8. {mc5_api_client-1.0.5 → mc5_api_client-1.0.8}/src/mc5_api_client/client.py +406 -79
  9. mc5_api_client-1.0.8/src/mc5_api_client/simple_client.py +570 -0
  10. {mc5_api_client-1.0.5 → mc5_api_client-1.0.8}/src/mc5_api_client.egg-info/PKG-INFO +366 -40
  11. {mc5_api_client-1.0.5 → mc5_api_client-1.0.8}/src/mc5_api_client.egg-info/SOURCES.txt +3 -0
  12. {mc5_api_client-1.0.5 → mc5_api_client-1.0.8}/.gitignore +0 -0
  13. {mc5_api_client-1.0.5 → mc5_api_client-1.0.8}/LICENSE +0 -0
  14. {mc5_api_client-1.0.5 → mc5_api_client-1.0.8}/MANIFEST.in +0 -0
  15. {mc5_api_client-1.0.5 → mc5_api_client-1.0.8}/examples/advanced_features.py +0 -0
  16. {mc5_api_client-1.0.5 → mc5_api_client-1.0.8}/examples/basic_usage.py +0 -0
  17. {mc5_api_client-1.0.5 → mc5_api_client-1.0.8}/examples/clan_management.py +0 -0
  18. {mc5_api_client-1.0.5 → mc5_api_client-1.0.8}/examples/clan_management_complete.py +0 -0
  19. {mc5_api_client-1.0.5 → mc5_api_client-1.0.8}/examples/events_and_tasks.py +0 -0
  20. {mc5_api_client-1.0.5 → mc5_api_client-1.0.8}/examples/message_management.py +0 -0
  21. {mc5_api_client-1.0.5 → mc5_api_client-1.0.8}/examples/player_stats.py +0 -0
  22. {mc5_api_client-1.0.5 → mc5_api_client-1.0.8}/examples/private_messaging.py +0 -0
  23. {mc5_api_client-1.0.5 → mc5_api_client-1.0.8}/examples/squad_management.py +0 -0
  24. {mc5_api_client-1.0.5 → mc5_api_client-1.0.8}/examples/squad_wall_management.py +0 -0
  25. {mc5_api_client-1.0.5 → mc5_api_client-1.0.8}/pytest.ini +0 -0
  26. {mc5_api_client-1.0.5 → mc5_api_client-1.0.8}/requirements-dev.txt +0 -0
  27. {mc5_api_client-1.0.5 → mc5_api_client-1.0.8}/requirements.txt +0 -0
  28. {mc5_api_client-1.0.5 → mc5_api_client-1.0.8}/setup.cfg +0 -0
  29. {mc5_api_client-1.0.5 → mc5_api_client-1.0.8}/setup.py +0 -0
  30. {mc5_api_client-1.0.5 → mc5_api_client-1.0.8}/src/mc5_api_client/auth.py +0 -0
  31. {mc5_api_client-1.0.5 → mc5_api_client-1.0.8}/src/mc5_api_client/cli.py +0 -0
  32. {mc5_api_client-1.0.5 → mc5_api_client-1.0.8}/src/mc5_api_client/exceptions.py +0 -0
  33. {mc5_api_client-1.0.5 → mc5_api_client-1.0.8}/src/mc5_api_client/py.typed +0 -0
  34. {mc5_api_client-1.0.5 → mc5_api_client-1.0.8}/src/mc5_api_client.egg-info/dependency_links.txt +0 -0
  35. {mc5_api_client-1.0.5 → mc5_api_client-1.0.8}/src/mc5_api_client.egg-info/entry_points.txt +0 -0
  36. {mc5_api_client-1.0.5 → mc5_api_client-1.0.8}/src/mc5_api_client.egg-info/not-zip-safe +0 -0
  37. {mc5_api_client-1.0.5 → mc5_api_client-1.0.8}/src/mc5_api_client.egg-info/requires.txt +0 -0
  38. {mc5_api_client-1.0.5 → mc5_api_client-1.0.8}/src/mc5_api_client.egg-info/top_level.txt +0 -0
  39. {mc5_api_client-1.0.5 → mc5_api_client-1.0.8}/tests/__init__.py +0 -0
  40. {mc5_api_client-1.0.5 → mc5_api_client-1.0.8}/tests/test_auth.py +0 -0
  41. {mc5_api_client-1.0.5 → mc5_api_client-1.0.8}/tests/test_cli.py +0 -0
  42. {mc5_api_client-1.0.5 → mc5_api_client-1.0.8}/tests/test_client.py +0 -0
@@ -5,6 +5,136 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [1.0.8] - 2026-02-03
9
+
10
+ ### 🤖 Major Release - Advanced Automation & Loop-Based Operations
11
+
12
+ #### 🔄 Revolutionary Loop-Based Operations
13
+ - ✅ **Batch Search**: Search multiple players with automatic loops and conditional processing
14
+ - ✅ **Smart Clan Cleanup**: Intelligent member management with safety checks and conditional logic
15
+ - ✅ **Real-time Monitoring**: While loops for continuous clan activity tracking with alerts
16
+ - ✅ **Automated Workflows**: Complete automation sequences with decision-making capabilities
17
+ - ✅ **Conditional Processing**: Smart filtering based on player stats, level, and activity
18
+
19
+ #### 🧠 Advanced Conditional Logic System
20
+ - ✅ **Safety Checks**: Protect high-level members (configurable level thresholds)
21
+ - ✅ **Role Protection**: Safeguard leaders, admins, and officers from automated actions
22
+ - ✅ **Dynamic Decisions**: Make intelligent choices based on clan composition and statistics
23
+ - ✅ **Error Recovery**: Graceful handling of failures with continue/break logic
24
+ - ✅ **Smart Filtering**: Categorize members automatically (elite, active, veterans, newbies, inactive)
25
+
26
+ #### 📊 New Advanced Functions
27
+ - ✅ **batch_search_players()**: Search multiple dogtags with loop and conditional processing
28
+ - ✅ **clan_cleanup()**: Comprehensive clan analysis with intelligent recommendations
29
+ - ✅ **monitor_clan_activity()**: Real-time monitoring with while loops and conditional alerts
30
+ - ✅ **get_inactive_members()**: Identify inactive members with configurable criteria
31
+ - ✅ **auto_kick_inactive_members()**: Safe automated kicking with dry-run mode
32
+
33
+ #### 🎯 Advanced Use Cases Enabled
34
+ - ✅ **Elite Player Recruitment**: Batch search and filter for high-kill players
35
+ - ✅ **Clan Health Analysis**: Calculate health scores and provide recommendations
36
+ - ✅ **Activity Trend Monitoring**: Track clan activity patterns over time
37
+ - ✅ **Automated Member Management**: Smart categorization and processing
38
+ - ✅ **Performance Metrics**: Statistical analysis and reporting
39
+
40
+ #### 🔧 Technical Improvements
41
+ - ✅ **Enhanced Error Handling**: Robust try-catch blocks with graceful recovery
42
+ - ✅ **Memory Management**: Automatic cleanup and resource management
43
+ - ✅ **Performance Optimization**: Efficient batch processing and lazy loading
44
+ - ✅ **Safety Features**: Dry-run modes and protection mechanisms
45
+ - ✅ **Documentation**: Complete examples and advanced usage guides
46
+
47
+ #### 📚 Comprehensive Documentation
48
+ - ✅ **Advanced Examples**: Complete automation examples with loops and conditionals
49
+ - ✅ **Use Case Scenarios**: Real-world applications for clan management
50
+ - ✅ **Safety Guidelines**: Best practices for automated operations
51
+ - ✅ **Technical Reference**: Detailed function documentation
52
+
53
+ #### 🎮 Real-World Automation Examples
54
+ ```python
55
+ # Batch search with conditional logic
56
+ results = batch_search_players(['f55f', '9gg9', '218f'], username, password)
57
+ for player in results['found']:
58
+ if player['kills'] > 10000:
59
+ print(f"🌟 Elite: {player['dogtag']} - {player['kills']:,} kills")
60
+
61
+ # Smart clan cleanup with safety
62
+ results = clan_cleanup(username, password, inactive_days=30, min_level=15, dry_run=True)
63
+ if results['would_kick'] > 0:
64
+ print("⚠️ Consider removing inactive members")
65
+
66
+ # Real-time monitoring with while loops
67
+ monitor_clan_activity(username, password, check_interval=60, max_checks=10)
68
+ ```
69
+
70
+ #### 🛡️ Safety & Protection Features
71
+ - ✅ **Dry Run Mode**: Test operations without executing actual changes
72
+ - ✅ **Level Thresholds**: Configurable minimum level protection
73
+ - ✅ **Role Protection**: Automatic safeguarding of important clan roles
74
+ - ✅ **Conditional Logic**: Smart decision-making to prevent mistakes
75
+ - ✅ **Error Boundaries**: Isolated failure handling for individual operations
76
+
77
+ ---
78
+
79
+ ### 🎮 Major Release - User-Friendly Interface for Non-Developers
80
+
81
+ #### 🌟 SimpleMC5Client - Revolutionary Easy Interface
82
+ - ✅ **New SimpleMC5Client**: Designed specifically for non-developers
83
+ - ✅ **Auto-Clan Detection**: Automatically finds clan ID from user profile
84
+ - ✅ **Simplified Method Names**: `search_player()` instead of `get_player_stats_by_dogtag()`
85
+ - ✅ **One-Liner Functions**: `quick_search()` and `quick_kick()` for instant results
86
+ - ✅ **Context Manager Support**: Automatic cleanup with `with` statements
87
+ - ✅ **Lazy Authentication**: Only connects when needed, not on initialization
88
+ - ✅ **User-Friendly Error Messages**: Clear, helpful explanations for beginners
89
+
90
+ #### 📚 Comprehensive Documentation for Beginners
91
+ - ✅ **User Friendly Guide**: Complete beginner's guide with step-by-step instructions
92
+ - ✅ **Simple Usage Examples**: Copy-paste ready code for common tasks
93
+ - ✅ **Syntax Comparison Table**: Simple vs Advanced methods side-by-side
94
+ - ✅ **FAQ Section**: Common questions and answers for non-developers
95
+ - ✅ **Real-World Examples**: Clan management, player search, messaging
96
+
97
+ #### 🎯 Perfect for Non-Technical Users
98
+ - ✅ **Clan Leaders**: Easy member management without technical knowledge
99
+ - ✅ **Players**: Quick stats lookup with just a dogtag
100
+ - ✅ **Beginners**: No programming experience required
101
+ - ✅ **Quick Tasks**: One-liner functions for common operations
102
+
103
+ #### 📊 Simple vs Advanced Comparison
104
+ | Task | Simple Version | Advanced Version |
105
+ |------|----------------|------------------|
106
+ | Search Player | `client.search_player('f55f')` | `client.get_player_stats_by_dogtag('f55f')` |
107
+ | Get Clan Members | `client.get_clan_members()` | `client.get_clan_members(clan_id)` |
108
+ | Kick Member | `client.kick_member('9gg9')` | `client.kick_clan_member_by_dogtag('9gg9', clan_id)` |
109
+ | Connect | `client.connect()` | Manual authentication |
110
+
111
+ #### 🔧 Technical Improvements
112
+ - ✅ **Backward Compatibility**: All existing advanced features still available
113
+ - ✅ **Graceful Error Handling**: User-friendly error messages
114
+ - ✅ **Memory Management**: Automatic connection cleanup
115
+ - ✅ **Import Updates**: SimpleMC5Client added to main package exports
116
+
117
+ #### 🎮 Real-World Usage Examples
118
+ ```python
119
+ # Super simple - just 3 lines!
120
+ from mc5_api_client import SimpleMC5Client
121
+ client = SimpleMC5Client('YOUR_USERNAME', 'YOUR_PASSWORD')
122
+ client.connect()
123
+ player = client.search_player('f55f')
124
+
125
+ # One-liner search
126
+ from mc5_api_client import quick_search
127
+ player = quick_search('218f', 'YOUR_USERNAME', 'YOUR_PASSWORD')
128
+
129
+ # Easy clan management
130
+ with SimpleMC5Client('YOUR_USERNAME', 'YOUR_PASSWORD') as client:
131
+ client.connect() # Auto-finds your clan!
132
+ members = client.get_clan_members()
133
+ client.kick_member('9gg9', 'Inactive for 30 days')
134
+ ```
135
+
136
+ ---
137
+
8
138
  ## [1.0.5] - 2026-02-03
9
139
 
10
140
  ### 🔧 Critical Bug Fix
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.4
2
2
  Name: mc5_api_client
3
- Version: 1.0.5
3
+ Version: 1.0.8
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
@@ -28,9 +28,6 @@ License: MIT License
28
28
  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
29
29
  SOFTWARE.
30
30
 
31
- Project-URL: Documentation, https://mc5-api-client.readthedocs.io/
32
- Project-URL: Source, https://pypi.org/project/mc5-api-client/
33
- Project-URL: Tracker, https://pypi.org/project/mc5-api-client/
34
31
  Keywords: modern combat 5,mc5,gameloft,api,client,gaming,authentication,clan,messaging
35
32
  Classifier: Development Status :: 5 - Production/Stable
36
33
  Classifier: Intended Audience :: Developers
@@ -51,11 +48,33 @@ Classifier: Topic :: Software Development :: Libraries :: Python Modules
51
48
  Classifier: Typing :: Typed
52
49
  Requires-Python: >=3.8
53
50
  Description-Content-Type: text/markdown
51
+ License-File: LICENSE
52
+ Requires-Dist: requests>=2.28.0
53
+ Requires-Dist: urllib3>=1.26.0
54
54
  Provides-Extra: cli
55
+ Requires-Dist: rich>=13.0.0; extra == "cli"
56
+ Requires-Dist: colorama>=0.4.4; extra == "cli"
55
57
  Provides-Extra: dev
58
+ Requires-Dist: pytest>=7.0.0; extra == "dev"
59
+ Requires-Dist: pytest-cov>=4.0.0; extra == "dev"
60
+ Requires-Dist: pytest-mock>=3.10.0; extra == "dev"
61
+ Requires-Dist: black>=22.0.0; extra == "dev"
62
+ Requires-Dist: isort>=5.10.0; extra == "dev"
63
+ Requires-Dist: mypy>=1.0.0; extra == "dev"
64
+ Requires-Dist: flake8>=5.0.0; extra == "dev"
65
+ Requires-Dist: pre-commit>=2.20.0; extra == "dev"
66
+ Requires-Dist: build>=0.8.0; extra == "dev"
67
+ Requires-Dist: twine>=4.0.0; extra == "dev"
56
68
  Provides-Extra: docs
69
+ Requires-Dist: sphinx>=5.0.0; extra == "docs"
70
+ Requires-Dist: sphinx-rtd-theme>=1.2.0; extra == "docs"
71
+ Requires-Dist: myst-parser>=0.18.0; extra == "docs"
57
72
  Provides-Extra: all
58
- License-File: LICENSE
73
+ Requires-Dist: mc5-api-client[cli,dev,docs]; extra == "all"
74
+ Dynamic: author
75
+ Dynamic: home-page
76
+ Dynamic: license-file
77
+ Dynamic: requires-python
59
78
 
60
79
  # 🎮 Modern Combat 5 API Client
61
80
 
@@ -83,16 +102,178 @@ Think of this as your remote control for Modern Combat 5! Here's what you can do
83
102
  - 🖥️ **Modern CLI**: A beautiful command-line tool with colors and emojis
84
103
  - 🔄 **Auto-Refresh**: Tokens refresh automatically - no interruptions!
85
104
  - 🛡️ **Error Handling**: Get helpful error messages when things go wrong
105
+ - 🎮 **NEW: Simple Interface**: Perfect for non-developers with auto-clan detection!
106
+ - ⚡ **NEW: One-Liner Functions**: Quick search and kick operations!
107
+ - 🎯 **NEW: User-Friendly**: Designed for beginners and clan leaders!
86
108
 
87
109
  ## � Installation & Publishing
88
110
 
89
- ### 🚀 Install from PyPI
111
+ ### 🎉 MC5 API Client v1.0.7 - Revolutionary User-Friendly Interface!
112
+
113
+ ### ✅ **Major Enhancements Completed!**
114
+
115
+ **� Revolutionary Simple Interface (NEW in v1.0.7):**
116
+ - ✅ **SimpleMC5Client**: Designed specifically for non-developers
117
+ - ✅ **Auto-Clan Detection**: Automatically finds clan ID from your profile
118
+ - ✅ **One-Liner Functions**: `quick_search()` and `quick_kick()` for instant results
119
+ - ✅ **Simplified Method Names**: `search_player()` instead of complex technical names
120
+ - ✅ **Context Manager Support**: Automatic cleanup with `with` statements
121
+ - ✅ **User-Friendly Documentation**: Complete beginner's guide with examples
122
+ - ✅ **No Technical Knowledge Required**: Perfect for clan leaders and players
123
+
124
+ **� Complete Clan Management Suite:**
125
+ - ✅ **Profile Management**: Get/update player profiles with groups and credentials
126
+ - ✅ **Clan Operations**: Get clan info, members, settings with full CRUD operations
127
+ - ✅ **Member Management**: Invite, kick, promote, demote members with detailed stats
128
+ - ✅ **Dogtag Kicking**: Kick members by 4-8 character dogtags with automatic conversion
129
+ - ✅ **Settings Control**: Complete clan customization (name, logo, colors, limits)
130
+ - ✅ **Real-time Data**: Live member status, XP, scores, and online presence
131
+
132
+ **🎯 Enhanced Dogtag System:**
133
+ - ✅ **4-8 Character Support**: Flexible dogtag lengths (f55f, 12345678, abcdefgh)
134
+ - ✅ **Smart Conversion**: Automatic dogtag ↔ alias conversion with wraparound
135
+ - ✅ **Player Search**: Find players by dogtag with complete statistics
136
+ - ✅ **Error Handling**: Graceful handling of non-existent dogtags
137
+ - ✅ **Real Examples**: Working with actual MC5 player data
138
+
139
+ **📊 Verified Working Features:**
140
+ - ✅ **Your Profile**: RxZ Saitama with clan "4"5""5"5"224"
141
+ - ✅ **Dogtag Conversion**: f55f → d33d, 9gg9 → 7ee7, 78d7 → 56b5, 218f → 096d
142
+ - ✅ **Player Lookup**: f55f (17,015 kills), 9gg9 (80 kills), 78d7 (14,648 kills), 218f (636,223 kills)
143
+ - ✅ **Clan Data**: Real member stats, XP, scores, online status
144
+ - ✅ **API Integration**: All endpoints working with proper authentication
145
+ - ✅ **Elite Player Access**: Successfully retrieved stats for high-kill players (636K+ kills)
90
146
 
91
147
  ```bash
92
148
  pip install mc5_api_client
93
149
  ```
94
150
 
95
- ✅ **Published and Available!** The MC5 API Client is now live on PyPI and ready for worldwide use!
151
+ ✅ **Published and Available!** The MC5 API Client v1.0.7 is now live on PyPI with revolutionary user-friendly features for non-developers!
152
+
153
+ ## 🎮 **Simple Usage for Non-Developers**
154
+
155
+ New in v1.0.7! We've added a revolutionary super-simple interface for non-developers:
156
+
157
+ ### **🚀 Quick Start - Just 3 Lines!**
158
+
159
+ ```python
160
+ from mc5_api_client import SimpleMC5Client
161
+
162
+ # Connect and auto-detect your clan
163
+ client = SimpleMC5Client('YOUR_USERNAME', 'YOUR_PASSWORD')
164
+ client.connect()
165
+
166
+ # Search for any player by dogtag
167
+ player = client.search_player('f55f')
168
+ print(f"Found: {player['kills']:,} kills")
169
+ ```
170
+
171
+ ### **🎯 Super Simple Examples:**
172
+
173
+ **Search Players:**
174
+ ```python
175
+ # One-line search
176
+ from mc5_api_client import quick_search
177
+ player = quick_search('218f', 'YOUR_USERNAME', 'YOUR_PASSWORD')
178
+ print(f"Elite player: {player['kills']:,} kills!")
179
+ ```
180
+
181
+ **Batch Search with Loop:**
182
+ ```python
183
+ from mc5_api_client.simple_client import batch_search_players
184
+
185
+ dogtags = ['f55f', '9gg9', '78d7', '218f']
186
+ results = batch_search_players(dogtags, 'YOUR_USERNAME', 'YOUR_PASSWORD')
187
+
188
+ # Conditional processing
189
+ for player in results['found']:
190
+ if player['kills'] > 10000:
191
+ print(f"🌟 Elite: {player['dogtag']} - {player['kills']:,} kills")
192
+ else:
193
+ print(f"👤 Player: {player['dogtag']} - {player['kills']:,} kills")
194
+ ```
195
+
196
+ **Smart Clan Cleanup:**
197
+ ```python
198
+ from mc5_api_client.simple_client import clan_cleanup
199
+
200
+ # Intelligent cleanup with conditional logic
201
+ results = clan_cleanup(
202
+ 'YOUR_USERNAME', 'YOUR_PASSWORD',
203
+ inactive_days=30,
204
+ min_level=15, # Protect high-level players
205
+ dry_run=True # Simulation only
206
+ )
207
+
208
+ print(f"Would kick: {results['would_kick']} members")
209
+ print(f"Protected: {results['protected']} members")
210
+
211
+ if results['would_kick'] > 0:
212
+ print("⚠️ Consider removing inactive members")
213
+ ```
214
+
215
+ **Real-time Monitoring:**
216
+ ```python
217
+ from mc5_api_client.simple_client import monitor_clan_activity
218
+
219
+ # Monitor clan activity every 60 seconds for 10 checks
220
+ monitor_clan_activity(
221
+ 'YOUR_USERNAME', 'YOUR_PASSWORD',
222
+ check_interval=60,
223
+ max_checks=10
224
+ )
225
+ ```
226
+
227
+ **Clan Management:**
228
+ ```python
229
+ with SimpleMC5Client('YOUR_USERNAME', 'YOUR_PASSWORD') as client:
230
+ client.connect() # Auto-detects your clan!
231
+
232
+ # Get all clan members
233
+ members = client.get_clan_members()
234
+ print(f"Your clan has {len(members)} members")
235
+
236
+ # Kick by dogtag (no clan ID needed!)
237
+ client.kick_member('9gg9', 'Inactive for 30 days')
238
+
239
+ # Update clan settings
240
+ client.update_clan_settings(name="Elite Squad 2026")
241
+ ```
242
+
243
+ **Send Messages:**
244
+ ```python
245
+ with SimpleMC5Client('YOUR_USERNAME', 'YOUR_PASSWORD') as client:
246
+ client.connect()
247
+
248
+ # Send message to any player by dogtag
249
+ client.send_message('f55f', 'Want to play together?')
250
+ ```
251
+
252
+ ### **✨ Key Benefits for Non-Developers:**
253
+
254
+ - ✅ **No Clan ID Needed**: Auto-detects your clan from your profile
255
+ - ✅ **Simple Method Names**: `search_player()` instead of `get_player_stats_by_dogtag()`
256
+ - ✅ **Auto-Connection**: Just call `connect()` once
257
+ - ✅ **Clear Error Messages**: User-friendly error descriptions
258
+ - ✅ **Context Manager**: Automatic cleanup with `with` statement
259
+ - ✅ **Quick Functions**: One-liners for common tasks
260
+
261
+ ### **📚 Simple vs Advanced Comparison:**
262
+
263
+ | Task | Simple Version | Advanced Version |
264
+ |------|----------------|------------------|
265
+ | Search Player | `client.search_player('f55f')` | `client.get_player_stats_by_dogtag('f55f')` |
266
+ | Get Clan Members | `client.get_clan_members()` | `client.get_clan_members(clan_id)` |
267
+ | Kick Member | `client.kick_member('9gg9')` | `client.kick_clan_member_by_dogtag('9gg9', clan_id)` |
268
+ | Connect | `client.connect()` | Manual authentication |
269
+
270
+ ### **🎯 Perfect For:**
271
+ - **Clan Leaders**: Easy member management
272
+ - **Players**: Quick stats lookup
273
+ - **Beginners**: No programming experience needed
274
+ - **Quick Tasks**: One-liner functions
275
+
276
+ ---
96
277
 
97
278
  ### 📦 Install from Local Package
98
279
 
@@ -188,9 +369,37 @@ except:
188
369
 
189
370
  ### 🏰 Complete Clan Management
190
371
 
191
- If you run a clan, you can manage it programmatically with 20+ methods:
372
+ If you run a clan, you can manage it programmatically with comprehensive features:
192
373
 
193
374
  ```python
375
+ # Get your profile and clan info
376
+ profile = client.get_profile()
377
+ clan_id = profile['groups'][0] # Your clan ID
378
+
379
+ # Get clan members
380
+ members = client.get_clan_members(clan_id)
381
+ for member in members:
382
+ print(f"{member['name']} - XP: {member['_xp']} - Status: {member['status']}")
383
+
384
+ # Update clan settings
385
+ client.update_clan_settings(
386
+ clan_id=clan_id,
387
+ name="Elite Squad",
388
+ description="Best clan ever!",
389
+ member_limit="50",
390
+ logo="1",
391
+ logo_primary_color="12722475",
392
+ membership="owner_approved"
393
+ )
394
+
395
+ # Kick member by dogtag
396
+ result = client.kick_clan_member_by_dogtag(
397
+ dogtag="9gg9",
398
+ clan_id=clan_id,
399
+ from_name="CLAN_ADMIN",
400
+ kill_sign_name="default_killsig_42"
401
+ )
402
+
194
403
  # Search for clans
195
404
  clans = client.search_clans("Elite", limit=10)
196
405
  for clan in clans:
@@ -209,12 +418,6 @@ clan_id = new_clan.get('id')
209
418
  clan_info = client.get_clan_settings(clan_id)
210
419
  print(f"Clan: {clan_info['name']}")
211
420
 
212
- # Update clan settings
213
- client.update_clan_settings(clan_id, {
214
- "description": "Welcome to our awesome squad!",
215
- "membership_type": "invite_only"
216
- })
217
-
218
421
  # Manage members
219
422
  members = client.get_clan_members(clan_id)
220
423
  print(f"Found {len(members)} members")
@@ -903,20 +1106,24 @@ The library comes with comprehensive examples to get you started:
903
1106
  - ✅ Update profile information
904
1107
  - ✅ Profile statistics
905
1108
 
906
- ### 🏰 Clan Management (20+ Methods)
1109
+ ### 🏰 Clan Management & Profile Operations (15+ Methods)
1110
+ - ✅ Get user profile with groups and credentials
1111
+ - ✅ Update player profile (name, groups, games data)
1112
+ - ✅ Get clan information and settings
1113
+ - ✅ Get clan members with detailed stats
1114
+ - ✅ Update clan settings (name, description, logo, colors, limits)
907
1115
  - ✅ Search for clans
908
1116
  - ✅ Create new clans
909
- - ✅ Get clan information
910
- - ✅ Update clan settings
911
- - ✅ Manage clan members
912
- - ✅ Invite/kick members
913
- - ✅ Promote/demote members
914
- - ✅ Handle applications
1117
+ - ✅ Manage clan members (invite, kick, promote, demote)
1118
+ - ✅ Handle clan applications
915
1119
  - ✅ Join/leave clans
916
- - ✅ Get clan statistics
917
- - ✅ Internal leaderboards
918
- - ✅ Transfer ownership
1120
+ - ✅ Get clan statistics and leaderboards
1121
+ - ✅ Transfer clan ownership
919
1122
  - ✅ Disband clans
1123
+ - ✅ Kick members by dogtag (4-8 characters)
1124
+ - ✅ Kick members by credential/fed_id
1125
+ - ✅ Customizable kick messages and kill signs
1126
+ - ✅ Real-time member status monitoring
920
1127
 
921
1128
  ### 👥 Squad/Group Management (10+ Methods)
922
1129
  - ✅ Get squad members with stats
@@ -949,29 +1156,148 @@ The library comes with comprehensive examples to get you started:
949
1156
  - ✅ Support for cross-platform data transfer
950
1157
  - ✅ Account verification and validation
951
1158
 
952
- ### 📊 Player Statistics & Batch Profiles
1159
+ ### 🎯 Enhanced Player Search & Dogtag System
953
1160
 
954
- Get detailed player statistics using dogtags (in-game IDs) or credentials:
1161
+ Search players using their in-game dogtags (4-8 characters) with automatic conversion:
955
1162
 
956
1163
  ```python
957
- # Search player by their in-game dogtag
1164
+ # Search player by their in-game dogtag (4-8 characters supported)
958
1165
  player_stats = client.get_player_stats_by_dogtag("f55f")
959
- print(f"Player found: {player_stats.get('player_info', {}).get('account', 'Unknown')}")
960
-
961
- # Parse and analyze statistics
962
- parsed = client.parse_player_stats(player_stats)
963
- print(f"Rating: {parsed.get('rating', 0)}")
964
- print(f"K/D Ratio: {parsed.get('overall_stats', {}).get('total_kills', 0) / max(parsed.get('overall_stats', {}).get('total_deaths', 1), 1):.2f}")
1166
+ if 'error' not in player_stats:
1167
+ player_credential = list(player_stats.keys())[0]
1168
+ player_data = player_stats[player_credential]
1169
+ print(f"Player found: {player_data.get('player_info', {}).get('account', 'Unknown')}")
1170
+
1171
+ # Parse and analyze statistics
1172
+ parsed = client.parse_player_stats(player_stats)
1173
+ overall = parsed.get('overall_stats', {})
1174
+ print(f"Rating: {parsed.get('rating', 0)}")
1175
+ print(f"Total Kills: {overall.get('total_kills', 0):,}")
1176
+ print(f"K/D Ratio: {overall.get('kd_ratio', 0):.2f}")
1177
+ print(f"Headshot %: {overall.get('headshot_percentage', 0):.1f}%")
1178
+ else:
1179
+ print(f"Player not found: {player_stats['error']}")
1180
+
1181
+ # Test different dogtag formats
1182
+ test_dogtags = ["f55f", "1234", "5678", "12345678", "abcdefgh", "9gg9"]
1183
+
1184
+ for dogtag in test_dogtags:
1185
+ try:
1186
+ # Convert dogtag to alias
1187
+ alias = client.convert_dogtag_to_alias(dogtag)
1188
+ print(f"Dogtag: {dogtag} → Alias: {alias}")
1189
+
1190
+ # Convert back to verify
1191
+ back_to_dogtag = client.convert_alias_to_dogtag(alias)
1192
+ print(f"Alias: {alias} → Dogtag: {back_to_dogtag}")
1193
+
1194
+ # Search for player
1195
+ player = client.get_player_stats_by_dogtag(dogtag)
1196
+ if 'error' not in player:
1197
+ parsed = client.parse_player_stats(player)
1198
+ kills = parsed.get('overall_stats', {}).get('total_kills', 0)
1199
+ print(f"✅ Found: {kills:,} kills")
1200
+ else:
1201
+ print(f"❌ Not found")
1202
+
1203
+ except Exception as e:
1204
+ print(f"❌ Error with {dogtag}: {e}")
965
1205
 
966
1206
  # Get detailed stats for multiple players
967
1207
  credentials = ["player1_cred", "player2_cred", "player3_cred"]
968
1208
  batch_stats = client.get_batch_profiles(credentials)
969
1209
 
970
- # Search players using dogtags
971
- for dogtag in ["f55f", "ff11", "g6765"]:
972
- player = client.search_player_by_dogtag(dogtag)
973
- if 'error' not in player:
974
- print(f"Found: {player.get('player_info', {}).get('account')}")
1210
+ # Parse multiple players at once
1211
+ for credential, stats in batch_stats.items():
1212
+ parsed = client.parse_player_stats({credential: stats})
1213
+ print(f"Player: {parsed.get('rating', 0)} rating")
1214
+ ```
1215
+
1216
+ ### 🔨 Advanced Clan Member Management
1217
+
1218
+ Complete clan management with dogtag-based member operations:
1219
+
1220
+ ```python
1221
+ # Complete clan management workflow
1222
+ from mc5_api_client import MC5Client
1223
+
1224
+ client = MC5Client('YOUR_USERNAME', 'YOUR_PASSWORD')
1225
+
1226
+ # Get your profile and clan info
1227
+ profile = client.get_profile()
1228
+ clan_id = profile['groups'][0] # Your clan ID
1229
+
1230
+ # Get clan members with detailed stats
1231
+ members = client.get_clan_members(clan_id)
1232
+ print(f"Found {len(members)} members:")
1233
+
1234
+ for member in members:
1235
+ print(f" {member['name']}")
1236
+ print(f" Status: {member.get('status', 'Unknown')}")
1237
+ print(f" XP: {member.get('_xp', 'Unknown')}")
1238
+ print(f" Score: {member.get('_score', 'Unknown')}")
1239
+ print(f" Kill Sign: {member.get('_killsig_id', 'Unknown')}")
1240
+ print(f" Online: {'🟢' if member.get('online') else '🔴'}")
1241
+
1242
+ # Update clan settings with all options
1243
+ client.update_clan_settings(
1244
+ clan_id=clan_id,
1245
+ name="Elite Squad",
1246
+ description="Best clan ever!",
1247
+ rating="3573",
1248
+ score="5200",
1249
+ member_limit="300",
1250
+ membership="owner_approved", # open, owner_approved, member_approved, closed
1251
+ logo="1",
1252
+ logo_primary_color="12722475", # 0-16777215
1253
+ logo_secondary_color="16777215", # 0-16777215
1254
+ min_join_value="996699",
1255
+ xp="9999", # Max 10000
1256
+ currency="10000",
1257
+ killsig_id="default_killsig_01",
1258
+ active_clan_label="true",
1259
+ active_member_count="2",
1260
+ active_clan_threshold="50"
1261
+ )
1262
+
1263
+ # Kick member by dogtag (4-8 characters)
1264
+ result = client.kick_clan_member_by_dogtag(
1265
+ dogtag="9gg9",
1266
+ clan_id=clan_id,
1267
+ from_name="CLAN_ADMIN",
1268
+ kill_sign_name="default_killsig_42",
1269
+ kill_sign_color="-974646126"
1270
+ )
1271
+
1272
+ if 'error' in result:
1273
+ print(f"Kick failed: {result['error']}")
1274
+ else:
1275
+ print(f"Kick successful: {result}")
1276
+
1277
+ # Kick member directly using credential
1278
+ result = client.kick_clan_member(
1279
+ target_fed_id="anonymous:player_credential",
1280
+ clan_id=clan_id,
1281
+ from_name="SQUAD_LEADER",
1282
+ kill_sign_name="default_killsig_80",
1283
+ kill_sign_color="-123456789"
1284
+ )
1285
+
1286
+ # Get clan information
1287
+ clan_info = client.get_clan_info(clan_id)
1288
+ print(f"Clan: {clan_info.get('name', 'Unknown')}")
1289
+ print(f"Description: {clan_info.get('description', 'Unknown')}")
1290
+ print(f"Rating: {clan_info.get('_rating', 'Unknown')}")
1291
+ print(f"Member Count: {clan_info.get('member_count', 'Unknown')}")
1292
+
1293
+ # Update your own profile
1294
+ client.update_profile(
1295
+ name="Elite Player",
1296
+ groups=clan_id, # Update clan membership
1297
+ games='{"1875": {"last_time_played": 1758644983}}'
1298
+ )
1299
+
1300
+ client.close()
975
1301
  ```
976
1302
 
977
1303
  ### 📊 Player Statistics & Batch Profiles (6+ Methods)