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.
- {mc5_api_client-1.0.15 → mc5_api_client-1.0.16}/PKG-INFO +1 -1
- {mc5_api_client-1.0.15 → mc5_api_client-1.0.16}/examples/everyday_mc5.py +45 -12
- {mc5_api_client-1.0.15 → mc5_api_client-1.0.16}/pyproject.toml +1 -1
- {mc5_api_client-1.0.15 → mc5_api_client-1.0.16}/src/mc5_api_client/__init__.py +1 -1
- {mc5_api_client-1.0.15 → mc5_api_client-1.0.16}/src/mc5_api_client/cli.py +1 -1
- {mc5_api_client-1.0.15 → mc5_api_client-1.0.16}/src/mc5_api_client.egg-info/PKG-INFO +1 -1
- {mc5_api_client-1.0.15 → mc5_api_client-1.0.16}/.gitignore +0 -0
- {mc5_api_client-1.0.15 → mc5_api_client-1.0.16}/CHANGELOG.md +0 -0
- {mc5_api_client-1.0.15 → mc5_api_client-1.0.16}/LICENSE +0 -0
- {mc5_api_client-1.0.15 → mc5_api_client-1.0.16}/MANIFEST.in +0 -0
- {mc5_api_client-1.0.15 → mc5_api_client-1.0.16}/README.md +0 -0
- {mc5_api_client-1.0.15 → mc5_api_client-1.0.16}/examples/admin_squad_management.py +0 -0
- {mc5_api_client-1.0.15 → mc5_api_client-1.0.16}/examples/admin_tools.py +0 -0
- {mc5_api_client-1.0.15 → mc5_api_client-1.0.16}/examples/advanced_automation.py +0 -0
- {mc5_api_client-1.0.15 → mc5_api_client-1.0.16}/examples/advanced_features.py +0 -0
- {mc5_api_client-1.0.15 → mc5_api_client-1.0.16}/examples/basic_usage.py +0 -0
- {mc5_api_client-1.0.15 → mc5_api_client-1.0.16}/examples/clan_management.py +0 -0
- {mc5_api_client-1.0.15 → mc5_api_client-1.0.16}/examples/clan_management_complete.py +0 -0
- {mc5_api_client-1.0.15 → mc5_api_client-1.0.16}/examples/events_and_tasks.py +0 -0
- {mc5_api_client-1.0.15 → mc5_api_client-1.0.16}/examples/help_system.py +0 -0
- {mc5_api_client-1.0.15 → mc5_api_client-1.0.16}/examples/message_management.py +0 -0
- {mc5_api_client-1.0.15 → mc5_api_client-1.0.16}/examples/player_stats.py +0 -0
- {mc5_api_client-1.0.15 → mc5_api_client-1.0.16}/examples/private_messaging.py +0 -0
- {mc5_api_client-1.0.15 → mc5_api_client-1.0.16}/examples/quick_help.py +0 -0
- {mc5_api_client-1.0.15 → mc5_api_client-1.0.16}/examples/quick_reference.py +0 -0
- {mc5_api_client-1.0.15 → mc5_api_client-1.0.16}/examples/simple_usage.py +0 -0
- {mc5_api_client-1.0.15 → mc5_api_client-1.0.16}/examples/squad_management.py +0 -0
- {mc5_api_client-1.0.15 → mc5_api_client-1.0.16}/examples/squad_wall_management.py +0 -0
- {mc5_api_client-1.0.15 → mc5_api_client-1.0.16}/pytest.ini +0 -0
- {mc5_api_client-1.0.15 → mc5_api_client-1.0.16}/requirements-dev.txt +0 -0
- {mc5_api_client-1.0.15 → mc5_api_client-1.0.16}/requirements.txt +0 -0
- {mc5_api_client-1.0.15 → mc5_api_client-1.0.16}/setup.cfg +0 -0
- {mc5_api_client-1.0.15 → mc5_api_client-1.0.16}/setup.py +0 -0
- {mc5_api_client-1.0.15 → mc5_api_client-1.0.16}/src/mc5_api_client/admin_client.py +0 -0
- {mc5_api_client-1.0.15 → mc5_api_client-1.0.16}/src/mc5_api_client/auth.py +0 -0
- {mc5_api_client-1.0.15 → mc5_api_client-1.0.16}/src/mc5_api_client/client.py +0 -0
- {mc5_api_client-1.0.15 → mc5_api_client-1.0.16}/src/mc5_api_client/exceptions.py +0 -0
- {mc5_api_client-1.0.15 → mc5_api_client-1.0.16}/src/mc5_api_client/help.py +0 -0
- {mc5_api_client-1.0.15 → mc5_api_client-1.0.16}/src/mc5_api_client/py.typed +0 -0
- {mc5_api_client-1.0.15 → mc5_api_client-1.0.16}/src/mc5_api_client/simple_client.py +0 -0
- {mc5_api_client-1.0.15 → mc5_api_client-1.0.16}/src/mc5_api_client.egg-info/SOURCES.txt +0 -0
- {mc5_api_client-1.0.15 → mc5_api_client-1.0.16}/src/mc5_api_client.egg-info/dependency_links.txt +0 -0
- {mc5_api_client-1.0.15 → mc5_api_client-1.0.16}/src/mc5_api_client.egg-info/entry_points.txt +0 -0
- {mc5_api_client-1.0.15 → mc5_api_client-1.0.16}/src/mc5_api_client.egg-info/not-zip-safe +0 -0
- {mc5_api_client-1.0.15 → mc5_api_client-1.0.16}/src/mc5_api_client.egg-info/requires.txt +0 -0
- {mc5_api_client-1.0.15 → mc5_api_client-1.0.16}/src/mc5_api_client.egg-info/top_level.txt +0 -0
- {mc5_api_client-1.0.15 → mc5_api_client-1.0.16}/tests/__init__.py +0 -0
- {mc5_api_client-1.0.15 → mc5_api_client-1.0.16}/tests/test_auth.py +0 -0
- {mc5_api_client-1.0.15 → mc5_api_client-1.0.16}/tests/test_cli.py +0 -0
- {mc5_api_client-1.0.15 → mc5_api_client-1.0.16}/tests/test_client.py +0 -0
|
@@ -29,8 +29,9 @@ def main():
|
|
|
29
29
|
print("=" * 30)
|
|
30
30
|
|
|
31
31
|
# Your MC5 credentials
|
|
32
|
-
|
|
33
|
-
|
|
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
|
-
|
|
71
|
-
|
|
72
|
-
|
|
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
|
-
|
|
97
|
-
|
|
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'
|
|
122
|
-
|
|
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
|
-
|
|
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.
|
|
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"}
|
|
@@ -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.
|
|
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")
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{mc5_api_client-1.0.15 → mc5_api_client-1.0.16}/src/mc5_api_client.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
{mc5_api_client-1.0.15 → mc5_api_client-1.0.16}/src/mc5_api_client.egg-info/entry_points.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|