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...")
 
(list)
 
(16 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<code>settings</code> - collection that gives you control over app's settings.<br/>
+
<code>settings</code> - Сollection that gives control over app's [[Settings_tab|settings]].<br/>
  
 
__TOC__
 
__TOC__
Line 6: Line 6:
 
== Prefix ==
 
== Prefix ==
 
* <code>pranabreath://</code>
 
* <code>pranabreath://</code>
* <code><nowiki>https://olekdia.com/pranabreath/</nowiki></code>
+
* <code><nowiki>https://pranabreath.olekdia.com/</nowiki></code>
* <code><nowiki>https://pranabreath.page.link/?link=https://olekdia.com/pranabreath/</nowiki></code>
+
* <code><nowiki>https://pranabreath.page.link/?link=https://pranabreath.olekdia.com/</nowiki></code>
  
 
== 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://pranabreath.olekdia.com/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 used only 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
+
theme
-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 if ''collection'' is defined without an ''item'', so if we omit the ''command'' it will return the same result.
 
|-
 
|-
|  
+
|
==='''change'''===
+
 
| Select the specified health test. Command [[#start|start]] have despite its own effects have also select effect.
+
==='''set'''===
* <code>pranabreath://tests/Genchi?cmd=select</code> - Select the [[Genchi test]].
+
| Allows to set a specific setting value.
* <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?cmd=set&val=asteroids</code> - Set "Asteroids" as a [[Settings_tab#Training_chart|training chart]].
 +
* <code>pranabreath://settings/trngChartPref?val=asteroids</code> - Set "Asteroids" as a [[Settings_tab#Training_chart|training chart]]. ''Select'' is a default command if ?cmd= is omitted.
 
|}
 
|}
  
Line 48: Line 52:
 
|-
 
|-
 
|  
 
|  
==='''themePref'''===
+
==='''theme'''===
| Allows to adjust [[Settings_tab#Theme|theme]] of the app.
+
| Allows to adjust [[Settings_tab#Theme|color theme]] setting.
* <code>pranabreath://settings/theme?value=dark</code> - Set purple dark theme.
+
* <code>pranabreath://settings/theme?value=dark</code> - Set purple dark theme.<br/>
* Possible values: <code>light</code>, <code>dark</code>, <code>blue_light</code>, <code>blue_dark</code>, <code>gray_light</code>, <code>gray_dark</code>, <code>green_light</code>, <code>green_dark</code>, <code>olive_light</code>, <code>olive_dark</code>, <code>yellow_light</code>, <code>yellow_dark</code>, <code>red_light</code>, <code>red_dark</code>, <code>white</code>, <code>black</code>
+
Possible values:  
 +
* <code>violet</code>
 +
* <code>blue</code>
 +
* <code>olive</code>
 +
* <code>gray</code>
 +
* <code>green</code>
 +
* <code>yellow</code>
 +
* <code>red</code>
 +
* <code>monochromatic</code>
 
|-
 
|-
|  
+
|
 +
 
 
==='''screenBehaviorPref'''===
 
==='''screenBehaviorPref'''===
| Select the specified health test. Command [[#start|start]] have despite its own effects have also select effect.
+
| Allows to adjust [[Settings_tab#Screen_during_training|screen during training]] setting.<br/>
 +
Possible values:
 +
* <code>def</code>
 +
* <code>off</code>
 +
* <code>on</code>
 +
* <code>animCycle</code>
 +
* <code>animPhase</code>
 +
|-
 +
|
 +
 
 +
==='''trngChartPref'''===
 +
| Allows to adjust [[Settings_tab#Training_chart|training chart]] setting.<br/>
 +
Possible values:
 +
* <code>none</code>
 +
* <code>ring</code>
 +
* <code>line</code>
 +
* <code>sphere</code>
 +
* <code>asteroids</code>
 +
|-
 +
|
 +
 
 +
==='''statChartPref'''===
 +
| Allows to adjust [[Settings_tab#Statistics_chart|statistics chart]] setting.<br/>
 +
Possible values:
 +
* <code>bar</code>
 +
* <code>line</code>
 +
|-
 +
|
 +
 
 +
==='''notifBehaviorPref'''===
 +
|  Allows to adjust [[Settings_tab#Notification|notification during training]] setting.<br/>
 +
Possible values:
 +
* <code>TIME</code>
 +
* <code>PROGRESS</code>
 +
* <code>TIME,PROGRESS</code>
 +
|-
 +
|
 +
 
 +
==='''breathMethodsOrientPref'''===
 +
| Allows to adjust [[Settings_tab#Breath_methods|breath methods]] setting.<br/>
 +
Possible values:
 +
* <code>0</code> - "As it is"
 +
* <code>1</code> - "As in a mirror"
 +
|-
 +
|
 +
 
 +
==='''mutePref'''===
 +
| Allows to adjust mute setting.<br/>
 +
Possible values:
 +
* <code>true</code> - Mute all sounds within the app.
 +
* <code>false</code> - Return sounds to normal volume.
 
|}
 
|}
  
 
{{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^]]

Latest revision as of 10:55, 28 November 2019

settings - Сollection that gives control over app's settings.

Prefix

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

Syntax

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

Commands

Command Description

list

Returns settings list. Currently it is used only in console for retrieving settings list.
  • pranabreath://settings?cmd=list
Items:
theme
screenBehaviorPref
notifBehaviorPref
breathMethodsOrientPref
trngChartPref
statChartPref
mutePref
  • pranabreath://settings - It is a default command if 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" as a training chart.
  • pranabreath://settings/trngChartPref?val=asteroids - Set "Asteroids" as a training chart. Select is a default command if ?cmd= is omitted.


Items

Item Description

theme

Allows to adjust color theme setting.
  • pranabreath://settings/theme?value=dark - Set purple dark theme.

Possible values:

  • violet
  • blue
  • olive
  • gray
  • green
  • yellow
  • red
  • monochromatic

screenBehaviorPref

Allows to adjust screen during training setting.

Possible values:

  • def
  • off
  • on
  • animCycle
  • animPhase

trngChartPref

Allows to adjust training chart setting.

Possible values:

  • none
  • ring
  • line
  • sphere
  • asteroids

statChartPref

Allows to adjust statistics chart setting.

Possible values:

  • bar
  • line

notifBehaviorPref

Allows to adjust notification during training setting.

Possible values:

  • TIME
  • PROGRESS
  • TIME,PROGRESS

breathMethodsOrientPref

Allows to adjust breath methods setting.

Possible values:

  • 0 - "As it is"
  • 1 - "As in a mirror"

mutePref

Allows to adjust mute setting.

Possible values:

  • true - Mute all sounds within the app.
  • false - Return sounds to normal volume.