Kodi developers one stop shop for common account information accessed under one roof that all addons can share. This allows users to setup accounts once and addons access that data.
<dir>
<info compressed="false">https://raw.githubusercontent.com/a4k-openproject/repository.myaccounts/master/zips/addons.xml</info>
<checksum>https://raw.githubusercontent.com/a4k-openproject/repository.myaccounts/master/zips/addons.xml.md5</checksum>
<datadir zip="true">https://raw.githubusercontent.com/a4k-openproject/repository.myaccounts/master/zips/</datadir>
</dir>
To add My Accounts as a deppendecy
add the following to your addon's addon.xml file between the <requires></requires>
tag.
<import addon="script.module.myaccounts" version="1.0.0" />
Addon developers can access My Accounts as simply as
You can use import myaccounts
once the dependecy is added to your addon. The following lists the functions that can be called that will respond with a dictionary and the supplied key and value.
This function call will provide all available accounts as a dictionary for each account handled. If we called accounts = myaccounts.getAll()
The returned data will be as follows.
accounts ={'premiumize': {'enabled': '', username': '', 'token': ''}, 'alldebrid': {'enabled': '', 'username': '', 'token': ''}, 'tmdb': {'username': '', 'password': '', 'api_key': '', 'session_id': ''}, 'realdebrid': {'enabled': '', 'username': '', 'token': '', 'secret': '', 'refresh': '', 'client_id': ''}, 'ororo': {'password': '', 'email': ''}, 'tvdb': {'api_key': ''}, 'filepursuit': {'api_key': ''}, 'trakt': {'username': '', 'token': '', 'expires': '', 'refresh': ''}, 'imdb': {'user': ''}, 'easyNews': {'username': '', 'password': ''}, 'furk': {'username': '', 'api_key': '', 'password': ''}, 'fanart_tv': {'api_key': ''}}
Returns trakt only account info
trakt': {'username': '', 'token': '', 'expires': '', 'refresh': ''}
Returns all debrid account information supported (currently All-Debrid, Premiumize.me, Real-Debrid)
There is an addional key for each dictionary 'enabled'
. This key could be used by the adon developer that the debrid service is temporarily disabled by the user.
{premiumize': {'enabled': '', 'username': '', 'token': ''}, 'alldebrid': {'enabled': '', 'username': '', 'token': ''}, 'realdebrid': {'enabled': '', 'username': '', 'token': '', 'secret': '', 'refresh': '', 'client_id': ''}}
alldebrid': {'enabled': '', 'username': '', 'token': ''}
premiumize': {'enabled': '', 'username': '', 'token': ''}
realdebrid': {'enabled': '', 'username': '', 'token': '', 'secret': '', 'refresh': '', 'client_id': ''}
{'tmdb': {'username': '', 'password': '', 'api_key': '', 'session_id': ''}, 'tvdb': {'api_key': ''}, 'imdb': {'user': ''}, 'fanart_tv': {'api_key': ''}}
fanart_tv': {'api_key': ''}
tmdb': {'username': '', 'password': '', 'api_key': '', 'session_id': ''}
tvdb': {'api_key': ''}
imdb': {'user': ''}
{'ororo': {'password': '', 'email': ''}, 'filepursuit': {'api_key': ''}, 'easyNews': {'username': '', 'password': ''}, 'furk': {'username': '', 'api_key': '', 'password': ''}}
filepursuit: {'api_key': ''}
furk: {'username': '', 'api_key': '', 'password': ''}
easyNews: {'username': '', 'password': ''}
ororo: {'password': '', 'email': ''}