mc5-api-client 1.0.13__py3-none-any.whl → 1.0.15__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.
@@ -15,7 +15,7 @@ messaging, and more.
15
15
 
16
16
  from typing import Optional, Dict, Any
17
17
 
18
- __version__ = "1.0.13"
18
+ __version__ = "1.0.15"
19
19
  __author__ = "Chizoba"
20
20
  __email__ = "chizoba2026@hotmail.com"
21
21
  __license__ = "MIT"
mc5_api_client/cli.py CHANGED
@@ -447,7 +447,7 @@ class MC5CLI:
447
447
 
448
448
  def _print_version(self):
449
449
  """Print version information."""
450
- self._print("MC5 API Client v1.0.13", "cyan")
450
+ self._print("MC5 API Client v1.0.15", "cyan")
451
451
  self._print("The ultimate Modern Combat 5 API library", "green")
452
452
  self._print("Author: Chizoba", "blue")
453
453
  self._print("Email: chizoba2026@hotmail.com", "blue")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: mc5_api_client
3
- Version: 1.0.13
3
+ Version: 1.0.15
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
@@ -188,9 +188,12 @@ result = quick_update_player_score(
188
188
  )
189
189
 
190
190
  if result.get('success'):
191
- print("✅ Player score updated successfully!")
192
- print(f"New score: {result.get('score')}")
193
- print(f"New XP: {result.get('xp')}")
191
+ print(f"✅ Player score updated successfully!")
192
+ print(f"New score: {result.get('score_updated')}")
193
+ if result.get('xp_updated'):
194
+ print(f"New XP: {result.get('xp_updated')}")
195
+ else:
196
+ print(f"❌ Error: {result.get('error', 'Unknown error')}")
194
197
  ```
195
198
 
196
199
  ### **� Admin Client Usage:**
@@ -229,130 +232,169 @@ client.close()
229
232
  ### **🔧 How It Actually Works:**
230
233
  Admin privileges allow you to modify individual player data within a squad, which indirectly affects the squad's overall rating through the sum of member scores, but you cannot directly set the squad's rating value.
231
234
 
232
- ## 🎮 **Simple Usage for Non-Developers**
233
-
234
- New in v1.0.7! We've added a revolutionary super-simple interface for non-developers:
235
+ ## **Quick Start - What Most Users Want**
235
236
 
236
- ### **🚀 Quick Start - Just 3 Lines!**
237
+ ### **🚀 Everyday MC5 Tasks (3 Lines)**
237
238
 
238
239
  ```python
239
240
  from mc5_api_client import SimpleMC5Client
240
241
 
241
- # Connect and auto-detect your clan
242
+ # Connect and check your daily tasks
242
243
  client = SimpleMC5Client('YOUR_USERNAME', 'YOUR_PASSWORD')
243
244
  client.connect()
244
245
 
245
- # Search for any player by dogtag
246
- player = client.search_player('f55f')
247
- print(f"Found: {player['kills']:,} kills")
246
+ # Check your profile
247
+ profile = client.client.get_profile()
248
+ print(f"Level: {profile['level']}, Score: {profile['score']:,}")
248
249
  ```
249
250
 
250
- ### **🎯 Super Simple Examples:**
251
+ ### **� Search Players Instantly**
251
252
 
252
- **Search Players:**
253
253
  ```python
254
- # One-line search
254
+ # One-line player search
255
255
  from mc5_api_client import quick_search
256
- player = quick_search('218f', 'YOUR_USERNAME', 'YOUR_PASSWORD')
256
+ player = quick_search('f55f', 'YOUR_USERNAME', 'YOUR_PASSWORD')
257
257
  print(f"Elite player: {player['kills']:,} kills!")
258
258
  ```
259
259
 
260
- **Batch Search with Loop:**
260
+ ### **🛡️ Admin Score Updates (Working Example)**
261
+
261
262
  ```python
262
- from mc5_api_client.simple_client import batch_search_players
263
+ from mc5_api_client import quick_update_player_score
263
264
 
264
- dogtags = ['f55f', '9gg9', '78d7', '218f']
265
- results = batch_search_players(dogtags, 'YOUR_USERNAME', 'YOUR_PASSWORD')
265
+ # Add 5200 rating to squad by updating player score
266
+ result = quick_update_player_score(
267
+ target_user_id="anonymous:d2luOF92M18xNzcwMDUxNjkwXy7H33aeTVB4YZictyDq48c=",
268
+ score=5200,
269
+ xp=2037745,
270
+ killsig_color="-974646126",
271
+ killsig_id="default_killsig_80"
272
+ )
266
273
 
267
- # Conditional processing
268
- for player in results['found']:
269
- if player['kills'] > 10000:
270
- print(f"🌟 Elite: {player['dogtag']} - {player['kills']:,} kills")
271
- else:
272
- print(f"👤 Player: {player['dogtag']} - {player['kills']:,} kills")
274
+ if result.get('success'):
275
+ print(f"✅ Score updated: {result.get('score_updated')}")
276
+ else:
277
+ print(f" Error: {result.get('error', 'Unknown error')}")
273
278
  ```
274
279
 
275
- **Smart Clan Cleanup:**
276
- ```python
277
- from mc5_api_client.simple_client import clan_cleanup
278
-
279
- # Intelligent cleanup with conditional logic
280
- results = clan_cleanup(
281
- 'YOUR_USERNAME', 'YOUR_PASSWORD',
282
- inactive_days=30,
283
- min_level=15, # Protect high-level players
284
- dry_run=True # Simulation only
285
- )
280
+ ## � **Examples Folder - Ready-to-Use Scripts**
286
281
 
287
- print(f"Would kick: {results['would_kick']} members")
288
- print(f"Protected: {results['protected']} members")
282
+ New in v1.0.14! We've created practical, ready-to-use scripts for common MC5 tasks:
289
283
 
290
- if results['would_kick'] > 0:
291
- print("⚠️ Consider removing inactive members")
284
+ ### **🎮 Everyday MC5 Tasks**
285
+
286
+ File: `examples/everyday_mc5.py`
287
+ - ✅ Check daily tasks and rewards
288
+ - ✅ Search players by dogtag
289
+ - ✅ Manage clan members
290
+ - ✅ Send messages to friends
291
+ - ✅ Check profile stats
292
+ - ✅ Interactive and user-friendly
293
+
294
+ **Usage:**
295
+ ```bash
296
+ python examples/everyday_mc5.py
292
297
  ```
293
298
 
294
- **Real-time Monitoring:**
295
- ```python
296
- from mc5_api_client.simple_client import monitor_clan_activity
299
+ ### **🛡️ Admin Tools**
297
300
 
298
- # Monitor clan activity every 60 seconds for 10 checks
299
- monitor_clan_activity(
300
- 'YOUR_USERNAME', 'YOUR_PASSWORD',
301
- check_interval=60,
302
- max_checks=10
303
- )
301
+ File: `examples/admin_tools.py`
302
+ - ✅ Update player scores (add rating)
303
+ - ✅ Manage squad members
304
+ - ✅ Kick members with confirmation
305
+ - ✅ Handle clan requests
306
+ - ✅ Safe admin operations
307
+
308
+ **Usage:**
309
+ ```bash
310
+ python examples/admin_tools.py
304
311
  ```
305
312
 
306
- **Clan Management:**
307
- ```python
308
- with SimpleMC5Client('YOUR_USERNAME', 'YOUR_PASSWORD') as client:
309
- client.connect() # Auto-detects your clan!
310
-
311
- # Get all clan members
312
- members = client.get_clan_members()
313
- print(f"Your clan has {len(members)} members")
314
-
315
- # Kick by dogtag (no clan ID needed!)
316
- client.kick_member('9gg9', 'Inactive for 30 days')
317
-
318
- # Update clan settings
319
- client.update_clan_settings(name="Elite Squad 2026")
313
+ ### **⚡ Quick Reference**
314
+
315
+ File: `examples/quick_reference.py`
316
+ - ✅ Copy-paste ready examples
317
+ - ✅ All common operations
318
+ - Error handling patterns
319
+ - Batch operations
320
+ - One-liner functions
321
+
322
+ **Usage:**
323
+ ```bash
324
+ python examples/quick_reference.py
320
325
  ```
321
326
 
322
- **Send Messages:**
323
- ```python
324
- with SimpleMC5Client('YOUR_USERNAME', 'YOUR_PASSWORD') as client:
325
- client.connect()
326
-
327
- # Send message to any player by dogtag
328
- client.send_message('f55f', 'Want to play together?')
327
+ ### **📧 Message Management**
328
+
329
+ File: `examples/message_management.py`
330
+ - ✅ Get inbox messages
331
+ - ✅ Delete single/multiple messages
332
+ - Clear entire inbox
333
+ - Send private messages
334
+ - ✅ Squad wall communication
335
+
336
+ **Usage:**
337
+ ```bash
338
+ python examples/message_management.py
329
339
  ```
330
340
 
331
- ### **✨ Key Benefits for Non-Developers:**
341
+ ### **🏰 Clan Management**
332
342
 
333
- - ✅ **No Clan ID Needed**: Auto-detects your clan from your profile
334
- - ✅ **Simple Method Names**: `search_player()` instead of `get_player_stats_by_dogtag()`
335
- - ✅ **Auto-Connection**: Just call `connect()` once
336
- - ✅ **Clear Error Messages**: User-friendly error descriptions
337
- - ✅ **Context Manager**: Automatic cleanup with `with` statement
338
- - ✅ **Quick Functions**: One-liners for common tasks
343
+ File: `examples/clan_management.py`
344
+ - ✅ Create and manage clans
345
+ - ✅ Invite and kick members
346
+ - ✅ Update clan settings
347
+ - ✅ Handle applications
348
+ - ✅ Clan statistics
339
349
 
340
- ### **📚 Simple vs Advanced Comparison:**
350
+ **Usage:**
351
+ ```bash
352
+ python examples/clan_management.py
353
+ ```
354
+
355
+ ### **📅 Events & Tasks**
356
+
357
+ File: `examples/events_and_tasks.py`
358
+ - ✅ Check daily tasks
359
+ - ✅ Monitor events
360
+ - ✅ Track progress
361
+ - ✅ Get rewards
362
+ - ✅ Event automation
363
+
364
+ **Usage:**
365
+ ```bash
366
+ python examples/events_and_tasks.py
367
+ ```
341
368
 
342
- | Task | Simple Version | Advanced Version |
343
- |------|----------------|------------------|
344
- | Search Player | `client.search_player('f55f')` | `client.get_player_stats_by_dogtag('f55f')` |
345
- | Get Clan Members | `client.get_clan_members()` | `client.get_clan_members(clan_id)` |
346
- | Kick Member | `client.kick_member('9gg9')` | `client.kick_clan_member_by_dogtag('9gg9', clan_id)` |
347
- | Connect | `client.connect()` | Manual authentication |
369
+ ### **🔐 Encrypted Tokens**
348
370
 
349
- ### **🎯 Perfect For:**
350
- - **Clan Leaders**: Easy member management
351
- - **Players**: Quick stats lookup
352
- - **Beginners**: No programming experience needed
353
- - **Quick Tasks**: One-liner functions
371
+ File: `examples/help_system.py` (includes token examples)
372
+ - Generate encrypted tokens
373
+ - Encrypt existing tokens
374
+ - Security best practices
375
+ - Custom nonce support
354
376
 
355
- ## 📚 **Built-in Help System**
377
+ **Usage:**
378
+ ```bash
379
+ python examples/help_system.py
380
+ ```
381
+
382
+ **🎯 Why These Examples?**
383
+ - ✅ **No Setup Required**: Just add your credentials
384
+ - ✅ **Interactive**: User-friendly prompts
385
+ - ✅ **Safe Operations**: Confirmations for destructive actions
386
+ - ✅ **Error Handling**: Clear error messages
387
+ - ✅ **Real-World Tested**: Based on actual MC5 API usage
388
+ - ✅ **Copy-Paste Ready**: Easy to customize
389
+
390
+ **🚀 Getting Started:**
391
+ 1. Install: `pip install mc5_api_client==1.0.14`
392
+ 2. Copy example file
393
+ 3. Add your MC5 credentials
394
+ 4. Run the script
395
+ 5. Done!
396
+
397
+ ## � **Built-in Help System**
356
398
 
357
399
  New in v1.0.8! Comprehensive help commands built right into the library:
358
400
 
@@ -398,7 +440,9 @@ client.connect()
398
440
  player = client.search_player('f55f')
399
441
 
400
442
  # 🔹 Admin Operations
401
- quick_update_player_score('user_id', 5200, xp=2037745)
443
+ result = quick_update_player_score('user_id', 5200, xp=2037745)
444
+ if result.get('success'):
445
+ print(f"Score updated: {result.get('score_updated')}")
402
446
 
403
447
  # 🔹 Error Handling
404
448
  try: except AuthenticationError:
@@ -410,10 +454,10 @@ try: except MC5APIError:
410
454
  ### **🚀 Install from PyPI (Recommended)**
411
455
 
412
456
  ```bash
413
- pip install mc5_api_client==1.0.12
457
+ pip install mc5_api_client==1.0.14
414
458
  ```
415
459
 
416
- ✅ **Published and Available!** The MC5 API Client v1.0.12 is now live on PyPI with accurate admin capabilities, encrypted token support, and corrected documentation!
460
+ ✅ **Published and Available!** The MC5 API Client v1.0.14 is now live on PyPI with ready-to-use examples and simplified documentation!
417
461
 
418
462
  ### **� Install from Local Package**
419
463
 
@@ -1,15 +1,15 @@
1
- mc5_api_client/__init__.py,sha256=xuoqWZDVyIIK3xR-KZa62oO6ZmDfuo8jIE-I5ehtaM8,3296
1
+ mc5_api_client/__init__.py,sha256=Y8JWDAVjx-RMveEDkvoZVNiHwjNnEt80JEVmzqUUMaM,3296
2
2
  mc5_api_client/admin_client.py,sha256=527aavolxVhY2M5ceFxVbbE5YTczU9Z86Fdt1UzdRZM,15220
3
3
  mc5_api_client/auth.py,sha256=z8vmyQIHUdAzk0pUyKCesT8gTv4jboLIFGBxAu1v_-8,13396
4
- mc5_api_client/cli.py,sha256=GObhHGpphRjcAEUPWn8X1FpR67EtQtqzHHSONLo2wKE,17255
4
+ mc5_api_client/cli.py,sha256=zgAfBANZo06oDjNyzhWiI5S5hKinDCDcnged6g2RApQ,17255
5
5
  mc5_api_client/client.py,sha256=1UYaX8UVl_edf-uRh-H_ja5BUWz1ytw52BdOKLuZq0I,80571
6
6
  mc5_api_client/exceptions.py,sha256=o7od4GrEIlgq6xSNUjZdh74xoDTytF3PLcMq5ewRiJw,2683
7
7
  mc5_api_client/help.py,sha256=sqf3R6VHQuSYLvAMzh8nXAgCX5URsvXydvw8P0ATabg,7246
8
8
  mc5_api_client/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
9
9
  mc5_api_client/simple_client.py,sha256=1sVytpSU-TMyDBOe1y_3Y6KjIc8tsZGWdI1eHIUmhmc,23747
10
- mc5_api_client-1.0.13.dist-info/licenses/LICENSE,sha256=M0UBQ4B3pB9XcV54_jhVP681xyauF8GB6YK_rKmuXzk,1064
11
- mc5_api_client-1.0.13.dist-info/METADATA,sha256=AnUR1t8uZ_KbSgPGbIZ2uq8o5_T9V-AD25KTQBz0104,55250
12
- mc5_api_client-1.0.13.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
13
- mc5_api_client-1.0.13.dist-info/entry_points.txt,sha256=2kruOpleFYK3Jl1MoQwGyqCd-Pj4kQWngXmIjnXx_gE,48
14
- mc5_api_client-1.0.13.dist-info/top_level.txt,sha256=eYJe4ue9j1ig_jFY5Z05mDqpizUEV7TYpk5lBXVd4kA,15
15
- mc5_api_client-1.0.13.dist-info/RECORD,,
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,,