Development:Prana Breath API/Collections:Reminders

From Olekdia Wiki
< Development:Prana Breath API
Revision as of 14:13, 1 February 2019 by Oleksandr (talk | contribs) (Created page with "<code>reminders</code>, or <code>rems</code> - collection that gives you control over reminders in the app.<br/> __TOC__ <div class="api-table long-code"> == Prefix == * <co...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

reminders, or rems - collection that gives you control over reminders 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://reminders/item?cmd=[Command] - Case-insensitive.
  • pranabreath://reminders/item?[Parameter]=[Value]
  • pranabreath://reminders/item?cmd=[Command]&[Parameter1]=[Value1]&[Parameter2]=[Value2]
  • https://olekdia.com/pranabreath/reminders?cmd=[Command]&[Parameter]=[Value] - Case-sensitive.

Commands

Command Description

list

Returns reminders list. Currently it is only used in console for retrieving reminders list.
  • pranabreath://reminders?cmd=list
pos id public_id name
0   1  1         Clear mind
1   2  2         Relax
2   3  3         Calming
3   4  4         Power
4   5  5         Harmony
5   6  6         Anti-stress
6   7  7         Anti-appetite
7   8  8         Cigarette replace
8   9  11        Bhastrika
  • pranabreath://reminders - 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.

create

Create the training with defined parameters. If training with such name already exists - new training will not be created. Instead all parameters will be applied to this training.
  • pranabreath://trainings?cmd=create&name=Serenity&trng_type=1 - Create meditation with name "Serenity".
  • 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,]} - Create training with name "4_7_8_Breathing", with 5 seconds preparing time, and 4:7:8:0 ratio

delete

Delete the selected training. If there is no the input training - nothing happens.
  • pranabreath://trngs/14?cmd=delete - Delete training with id 14.
  • pranabreath://trngs/Relax?cmd=delete - Delete the Relax training.

Parameters

Parameter Description

name

Name of the training.

public_id

Indicates public id of the training. All trainings in this list have their own public_id. Readonly value.
  • pranabreath://trngs?cmd=import&public_id=25 - Import training with public_id equals 25 which is Ha breathing training.

trng_type

Is a kind of the training. Value range is [0 - breathing session, 1 - meditation].
  • pranabreath://trainings?cmd=create&name=Serenity&trng_type=1 - Create meditation with name "Serenity".

pos

Position of the training in the training list.
  • pranabreath://trainings/Clear_mind?pos=9999 - Move the Clear mind training to the very bottom of the list.