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

From Olekdia Wiki
(mutePref)
Line 1: Line 1:
<code>settings</code> - collection that gives you control over app's settings.<br/>
+
<code>settings</code> - Сollection that gives you control over app's settings.<br/>
  
 
__TOC__
 
__TOC__
Line 22: Line 22:
 
|  
 
|  
 
==='''list'''===
 
==='''list'''===
| Returns settings list. Currently it is only used in console for retrieving settings list.
+
| Returns settings list. Currently it is used only in console for retrieving settings list.
 
* <code>pranabreath://settings?cmd=list</code>  
 
* <code>pranabreath://settings?cmd=list</code>  
 
<pre>
 
<pre>
Line 34: Line 34:
 
mutePref
 
mutePref
 
</pre>
 
</pre>
* <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.
+
* <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.
 
|-
 
|-
 
|  
 
|  
 
==='''set'''===
 
==='''set'''===
 
| Allows to set a specific setting value.
 
| Allows to set a specific setting value.
* <code>pranabreath://settings/trngChartPref?cmd=set&val=asteroids</code> - Set "Asteroids" [[Settings_tab#Training_chart|training chart]].
+
* <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> - 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> - Set "Asteroids" as a [[Settings_tab#Training_chart|training chart]]. ''Select'' is a default command if ?cmd= is omitted.
 
|}
 
|}
  
Line 52: Line 52:
 
|  
 
|  
 
==='''themePref'''===
 
==='''themePref'''===
| Allows to adjust [[Settings_tab#Theme|theme]] setting.
+
| Allows to adjust [[Settings_tab#Theme|color theme]] setting.
 
* <code>pranabreath://settings/theme?value=dark</code> - Set purple dark theme.<br/>
 
* <code>pranabreath://settings/theme?value=dark</code> - Set purple dark theme.<br/>
 
Possible values:  
 
Possible values:  
Line 124: Line 124:
 
| Allows to adjust mute setting.<br/>
 
| Allows to adjust mute setting.<br/>
 
Possible values:
 
Possible values:
* <code>true</code> - All sounds are muted.
+
* <code>true</code> - Mute all sounds within the app.
* <code>false</code> - All sounds returned to normal volume.
+
* <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^]]

Revision as of 14:28, 1 February 2019

settings - Сollection 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 used only 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 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

themePref

Allows to adjust color theme setting.
  • 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

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.