Difference between revisions of "Development:Prana Breath API/Collections:Motivators"
From Olekdia Wiki
(→delete) |
|||
(8 intermediate revisions by 2 users not shown) | |||
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 == | ||
− | * <code>pranabreath:// | + | * <code>pranabreath://motivators/item?cmd=[Command]</code> - Case-insensitive. |
− | * <code>pranabreath:// | + | * <code>pranabreath://motivators/item?[Parameter]=[Value]</code> |
− | + | * <code><nowiki>https://pranabreath.olekdia.com/motivators?cmd=[Command]&[Parameter]=[Value]</nowiki></code> - Case-sensitive. | |
− | * <code><nowiki>https://olekdia.com/ | ||
== Commands == | == Commands == | ||
Line 39: | Line 38: | ||
| | | | ||
==='''create'''=== | ==='''create'''=== | ||
− | | Create the | + | | Create the motivator with certain [[#Parameters|parameters]]. If motivator with such message already exists - new motivator will be created anyway. |
− | * <code>pranabreath:// | + | * <code>pranabreath://motivators?cmd=create&message=TWF5IHRoZSBGb3JjZSBiZSB3aXRoIHlvdSE%3D</code> - Create new motivator. The message should be [https://en.wikipedia.org/wiki/Base64 Base64] encoded for the URL safety. |
− | * <code>pranabreath:// | + | * <code>pranabreath://motivators?cmd=create&message=TWF5IHRoZSBGb3JjZSBiZSB3aXRoIHlvdSE%3D,SGVhbHRoIGlzIGxpdHRsZSBidXQgcmVndWxhciBlZmZvcnRz</code> - Create multiple quantity of motivators, comma-separated each. |
+ | |- | ||
+ | | | ||
− | |||
− | |||
==='''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. | ||
Line 57: | Line 56: | ||
|- | |- | ||
| | | | ||
− | ===''' | + | ==='''message'''=== |
− | | | + | or '''name''' |
− | * <code>pranabreath:// | + | | The message of the motivator itself. |
− | * <code>https://olekdia.com/ | + | * <code>pranabreath://motivators/11?name=TWF5IHRoZSBGb3JjZSBiZSB3aXRoIHlvdSE%3D</code> - Replace message of the motivator with id equals 11 with the text "May the Force be with you!". Again, the message should be [https://en.wikipedia.org/wiki/Base64 Base64] encoded for the URL safety. |
+ | * <code><nowiki>https://pranabreath.olekdia.com/motivators?cmd=create&name=TWF5IHRoZSBGb3JjZSBiZSB3aXRoIHlvdSE%3D</nowiki></code> - Create a motivator with this message. | ||
|} | |} | ||
</div> | </div> |
Latest revision as of 16:06, 1 April 2019
motivators
- Сollection that gives control over motivators in the app.
Prefix
pranabreath://
- Case-insensitive.https://pranabreath.olekdia.com/
- Case-sensitive.https://pranabreath.page.link/?link=https://pranabreath.olekdia.com/
- Case-sensitive.
Syntax
pranabreath://motivators/item?cmd=[Command]
- Case-insensitive.pranabreath://motivators/item?[Parameter]=[Value]
https://pranabreath.olekdia.com/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.
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! ...
|
create |
Create the motivator with certain parameters. If motivator with such message already exists - new motivator will be created anyway.
|
delete |
Delete the selected motivator. If there is no selected motivator - nothing happens.
|
Parameters
Parameter | Description |
---|---|
messageor name |
The message of the motivator itself.
|