edit_friendship

From SmartBots Developers Docs
Jump to: navigation, search

Enables/Disables friend abilities such as Online Status, Show On Map, or Edit Rights

// See "LSL Helper Functions" page for this function
smartbotsAPI("edit_friendship", [
  "slkey", "d11fa786-c342-4785-8e1b-ac70a17a9aac",
  "see_online", "1",
  "see_on_map", "1",
  "can_edit", "0",
]);

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 = edit_friendship
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:
slkey yes UUID of friend to manage permissions
see_online no* 1 = Enable or 0 = Revoke
see_online no* 1 = Enable or 0 = Revoke
see_online no* 1 = Enable or 0 = Revoke
* A minimum of 1 of these settings parameters are required:
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.

Example

Gives a friend the ability to see the online status and location on the map, but revokes edit rights (if the friend already has them)

(the example uses smartbotsAPI() helper function. Set your "apikey", "botname" and "secret" in that function)

// See "LSL Helper Functions" page for this function
smartbotsAPI("edit_friendship", [
  "slkey", "d11fa786-c342-4785-8e1b-ac70a17a9aac",
  "see_online", "1",
  "see_on_map", "1",
  "can_edit", "0",
]);


<< return back to Bot commands

(Miss an API call or parameter? Submit your request in forum)