Application¶
pyfamilysafety.application.Application ¶
Application(api, user_id)
An application from the member's app activity report.
Attributes:
| Name | Type | Description |
|---|---|---|
app_id |
Application identifier (prefix indicates platform). |
|
name |
Display name. |
|
icon |
Icon URL. |
|
policy |
Raw policy object from the API. |
|
blocked |
bool
|
Whether the app is currently blocked. |
Source code in pyfamilysafety/application.py
26 27 28 29 30 31 32 33 34 | |
usage
property
¶
usage
Screen time used by this app in the current report period.
Returns:
| Type | Description |
|---|---|
float
|
Usage in minutes (converted from milliseconds in the API). |
update ¶
update(app)
Updates the data.
Source code in pyfamilysafety/application.py
36 37 38 39 40 41 42 43 | |
block_app
async
¶
block_app()
Block this application from running.
Posts an app policy update with blockState set to BlockedAlways.
Updates :attr:blocked to True on success.
Source code in pyfamilysafety/application.py
45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 | |
unblock_app
async
¶
unblock_app()
Remove the block on this application.
Posts an app policy update with blockState set to NotBlocked.
Updates :attr:blocked to False on success.
Source code in pyfamilysafety/application.py
67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 | |
from_app_activity_report
classmethod
¶
from_app_activity_report(raw_response, api, user_id)
Converts the activity report into a list of applications.
Source code in pyfamilysafety/application.py
89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 | |