Closed robsonke closed 2 months ago
The response from the API call to library.ibroadcast.com is stored into the iBroadcast object's library
field. So you can do:
>>> ib = iBroadcast(...)
>>> ib.library['settings']
{'fast_polling': 30, 'streaming_server': 'https://streaming.ibroadcast.com', 'librarybytespersong': 150, 'artwork_server': 'https://artwork.ibroadcast.com', 'librarysongspersecond': 4000, 'slow_polling': 300}
>>> ib.library['status']
{'app_available': False, 'lastmodified': '2024-09-03 19:21:35', 'expires': '2024-07-13 21:09:45.000000', 'timestamp': '2024-06-29 21:09:45', 'app_version': '6.5'}
And for the initial login, the response is stored in the status
field:
>>> ib.status['user'].keys()
dict_keys(['email_address', 'password_change', 'premium', 'verified_on', 'client', 'facebook', 'subscription', 'verified', 'remote_addr', 'preferences', 'device_name', 'id', 'userid', 'tester', 'username', 'token', 'user_id', 'profiles', 'user_agent', 'session', 'created_on'])
Does that contain what you're looking for?
Oh I'm stupid, I should have just tried it. I looked up for references in the code but you automap the json keys to fields obviously.
This should be fine! Lets close this one.
Glad that will work! Please feel welcome to open issues if anything else comes up.
First of all thanks for this library. I'm currently using it to make iBroadcast part of Music Assistant. What I seem to miss are the basic settings included in the initial response, from the documentation:
Is this correct? I'm willing to create a PR on your repository for implementing this, just let me know.