Difference between revisions of "HTTP API/Bot Commands/set parcel info"
From SmartBots Developers Docs
(Created page with "{{DISPLAYTITLE: set_parcel_info}} <onlyinclude>Updates parcel details</onlyinclude> {{API Variables Table}} {{API HTTP Required Vars|set_parcel_info}} {{API Variable Group|...") |
|||
(8 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
{{DISPLAYTITLE: set_parcel_info}} | {{DISPLAYTITLE: set_parcel_info}} | ||
− | <onlyinclude>Updates parcel details</onlyinclude> | + | <onlyinclude>Updates parcel details (deprecated, see [[/parcel_info_update|parcel_info_update]])</onlyinclude> |
{{API Variables Table}} | {{API Variables Table}} | ||
Line 7: | Line 7: | ||
{{API Variable Group|Input}} | {{API Variable Group|Input}} | ||
− | {{API Variable|x|no}} the X coordinate of the parcel | + | {{API Variable|x|no}} the X coordinate of the parcel (default - bot position) |
− | {{API Variable|y|no}} the Y coordinate of the parcel | + | {{API Variable|y|no}} the Y coordinate of the parcel (default - bot position) |
{{API Variable|entry|yes}} the parcel entry to update (see the list below) | {{API Variable|entry|yes}} the parcel entry to update (see the list below) | ||
{{API Variable|value|yes}} the value to set | {{API Variable|value|yes}} the value to set | ||
Line 19: | Line 19: | ||
== Available parcel entries == | == Available parcel entries == | ||
− | It is possible to update the following parcel entries: | + | It is possible to update the following parcel entries. Set ''entry'' to: |
− | * name - the name of parcel | + | * '''name''' - set the name of parcel |
− | * description- the | + | ** ''value'' parameter - the new parcel name |
− | * music_url - parcel music URL | + | * '''description''' - set the parcel description |
− | * for_sale - make parcel available for sale | + | ** ''value'' parameter - the new parcel description |
− | ** on - set parcel for sale | + | * '''music_url''' - set the parcel music URL |
− | ** off - don't sell parcel | + | ** ''value'' parameter - the new music URL |
− | ** ''price'' - the parcel price (required but ignored for "don't sell"); | + | * '''for_sale''' - make the parcel available for sale |
+ | **''value'' parameter format: on|off ''price'' | ||
+ | *** on - set parcel for sale | ||
+ | *** off - don't sell parcel | ||
+ | *** ''price'' - the parcel price (required but ignored for "don't sell"); | ||
== Permissions == | == Permissions == | ||
Line 39: | Line 43: | ||
== Return values == | == Return values == | ||
− | The command returns | + | The command returns |
− | + | result=OK | |
+ | |||
+ | if parcel update succeed. | ||
{{HTTP API Bot - standard footer}} | {{HTTP API Bot - standard footer}} |
Latest revision as of 17:50, 26 June 2019
Updates parcel details (deprecated, see parcel_info_update)
Variables
The following table shows input values (you send them with the API call) and returned output values.
Variable | Required | Description | ||
---|---|---|---|---|
Input basic parameters: | ||||
action | yes | = set_parcel_info | ||
apikey | yes | Your personal developer's API key. | ||
botname | yes | Your bot's SL login. | ||
secret | yes | Bot access code of your bot. | ||
dataType | optional | Set to "json" to get JSON reply instead of URL-encoded string | ||
custom | optional | The custom data (string) to be passed back to caller script. This value will be returned back to the caller in HTTP response. | ||
Input: | ||||
x | optional | the X coordinate of the parcel (default - bot position) | ||
y | optional | the Y coordinate of the parcel (default - bot position) | ||
entry | yes | the parcel entry to update (see the list below) | ||
value | yes | the value to set | ||
Output: | ||||
(to be received in http_response LSL event, see docs for details) | ||||
result | OK - command completed successfully FAIL - command failed | |||
resulttext | Detailed reason for the failure. | |||
custom | The value from input "custom" parameter. See above. |
Available parcel entries
It is possible to update the following parcel entries. Set entry to:
- name - set the name of parcel
- value parameter - the new parcel name
- description - set the parcel description
- value parameter - the new parcel description
- music_url - set the parcel music URL
- value parameter - the new music URL
- for_sale - make the parcel available for sale
- value parameter format: on|off price
- on - set parcel for sale
- off - don't sell parcel
- price - the parcel price (required but ignored for "don't sell");
- value parameter format: on|off price
Permissions
Your bot has to own the parcel, or have some of the permissions:
- Parcel identity > "Change parcel name, description, and 'Moderate Content' setting"
- Parcel settings > "Change music & media settings"
- Parcel Management > "Set land for sale info"
Return values
The command returns
result=OK
if parcel update succeed.
<< return back to Bot commands
(Miss an API call or parameter? Submit your request in forum)