Difference between revisions of "Development:Prana Breath API/Collections:Reminders"
From Olekdia Wiki
(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...") |
|||
(9 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
− | <code>reminders</code>, or <code>rems</code> - | + | <code>reminders</code>, or <code>rems</code> - Сollection that gives control over app's [[Reminders_tab|reminders]].<br/> |
__TOC__ | __TOC__ | ||
Line 6: | Line 6: | ||
== Prefix == | == Prefix == | ||
* <code>pranabreath://</code> - Case-insensitive. | * <code>pranabreath://</code> - Case-insensitive. | ||
− | * <code><nowiki>https://olekdia.com | + | * <code><nowiki>https://pranabreath.olekdia.com/</nowiki></code> - Case-sensitive. |
− | * <code><nowiki>https://pranabreath.page.link/?link=https://olekdia.com | + | * <code><nowiki>https://pranabreath.page.link/?link=https://pranabreath.olekdia.com/</nowiki></code> - Case-sensitive. |
== Syntax == | == Syntax == | ||
Line 13: | Line 13: | ||
* <code>pranabreath://reminders/item?[Parameter]=[Value]</code> | * <code>pranabreath://reminders/item?[Parameter]=[Value]</code> | ||
* <code>pranabreath://reminders/item?cmd=[Command]&[Parameter1]=[Value1]&[Parameter2]=[Value2]</code> | * <code>pranabreath://reminders/item?cmd=[Command]&[Parameter1]=[Value1]&[Parameter2]=[Value2]</code> | ||
− | * <code><nowiki>https://olekdia.com | + | * <code><nowiki>https://pranabreath.olekdia.com/reminders?cmd=[Command]&[Parameter]=[Value]</nowiki></code> - Case-sensitive. |
== Commands == | == Commands == | ||
Line 23: | Line 23: | ||
| | | | ||
==='''list'''=== | ==='''list'''=== | ||
− | | Returns reminders list. Currently it is only | + | | Returns reminders list. Currently it is used only in console for retrieving reminders list. |
* <code>pranabreath://reminders?cmd=list</code> | * <code>pranabreath://reminders?cmd=list</code> | ||
<pre> | <pre> | ||
− | + | id time training when | |
− | + | 16 07:30 Power Every day | |
− | + | 6 18:00 Clear mind Every day | |
− | + | 8 10:00 Heart rate Sunday | |
− | + | 10 10:03 Blood circulation Sunday | |
− | + | 11 10:05 Buteyko test Sunday | |
− | + | 3 10:10 Genchi test Sunday | |
− | |||
− | |||
− | |||
</pre> | </pre> | ||
− | * <code>pranabreath://reminders</code> - It is a default command | + | * <code>pranabreath://reminders</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. |
|- | |- | ||
| | | | ||
==='''create'''=== | ==='''create'''=== | ||
− | | Create the | + | | Create the reminder with defined [[#Parameters|parameters]]. |
− | * <code>pranabreath:// | + | * <code>pranabreath://reminders?cmd=create&time=18_30&pid=1</code> - Create a reminder for the training with id equals 1 to 18:30 (6:30 PM). |
− | |||
|- | |- | ||
| | | | ||
==='''delete'''=== | ==='''delete'''=== | ||
− | | Delete the selected | + | | Delete the selected reminder. If there is no input reminder - nothing happens. |
− | * <code> | + | * <code><nowiki>https://pranabreath.olekdia.com/reminders/13?cmd=delete</nowiki></code> - Delete reminder with id 13. |
− | |||
|} | |} | ||
Line 59: | Line 54: | ||
|- | |- | ||
| | | | ||
− | ===''' | + | ==='''pid'''=== |
− | | | + | | Parent ID, reference to the training of the reminder. |
− | * <code>pranabreath:// | + | * <code>pranabreath://reminders/3?pid=5</code> - Set a reminder with id equals 3 for a training with id equals 5. |
− | |||
|- | |- | ||
| | | | ||
− | ===''' | + | ==='''enabled'''=== |
− | | | + | | Represents the state of reminder. Value range is [true, false]. |
− | * <code>pranabreath:// | + | * <code>pranabreath://rems/5?enabled=false</code> - Disable the reminder with id equals 5. |
|- | |- | ||
− | | | + | | |
− | ===''' | + | ==='''time'''=== |
− | | | + | | Reminder triggering time (it uses 24 hours format: <code>hh_mm</code>). |
− | * <code>pranabreath:// | + | * <code>pranabreath://rems/4?time=09_30</code> - Set the reminder time with id equals 4 to 09:30 |
|- | |- | ||
− | | | + | | |
− | ===''' | + | ==='''message'''=== |
− | | | + | | Message of the reminder. If not specified - reminder has random motivator as a message. |
− | * <code>pranabreath:// | + | * <code>pranabreath://rems/1?message=VGhpcyB0cmFpbmluZyBpcyByZWFsbHkgaGVscGZ1bCBhZnRlciBsb25nIGNvbmNlbnRyYXRpb24</code> - Set the reminder message with id equals 1 to "This training is really helpful after long concentration". It totally replaces the previous message if it exists. The message should be [https://en.wikipedia.org/wiki/Base64 Base64] encoded for URL safety. |
|} | |} | ||
</div> | </div> |
Latest revision as of 16:06, 1 April 2019
reminders
, or rems
- Сollection that gives control over app's reminders.
Contents
Prefix
pranabreath://
- Case-insensitive.https://pranabreath.olekdia.com/
- Case-sensitive.https://pranabreath.page.link/?link=https://pranabreath.olekdia.com/
- 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://pranabreath.olekdia.com/reminders?cmd=[Command]&[Parameter]=[Value]
- Case-sensitive.
Commands
Command | Description |
---|---|
list |
Returns reminders list. Currently it is used only in console for retrieving reminders list.
id time training when 16 07:30 Power Every day 6 18:00 Clear mind Every day 8 10:00 Heart rate Sunday 10 10:03 Blood circulation Sunday 11 10:05 Buteyko test Sunday 3 10:10 Genchi test Sunday
|
create |
Create the reminder with defined parameters.
|
delete |
Delete the selected reminder. If there is no input reminder - nothing happens.
|
Parameters
Parameter | Description |
---|---|
pid |
Parent ID, reference to the training of the reminder.
|
enabled |
Represents the state of reminder. Value range is [true, false].
|
time |
Reminder triggering time (it uses 24 hours format: hh_mm ).
|
message |
Message of the reminder. If not specified - reminder has random motivator as a message.
|