mc5-api-client 1.0.15__tar.gz → 1.0.16__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 (50) hide show
  1. {mc5_api_client-1.0.15 → mc5_api_client-1.0.16}/PKG-INFO +1 -1
  2. {mc5_api_client-1.0.15 → mc5_api_client-1.0.16}/examples/everyday_mc5.py +45 -12
  3. {mc5_api_client-1.0.15 → mc5_api_client-1.0.16}/pyproject.toml +1 -1
  4. {mc5_api_client-1.0.15 → mc5_api_client-1.0.16}/src/mc5_api_client/__init__.py +1 -1
  5. {mc5_api_client-1.0.15 → mc5_api_client-1.0.16}/src/mc5_api_client/cli.py +1 -1
  6. {mc5_api_client-1.0.15 → mc5_api_client-1.0.16}/src/mc5_api_client.egg-info/PKG-INFO +1 -1
  7. {mc5_api_client-1.0.15 → mc5_api_client-1.0.16}/.gitignore +0 -0
  8. {mc5_api_client-1.0.15 → mc5_api_client-1.0.16}/CHANGELOG.md +0 -0
  9. {mc5_api_client-1.0.15 → mc5_api_client-1.0.16}/LICENSE +0 -0
  10. {mc5_api_client-1.0.15 → mc5_api_client-1.0.16}/MANIFEST.in +0 -0
  11. {mc5_api_client-1.0.15 → mc5_api_client-1.0.16}/README.md +0 -0
  12. {mc5_api_client-1.0.15 → mc5_api_client-1.0.16}/examples/admin_squad_management.py +0 -0
  13. {mc5_api_client-1.0.15 → mc5_api_client-1.0.16}/examples/admin_tools.py +0 -0
  14. {mc5_api_client-1.0.15 → mc5_api_client-1.0.16}/examples/advanced_automation.py +0 -0
  15. {mc5_api_client-1.0.15 → mc5_api_client-1.0.16}/examples/advanced_features.py +0 -0
  16. {mc5_api_client-1.0.15 → mc5_api_client-1.0.16}/examples/basic_usage.py +0 -0
  17. {mc5_api_client-1.0.15 → mc5_api_client-1.0.16}/examples/clan_management.py +0 -0
  18. {mc5_api_client-1.0.15 → mc5_api_client-1.0.16}/examples/clan_management_complete.py +0 -0
  19. {mc5_api_client-1.0.15 → mc5_api_client-1.0.16}/examples/events_and_tasks.py +0 -0
  20. {mc5_api_client-1.0.15 → mc5_api_client-1.0.16}/examples/help_system.py +0 -0
  21. {mc5_api_client-1.0.15 → mc5_api_client-1.0.16}/examples/message_management.py +0 -0
  22. {mc5_api_client-1.0.15 → mc5_api_client-1.0.16}/examples/player_stats.py +0 -0
  23. {mc5_api_client-1.0.15 → mc5_api_client-1.0.16}/examples/private_messaging.py +0 -0
  24. {mc5_api_client-1.0.15 → mc5_api_client-1.0.16}/examples/quick_help.py +0 -0
  25. {mc5_api_client-1.0.15 → mc5_api_client-1.0.16}/examples/quick_reference.py +0 -0
  26. {mc5_api_client-1.0.15 → mc5_api_client-1.0.16}/examples/simple_usage.py +0 -0
  27. {mc5_api_client-1.0.15 → mc5_api_client-1.0.16}/examples/squad_management.py +0 -0
  28. {mc5_api_client-1.0.15 → mc5_api_client-1.0.16}/examples/squad_wall_management.py +0 -0
  29. {mc5_api_client-1.0.15 → mc5_api_client-1.0.16}/pytest.ini +0 -0
  30. {mc5_api_client-1.0.15 → mc5_api_client-1.0.16}/requirements-dev.txt +0 -0
  31. {mc5_api_client-1.0.15 → mc5_api_client-1.0.16}/requirements.txt +0 -0
  32. {mc5_api_client-1.0.15 → mc5_api_client-1.0.16}/setup.cfg +0 -0
  33. {mc5_api_client-1.0.15 → mc5_api_client-1.0.16}/setup.py +0 -0
  34. {mc5_api_client-1.0.15 → mc5_api_client-1.0.16}/src/mc5_api_client/admin_client.py +0 -0
  35. {mc5_api_client-1.0.15 → mc5_api_client-1.0.16}/src/mc5_api_client/auth.py +0 -0
  36. {mc5_api_client-1.0.15 → mc5_api_client-1.0.16}/src/mc5_api_client/client.py +0 -0
  37. {mc5_api_client-1.0.15 → mc5_api_client-1.0.16}/src/mc5_api_client/exceptions.py +0 -0
  38. {mc5_api_client-1.0.15 → mc5_api_client-1.0.16}/src/mc5_api_client/help.py +0 -0
  39. {mc5_api_client-1.0.15 → mc5_api_client-1.0.16}/src/mc5_api_client/py.typed +0 -0
  40. {mc5_api_client-1.0.15 → mc5_api_client-1.0.16}/src/mc5_api_client/simple_client.py +0 -0
  41. {mc5_api_client-1.0.15 → mc5_api_client-1.0.16}/src/mc5_api_client.egg-info/SOURCES.txt +0 -0
  42. {mc5_api_client-1.0.15 → mc5_api_client-1.0.16}/src/mc5_api_client.egg-info/dependency_links.txt +0 -0
  43. {mc5_api_client-1.0.15 → mc5_api_client-1.0.16}/src/mc5_api_client.egg-info/entry_points.txt +0 -0
  44. {mc5_api_client-1.0.15 → mc5_api_client-1.0.16}/src/mc5_api_client.egg-info/not-zip-safe +0 -0
  45. {mc5_api_client-1.0.15 → mc5_api_client-1.0.16}/src/mc5_api_client.egg-info/requires.txt +0 -0
  46. {mc5_api_client-1.0.15 → mc5_api_client-1.0.16}/src/mc5_api_client.egg-info/top_level.txt +0 -0
  47. {mc5_api_client-1.0.15 → mc5_api_client-1.0.16}/tests/__init__.py +0 -0
  48. {mc5_api_client-1.0.15 → mc5_api_client-1.0.16}/tests/test_auth.py +0 -0
  49. {mc5_api_client-1.0.15 → mc5_api_client-1.0.16}/tests/test_cli.py +0 -0
  50. {mc5_api_client-1.0.15 → mc5_api_client-1.0.16}/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.15
3
+ Version: 1.0.16
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
@@ -29,8 +29,9 @@ def main():
29
29
  print("=" * 30)
30
30
 
31
31
  # Your MC5 credentials
32
- username = "YOUR_USERNAME_HERE" # e.g., "anonymous:d2luOF92M18xNzcwMDUxNjkwXy7H33aeTVB4YZictyDq48c="
33
- password = "YOUR_PASSWORD_HERE" # Your MC5 password
32
+ # Your MC5 credentials
33
+ username = "anonymous:d2luOF92M18xNzcwMDUxNjkwXy7H33aeTVB4YZictyDq48c=" # Real MC5 username
34
+ password = "sSJKzhQ5l4vrFgov" # Real MC5 password
34
35
 
35
36
  # Connect to MC5
36
37
  client = SimpleMC5Client(username, password)
@@ -67,9 +68,24 @@ def main():
67
68
  try:
68
69
  profile = client.client.get_profile()
69
70
  print(f"✅ Name: {profile.get('name', 'Unknown')}")
70
- print(f"🎯 Level: {profile.get('level', 'Unknown')}")
71
- print(f"⭐ XP: {profile.get('xp', 0):,}")
72
- print(f"💰 Score: {profile.get('score', 0):,}")
71
+
72
+ # Try different field names for level
73
+ level = profile.get('level') or profile.get('_level') or profile.get('player_level') or 'Unknown'
74
+ print(f"🎯 Level: {level}")
75
+
76
+ # Try different field names for XP
77
+ xp = profile.get('xp') or profile.get('_xp') or profile.get('experience') or 0
78
+ if xp > 0:
79
+ print(f"⭐ XP: {xp:,}")
80
+ else:
81
+ print(f"⭐ XP: {xp}")
82
+
83
+ # Try different field names for score
84
+ score = profile.get('score') or profile.get('_score') or profile.get('player_score') or 0
85
+ if score > 0:
86
+ print(f"💰 Score: {score:,}")
87
+ else:
88
+ print(f"💰 Score: {score}")
73
89
 
74
90
  # Check clan if you have one
75
91
  groups = profile.get('groups', [])
@@ -86,15 +102,28 @@ def main():
86
102
  # 3. Search for a player
87
103
  print("🔍 Searching for players...")
88
104
  dogtag = input("Enter player dogtag (4-8 characters, e.g., f55f): ").strip()
89
-
90
105
  if dogtag:
91
106
  try:
92
107
  player = client.search_player(dogtag)
93
108
  if player and 'kills' in player:
94
109
  print(f"✅ Found player: {dogtag}")
95
110
  print(f"🎯 Kills: {player['kills']:,}")
96
- print(f"⭐ Level: {player.get('level', 'Unknown')}")
97
- print(f"💰 Score: {player.get('score', 0):,}")
111
+
112
+ # Try different field names for level
113
+ level = player.get('level') or player.get('_level') or player.get('player_level') or 'Unknown'
114
+ print(f"⭐ Level: {level}")
115
+
116
+ # Try different field names for score
117
+ score = player.get('score') or player.get('_score') or player.get('player_score') or 0
118
+ if score > 0:
119
+ print(f"💰 Score: {score:,}")
120
+ else:
121
+ print(f"💰 Score: {score}")
122
+
123
+ # Add new fields
124
+ print(f"📊 Wins: {player.get('wins', 0)}")
125
+ print(f"📊 Losses: {player.get('losses', 0)}")
126
+ print(f"📊 Draws: {player.get('draws', 0)}")
98
127
  else:
99
128
  print(f"❌ Player {dogtag} not found")
100
129
  except Exception as e:
@@ -114,12 +143,15 @@ def main():
114
143
  print(f"🟢 {online_count} members online right now")
115
144
 
116
145
  # Show top 5 members by score
117
- sorted_members = sorted(members, key=lambda x: x.get('_score', 0), reverse=True)[:5]
146
+ sorted_members = sorted(members, key=lambda x: int(x.get('_score', 0) or x.get('score', 0) or 0), reverse=True)[:5]
118
147
  print("🏆 Top 5 members by score:")
119
148
  for i, member in enumerate(sorted_members, 1):
120
149
  name = member.get('name', 'Unknown')
121
- score = member.get('_score', 0)
122
- print(f" {i}. {name}: {score:,}")
150
+ score = int(member.get('_score') or member.get('score') or 0)
151
+ if score > 0:
152
+ print(f" {i}. {name}: {score:,}")
153
+ else:
154
+ print(f" {i}. {name}: {score}")
123
155
 
124
156
  except Exception as e:
125
157
  print(f"❌ Error checking clan members: {e}")
@@ -137,7 +169,8 @@ def main():
137
169
 
138
170
  if friend_dogtag and message:
139
171
  try:
140
- if client.send_message(friend_dogtag, message):
172
+ result = client.send_message(friend_dogtag, message)
173
+ if result:
141
174
  print(f"✅ Message sent to {friend_dogtag}")
142
175
  else:
143
176
  print("❌ Failed to send message")
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "mc5_api_client"
7
- version = "1.0.15"
7
+ version = "1.0.16"
8
8
  description = "A comprehensive Python library for interacting with the Modern Combat 5 API"
9
9
  readme = "README.md"
10
10
  license = {file = "LICENSE"}
@@ -15,7 +15,7 @@ messaging, and more.
15
15
 
16
16
  from typing import Optional, Dict, Any
17
17
 
18
- __version__ = "1.0.15"
18
+ __version__ = "1.0.16"
19
19
  __author__ = "Chizoba"
20
20
  __email__ = "chizoba2026@hotmail.com"
21
21
  __license__ = "MIT"
@@ -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.15", "cyan")
450
+ self._print("MC5 API Client v1.0.16", "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.15
3
+ Version: 1.0.16
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
File without changes