mc5-api-client 1.0.19__py3-none-any.whl → 1.0.20__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.19"
18
+ __version__ = "1.0.20"
19
19
  __author__ = "Chizoba"
20
20
  __email__ = "chizoba2026@hotmail.com"
21
21
  __license__ = "MIT"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: mc5_api_client
3
- Version: 1.0.19
3
+ Version: 1.0.20
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
@@ -143,10 +143,109 @@ Think of this as your remote control for Modern Combat 5! Here's what you can do
143
143
  ### 🎉 MC5 API Client v1.0.18 - Super Easy Interface & Clean API!
144
144
 
145
145
  ```bash
146
- pip install mc5_api_client==1.0.18
146
+ pip install mc5_api_client==1.0.20
147
147
  ```
148
148
 
149
- ### **Major Features Completed!**
149
+ ## 🎯 **Usage Examples**
150
+
151
+ ### **🎮 Basic Usage (MC5Client)**
152
+ ```python
153
+ from mc5_api_client import MC5Client
154
+
155
+ # Initialize the client
156
+ client = MC5Client(
157
+ client_id="1875:55979:6.0.0a:windows:windows",
158
+ username="your_credential",
159
+ password="your_password"
160
+ )
161
+
162
+ # Authenticate
163
+ client.authenticate()
164
+
165
+ # Get profile
166
+ profile = client.get_profile()
167
+ print(f"Profile: {profile}")
168
+
169
+ # Get events
170
+ events = client.get_events()
171
+ print(f"Events: {len(events)} found")
172
+
173
+ # Server status (NEW!)
174
+ status = client.get_server_status()
175
+ print(f"Server Status: {status['status']}")
176
+
177
+ # Close connection
178
+ client.close()
179
+ ```
180
+
181
+ ### **🎯 MC5ApiClient (Backward Compatible)**
182
+ ```python
183
+ from mc5_api_client import MC5ApiClient
184
+
185
+ # MC5ApiClient is an alias for MC5Client
186
+ client = MC5ApiClient(
187
+ client_id="1875:55979:6.0.0a:windows:windows",
188
+ username="your_credential",
189
+ password="your_password"
190
+ )
191
+
192
+ # Use the same methods as MC5Client
193
+ client.authenticate()
194
+ status = client.get_server_status()
195
+ info = client.get_server_info()
196
+ ```
197
+
198
+ ### **🔧 Quick Functions (Standalone)**
199
+ ```python
200
+ from mc5_api_client import quick_get_account_info, quick_get_active_sessions
201
+
202
+ # Quick functions are standalone, not client methods
203
+ # They require credentials as parameters
204
+ account_info = quick_get_account_info("your_credential", "your_password")
205
+ sessions = quick_get_active_sessions("your_password")
206
+ ```
207
+
208
+ ### **🎮 Game Launch & Service Location (NEW!)**
209
+ ```python
210
+ from mc5_api_client import MC5Easy, get_all_services, create_federation_session
211
+
212
+ # Get all MC5 services dynamically
213
+ services = get_all_services()
214
+ print(f"Found {len(services)} services:")
215
+ for service, endpoint in services.items():
216
+ print(f" {service}: {endpoint}")
217
+
218
+ # Create federation session for game launch
219
+ session = create_federation_session(username, password)
220
+ if session.get("success"):
221
+ print(f"Room ID: {session['room_id']}")
222
+ print(f"Controller: {session['controller_host']}")
223
+
224
+ # Or use MC5Easy for complete game management
225
+ with MC5Easy(username, password) as mc5:
226
+ launch_info = mc5.launch_game_session()
227
+ print(f"Game ready: {launch_info['launch_command']}")
228
+ ```
229
+
230
+ ### **🌐 Global ID & Device Management (NEW!)**
231
+ ```python
232
+ from mc5_api_client import get_global_id, generate_device_id
233
+
234
+ # Get global device ID
235
+ global_id = get_global_id()
236
+ print(f"Global ID: {global_id}")
237
+
238
+ # Generate unique device ID
239
+ device_id = generate_device_id()
240
+ print(f"Device ID: {device_id}")
241
+
242
+ # With MC5Easy
243
+ with MC5Easy(username, password) as mc5:
244
+ device_info = mc5.get_device_info()
245
+ print(f"Device: {device_info}")
246
+ ```
247
+
248
+ ## 📱 **Run Examples:** Completed!
150
249
 
151
250
  **🎯 Super Easy Interface (NEW in v1.0.18):**
152
251
  - ✅ **MC5Easy Module** - One-line functions for everyday tasks
@@ -1348,8 +1447,6 @@ finally:
1348
1447
  **Security Benefits:**
1349
1448
  - ✅ **Additional Layer**: Tokens are encrypted before transmission
1350
1449
  - ✅ **Custom Nonce**: Support for custom nonce values
1351
- - ✅ **Backward Compatible**: Works with existing authentication flow
1352
- - ✅ **Error Handling**: Proper validation and error recovery
1353
1450
 
1354
1451
  ### 🏆 **Checking Leaderboards**
1355
1452
 
@@ -1369,7 +1466,6 @@ if hasattr(client, 'get_leaderboard'):
1369
1466
  # print(f"Top {len(leaderboard.get('players', []))} players")
1370
1467
  else:
1371
1468
  print("❌ get_leaderboard method not found")
1372
- ```
1373
1469
 
1374
1470
  ### 🖥️ CLI Commands - Currently Available
1375
1471
 
@@ -1,4 +1,4 @@
1
- mc5_api_client/__init__.py,sha256=dwst7ePR-608bLju9sGSZ5XE_5KkyUI3BJJITktpcsU,11942
1
+ mc5_api_client/__init__.py,sha256=lxGygRXrG6aUTZ_Em_TLyMzMxR7ylTXgXOhA5OEXfnM,11942
2
2
  mc5_api_client/account.py,sha256=EmydXCsCXaKqMw21oVttQfYuDl50pa2dwhcTeHtnxbQ,14396
3
3
  mc5_api_client/account_quick.py,sha256=t4ki4ujYENmcnd_004f0pO9SPxPyCllz4WHpBG9wNbo,10458
4
4
  mc5_api_client/admin_client.py,sha256=527aavolxVhY2M5ceFxVbbE5YTczU9Z86Fdt1UzdRZM,15220
@@ -24,9 +24,9 @@ mc5_api_client/storage_admin.py,sha256=l-nwskbpa3KpeIoWcwVRicgBSvrTvQ5aE2QU_e366
24
24
  mc5_api_client/telemetry.py,sha256=k8qOimPg-AKsnMclIgeqYCJ_97j2pWyiN7Lg80D4sKo,13246
25
25
  mc5_api_client/transfer.py,sha256=-pln70360mo4cKBQIUzp_wt9ce1Cr4YA6aJDFPKEjzQ,14381
26
26
  mc5_api_client/transfer_quick.py,sha256=HhRbp4FVzFwuzHDcqOyYiVjeVEIfgezlWd8SN6sh874,11310
27
- mc5_api_client-1.0.19.dist-info/licenses/LICENSE,sha256=M0UBQ4B3pB9XcV54_jhVP681xyauF8GB6YK_rKmuXzk,1064
28
- mc5_api_client-1.0.19.dist-info/METADATA,sha256=eTEmXuKWRw8Z6wtY4bVAtGljnBB_G667PT2wGfnuEuY,80598
29
- mc5_api_client-1.0.19.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
30
- mc5_api_client-1.0.19.dist-info/entry_points.txt,sha256=2kruOpleFYK3Jl1MoQwGyqCd-Pj4kQWngXmIjnXx_gE,48
31
- mc5_api_client-1.0.19.dist-info/top_level.txt,sha256=eYJe4ue9j1ig_jFY5Z05mDqpizUEV7TYpk5lBXVd4kA,15
32
- mc5_api_client-1.0.19.dist-info/RECORD,,
27
+ mc5_api_client-1.0.20.dist-info/licenses/LICENSE,sha256=M0UBQ4B3pB9XcV54_jhVP681xyauF8GB6YK_rKmuXzk,1064
28
+ mc5_api_client-1.0.20.dist-info/METADATA,sha256=jcN6JTeojDPA5C_0U9l1_bCcwKNwkPNbf-1s17Uci3w,83121
29
+ mc5_api_client-1.0.20.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
30
+ mc5_api_client-1.0.20.dist-info/entry_points.txt,sha256=2kruOpleFYK3Jl1MoQwGyqCd-Pj4kQWngXmIjnXx_gE,48
31
+ mc5_api_client-1.0.20.dist-info/top_level.txt,sha256=eYJe4ue9j1ig_jFY5Z05mDqpizUEV7TYpk5lBXVd4kA,15
32
+ mc5_api_client-1.0.20.dist-info/RECORD,,