Methods
(inner) createEnterPinFooter(footers, method, params, callback, onerror) → {void}
Creates the enter pin footer and sends the original api request after the session is created.
Parameters:
Name | Type | Description |
---|---|---|
footers |
NodeList | modal footers to hide |
method |
string | jsonrpc method of the original api request |
params |
object | json object of the original api request |
callback |
function | callback function of the original api request |
onerror |
boolean | true = execute callback also on error |
- Source:
Returns:
- Type
- void
(inner) enterPin(method, params, callback, onerror) → {void}
Shows the enter pin dialog in a new model or if a modal is already opened in the footer of this modal.
Parameters:
Name | Type | Description |
---|---|---|
method |
string | jsonrpc method of the original api request |
params |
object | json object of the original api request |
callback |
function | callback function of the original api request |
onerror |
boolean | true = execute callback also on error |
- Source:
Returns:
- Type
- void
(inner) loginOrLogout() → {void}
Shows the login modal or logs out
- Source:
Returns:
- Type
- void
(inner) removeEnterPinFooter(footer) → {void}
Removes the enter pin dialog from a modal footer and restores the original footer.
Parameters:
Name | Type | Description |
---|---|---|
footer |
HTMLElement | pin footer to remove |
- Source:
Returns:
- Type
- void
(inner) removeSession() → {void}
Removes a session by calling the MYMPD_API_SESSION_LOGOUT endpoint
and calls setSessionState to update the DOM.
- Source:
Returns:
- Type
- void
(inner) resetSessionTimer() → {void}
Resets the session timer.
- Source:
Returns:
- Type
- void
(inner) setSession(token) → {void}
Initializes the session object
Parameters:
Name | Type | Description |
---|---|---|
token |
string | retrieved session token |
- Source:
Returns:
- Type
- void
(inner) setSessionState() → {void}
Sets the session state.
Shows/hides the lock indicator and the login/logout menu entry.
- Source:
Returns:
- Type
- void
(inner) validateSession() → {void}
Validates a session by calling the MYMPD_API_SESSION_VALIDATE endpoint
and calls setSessionState to update the DOM.
- Source:
Returns:
- Type
- void