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

From Olekdia Wiki
(name)
(create)
Line 38: Line 38:
 
|  
 
|  
 
==='''create'''===
 
==='''create'''===
| Create the training with certain [[#Parameters|parameters]]. If training with such name already exists - new training will not be created. Instead all parameters will be applied to existing training.
+
| Create the motivator with certain [[#Parameters|parameters]]. If motivator with such message already exists - new motivator will be created anyway.
* <code>pranabreath://trainings?cmd=create&name=Serenity&trng_type=1</code> - Create [[Training_kind#Meditation|meditation]] named "Serenity".
+
* <code>pranabreath://motivators?cmd=create&name=Blalbalba</code> - Create new motivator.
* <code>pranabreath://trainings?cmd=create&name=4_7_8_Breathing&dur_prep_time=5000&trng_cycles={"mValues":[{"mInhaleUnit":4,"mRetainUnit":7,"mExhaleUnit":8,"mMethodsBitSet":129,"mSecPerUnit":1000}],"mKeys":[0,]}</code> - Create training named "4_7_8_Breathing", with 5 seconds [[Preparing time|preparing time]], and 4:7:8:0 [[Ratio_of_breath_cycle|ratio]].
+
|-
 +
|
  
|-
 
|
 
 
==='''delete'''===
 
==='''delete'''===
 
| Delete the selected motivator. If there is no selected motivator - nothing happens.
 
| Delete the selected motivator. If there is no selected motivator - nothing happens.

Revision as of 17:50, 1 February 2019

motivators - Сollection that gives control over motivators in the app.

Prefix

  • pranabreath:// - Case-insensitive.
  • https://olekdia.com/pranabreath/ - Case-sensitive.
  • https://pranabreath.page.link/?link=https://olekdia.com/pranabreath/ - Case-sensitive.

Syntax

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

Commands

Command Description

list

Returns training list. Currently it is used only in console for retrieving a training list.
  • pranabreath://motivators?cmd=list
id name
1  "Start from Monday" - is that familiar?
2  No more reasons to delay!
3  Find the time for your health!
4  The work will still be there, so pause and breath!
5  Remember, how's that - to breathe freely?
6  It's time to invest in your health!
...
  • pranabreath://motivators - It is a default command if collection is defined without an item, so if we omit the command it will return the same result.

create

Create the motivator with certain parameters. If motivator with such message already exists - new motivator will be created anyway.
  • pranabreath://motivators?cmd=create&name=Blalbalba - Create new motivator.

delete

Delete the selected motivator. If there is no selected motivator - nothing happens.
  • pranabreath://motivators/14?cmd=delete - Delete the motivator with id equals 14.

Parameters

Parameter Description

message

or name

Actually the message of the motivator.