module.plugins.Account.Account

class module.plugins.Account.Account(manager, accounts)[source]

Base class for every Account plugin. Just overwrite login and cookies will be stored and account becomes accessible in associated hoster plugin. Plugin should also provide loadAccountInfo

__init__(manager, accounts)[source]

Methods

__init__(manager, accounts)
canUse()
checkLogin(*args)
delStorage(key) Delete entry in db
empty(user)
expired(user)
getAccountCookies([user])
getAccountData(user)
getAccountInfo(*args)
getAccountRequest([user])
getAllAccounts([force])
getConf(option) see getConfig
getConfig(option) Returns config value for current plugin
getStorage([key, default]) Retrieves saved value or dict of all saved entries if key is None
init()
isPremium(user)
loadAccountInfo(name[, req]) this should be overwritten in account plugin, and retrieving account information for user
logDebug(*args)
logError(*args)
logInfo(*args)
logWarning(*args)
login(user, data, req) login into account, the cookies will be saved so user can be recognized
parseTraffic(string)
relogin(user)
removeAccount(user)
retrieve(*args, **kwargs) same as getStorage
scheduleRefresh(user[, time, force]) add task to refresh account info to sheduler
selectAccount() returns an valid account name and data
setAccounts(accounts)
setConf(option, value) see setConfig
setConfig(option, value) Set config value for current plugin
setStorage(key, value) Saves a value persistently to the database
store(key, value) same as setStorage
updateAccounts(user[, password, options]) updates account and return true if anything changed
wrongPassword()

Attributes

info_threshold int(x=0) -> int or long
login_timeout int(x=0) -> int or long
login_timeout = 600

after that time [in minutes] pyload will relogin the account

info_threshold = 600

account data will be reloaded after this time

login(user, data, req)[source]

login into account, the cookies will be saved so user can be recognized

Parameters:
  • user – loginname
  • data – data dictionary
  • reqRequest instance
updateAccounts(user, password=None, options={})[source]

updates account and return true if anything changed

loadAccountInfo(name, req=None)[source]

this should be overwritten in account plugin, and retrieving account information for user

Parameters:
  • name
  • reqRequest instance
Returns:

selectAccount()[source]

returns an valid account name and data

scheduleRefresh(user, time=0, force=True)[source]

add task to refresh account info to sheduler

Previous topic

module.plugins.Crypter.Crypter

Next topic

module.plugins.Hook.Hook

This Page