Difference between revisions of "Development:Prana Breath API/Collections:Settings"

From Olekdia Wiki
(Created page with "<code>settings</code> - collection that gives you control over app's settings.<br/> __TOC__ <div class="api-table long-code"> == Prefix == * <code>pranabreath://</code> * <c...")
 
Line 10: Line 10:
  
 
== Syntax ==
 
== Syntax ==
* <code>pranabreath://settings/item?value=[Value]</code> - Case-insensitive.  
+
* <code>pranabreath://settings/item?val=[Value]</code> - Case-insensitive.  
* <code><nowiki>https://olekdia.com/pranabreath/settings?value=[Value]</nowiki></code> - Case-sensitive.
+
* <code>pranabreath://settings/item?cmd=[Command]&val=[Value]</code>
 +
* <code><nowiki>https://olekdia.com/pranabreath/settings?val=[Value]</nowiki></code> - Case-sensitive.
  
 
== Commands ==
 
== Commands ==
Line 21: Line 22:
 
|  
 
|  
 
==='''list'''===
 
==='''list'''===
| Allows adjust [[Settings_tab#Theme|theme]] of the app.
+
| Returns settings list. Currently it is only used in console for retrieving settings list.
* <code>pranabreath://theme?value=list</code>  
+
* <code>pranabreath://settings?cmd=list</code>  
 
<pre>
 
<pre>
id name
+
Items:
-1 shtange
+
themePref
-2 genchi
+
screenBehaviorPref
-3 buteyko
+
notifBehaviorPref
-4 heart_rate
+
breathMethodsOrientPref
-5 blood_circulation
+
trngChartPref
 +
statChartPref
 +
mutePref
 
</pre>
 
</pre>
* <code>pranabreath://tests</code> - It is a default command when only ''collection'' is defined without an ''item'', so if we omit the ''command'' it will return the same result.
+
* <code>pranabreath://settings</code> - It is a default command when only ''collection'' is defined without an ''item'', so if we omit the ''command'' it will return the same result.
 
|-
 
|-
 
|  
 
|  
==='''change'''===
+
==='''set'''===
| Select the specified health test. Command [[#start|start]] have despite its own effects have also select effect.
+
| Allows to set a specific setting value.
* <code>pranabreath://tests/Genchi?cmd=select</code> - Select the [[Genchi test]].
+
* <code>pranabreath://settings/trngChartPref?cmd=set&val=asteroids</code> - Set "Asteroids" [[Settings_tab#Training_chart|training chart]].
* <code>pranabreath://tests/Genchi</code> - It is default command when ''item'' is specified, so it will have the same impact that above example.
+
* <code>pranabreath://settings/trngChartPref?val=asteroids</code> - It is default command when ''item'' is specified, so it will have the same impact that above example.
 
|}
 
|}
  
Line 55: Line 58:
 
|  
 
|  
 
==='''screenBehaviorPref'''===
 
==='''screenBehaviorPref'''===
| Select the specified health test. Command [[#start|start]] have despite its own effects have also select effect.
+
| TODO
 +
|-
 +
|
 +
==='''trngChartPref'''===
 +
| TODO
 +
|-
 +
|
 +
==='''statChartPref'''===
 +
| TODO
 +
|-
 +
|
 +
==='''notifBehaviorPref'''===
 +
| TODO
 +
|-
 +
|
 +
==='''breathMethodsOrientPref'''===
 +
| TODO
 +
|-
 +
|
 +
==='''mutePref'''===
 +
| TODO
 
|}
 
|}
  
 
{{DISPLAYTITLE:<span style="position:absolute; top:-9999px;">Development:</span>Prana Breath API/Collections:Settings}}
 
{{DISPLAYTITLE:<span style="position:absolute; top:-9999px;">Development:</span>Prana Breath API/Collections:Settings}}
 
[[Category:Dev{{#translation:}}|^Prana Breath^]]
 
[[Category:Dev{{#translation:}}|^Prana Breath^]]

Revision as of 12:49, 1 February 2019

settings - collection that gives you control over app's settings.

Prefix

  • pranabreath://
  • https://olekdia.com/pranabreath/
  • https://pranabreath.page.link/?link=https://olekdia.com/pranabreath/

Syntax

  • pranabreath://settings/item?val=[Value] - Case-insensitive.
  • pranabreath://settings/item?cmd=[Command]&val=[Value]
  • https://olekdia.com/pranabreath/settings?val=[Value] - Case-sensitive.

Commands

Command Description

list

Returns settings list. Currently it is only used in console for retrieving settings list.
  • pranabreath://settings?cmd=list
Items:
themePref
screenBehaviorPref
notifBehaviorPref
breathMethodsOrientPref
trngChartPref
statChartPref
mutePref
  • pranabreath://settings - It is a default command when only collection is defined without an item, so if we omit the command it will return the same result.

set

Allows to set a specific setting value.
  • pranabreath://settings/trngChartPref?cmd=set&val=asteroids - Set "Asteroids" training chart.
  • pranabreath://settings/trngChartPref?val=asteroids - It is default command when item is specified, so it will have the same impact that above example.


Items

Item Description

themePref

Allows to adjust theme of the app.
  • pranabreath://settings/theme?value=dark - Set purple dark theme.
  • Possible values: light, dark, blue_light, blue_dark, gray_light, gray_dark, green_light, green_dark, olive_light, olive_dark, yellow_light, yellow_dark, red_light, red_dark, white, black

screenBehaviorPref

TODO

trngChartPref

TODO

statChartPref

TODO

notifBehaviorPref

TODO

breathMethodsOrientPref

TODO

mutePref

TODO