refactor(clients): reorganize client modules into clients package

- Move auth, user, and music clients into new clients package
- Update imports to use new module paths
- Add __init__.py to expose clients from package
- Clean up code formatting and imports
- Add pre-commit configuration for code quality checks
This commit is contained in:
2025-06-07 06:57:01 -07:00
parent eac722e37f
commit 161a4d42d6
14 changed files with 191 additions and 128 deletions

View File

@ -204,18 +204,18 @@ try:
# Step 1: Initiate login
verify_id = client.auth.login("960", "7777777")
print(f"OTP sent! Verification ID: {verify_id}")
# Step 2: Get OTP from user
otp = input("Enter OTP: ")
# Step 3: Verify OTP and get token
token = client.auth.verify_otp(otp, verify_id)
print(f"Login successful! Token: {token}")
# Step 4: Use the API
user_info = client.user.get_me()
print(f"Welcome, {user_info['username']}!")
except AuthenticationError as e:
print(f"Authentication failed: {e}")
finally:
@ -232,7 +232,7 @@ for category in results:
print(f"\n{category['title']}:")
for item in category['items'][:3]: # Show top 3
print(f" {item['heading']} - {item['sub_heading']}")
# Get detailed info if it's a song
if category['title'] == 'Songs':
try:
@ -281,4 +281,4 @@ This project is licensed under the MIT License - see the [LICENSE](LICENSE) file
---
**Note**: This is an unofficial client library. songbox is a trademark of its respective owners.
**Note**: This is an unofficial client library. songbox is a trademark of its respective owners.