Difference between revisions of "HTTP API/Bot Commands/parcel info"
(Created page with "{{DISPLAYTITLE: parcel_info (HTTP Bot Command)}} <onlyinclude>Returns a lot of information about a parcel.</onlyinclude> {{API Variables Table}} {{API HTTP Required Vars|par...") |
|||
Line 1: | Line 1: | ||
− | {{DISPLAYTITLE: parcel_info | + | {{DISPLAYTITLE: parcel_info}} |
<onlyinclude>Returns a lot of information about a parcel.</onlyinclude> | <onlyinclude>Returns a lot of information about a parcel.</onlyinclude> | ||
Revision as of 15:50, 29 June 2016
Returns a lot of information about a parcel.
Variables
The following table shows input values (you send them with the API call) and returned output values.
Variable | Required | Description | ||
---|---|---|---|---|
This API command applies only for Standard bot | ||||
Input basic parameters: | ||||
action | yes | = 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 point in parcel | ||
y | optional | the Y coordinate of the point in parcel | ||
getvalue | optional | limit return list to this entry (see return values below) | ||
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. | |||
*** | A lot of variables, see below |
Comments
This API request returns a lot of information about a parcel. You can retrieve the information about:
- a parcel at a specific point (using x and y coordinates) or
- current bot's parcel (don't set x and y to fetch this info)
Return values
This request returns a lot of information about the parcel. The following entries are being returned:
Entry | Description |
---|---|
parcel_area | Parcel area, in m2 |
parcel_claimdate | The date when parcel was created/claimed |
parcel_description | Description of the parcel. IMPORTANT: the description is being URL-escaped (it can contain new-line characters). Use llUnescapeURL() function to decode. |
parcel_group | The UUID of the parcel group. |
parcel_groupowned | Contains True if parcel is group owned. |
parcel_groupprims | Total number of primitives owned by the parcel group on this parcel |
parcel_maxprims | Maximum number of primitives this parcel supports |
parcel_totalprims | Total number of primitives on this parcel |
parcel_musicurl | The music URL of the parcel |
parcel_cleantime | Auto-return time (minutes) |
parcel_owner | Parcel owner UUID |
parcel_ownerprims | The number of prims owned by the parcel owner (resident or group) |
parcel_saleprice | The price of the parcel (if parcel is for sale) |
parcel_snapshot | Key of parcel snapshot |
parcel_landingpoint | The landing point of the parcel |
parcel_flags | Various flags, separated by commas |
Limiting the number of return values
parcel_info API request returns a lot of data which may be critical for LSL scripts. To limit return entries to specific one, use a getvalue parameter (see examples).
Examples
1. Get all information about parcel the bot is on:
action=parcel_info
2. Get the group UUID of the current bot's parcel:
action=parcel_info&getvalue=group
3. Get the number of owner's prims at point <25,32,0>:
action=parcel_info&getvalue=ownerprims&x=25&y=32
<< return back to Bot commands
(Miss an API call or parameter? Submit your request in forum)