Difference between revisions of "InstalledApp Object"

From Hubitat Documentation
Jump to: navigation, search
(Added getInstallationState and standardized formatting.)
Line 1: Line 1:
 +
===<code>getInstallationState</code>===
 +
:Returns a value indicating whether the app is currently installed or, if you are in the initial setup, that it is not.
 +
 +
:;Signature
 +
:: <code>String getInstallationState()</code>
 +
 +
:;Parameters
 +
::None
 +
 +
:;Returns
 +
::<code>COMPLETE</code> if the app is installed, otherwise <code>INCOMPLETE</code>.
 +
 
== <code>getLabel</code> ==
 
== <code>getLabel</code> ==
Get the current label of the installed app.
+
:Get the current label of the installed app.
 +
 
 +
:;Signature
 +
:: <code>String getLabel()</code>
  
'''Signature'''
+
:;Parameters
String getLabel()
+
::None
  
'''Returns'''
+
:;Returns
 +
::The current label of the installed app
  
The current label of the installed app
+
:;Example
 +
::<code> def appLabel = app.getLabel()
 +
log.debug "app label is ${appLabel}"</code>
  
'''Example'''
 
def appLabel = app.getLabel()
 
log.debug "app label is ${appLabel}"
 
  
 +
=== <code>updateLabel</code> ===
 +
:Update the label of the installed app
  
== <code>updateLabel</code> ==
+
:;Signature
Update the label of the installed app
+
::void updateLabel(String label)
  
'''Signature'''
+
:;Parameters
void updateLabel(String label)
+
::label - new label for installed app
  
'''Parameters'''
+
:;Returns
label - new label for installed app
+
::None
  
 
== <code>Additional Methods to Document</code> ==
 
== <code>Additional Methods to Document</code> ==
Line 33: Line 50:
 
  void removeSetting(String name)
 
  void removeSetting(String name)
 
  void clearSetting(String name)
 
  void clearSetting(String name)
String getInstallationState()
 
 
  Long getId()
 
  Long getId()
 
  Long getName()
 
  Long getName()
 
  List<EventSubscriptionWrapper> getSubscriptions()
 
  List<EventSubscriptionWrapper> getSubscriptions()

Revision as of 18:35, 30 March 2020

getInstallationState

Returns a value indicating whether the app is currently installed or, if you are in the initial setup, that it is not.
Signature
String getInstallationState()
Parameters
None
Returns
COMPLETE if the app is installed, otherwise INCOMPLETE.

getLabel

Get the current label of the installed app.
Signature
String getLabel()
Parameters
None
Returns
The current label of the installed app
Example
def appLabel = app.getLabel()

log.debug "app label is ${appLabel}"


updateLabel

Update the label of the installed app
Signature
void updateLabel(String label)
Parameters
label - new label for installed app
Returns
None

Additional Methods to Document

void updateSetting(String name, Map options)
void updateSetting(String name, Long value)
void updateSetting(String name, Boolean value)
void updateSetting(String name, String value)
void updateSetting(String name, Double value)
void updateSetting(String name, Date value)
void updateSetting(String name, List value)
void removeSetting(String name)
void clearSetting(String name)
Long getId()
Long getName()
List<EventSubscriptionWrapper> getSubscriptions()