Zum Hauptinhalt springen

ShareLocation

Class Description

Share you location.

RPC Configuration

Rpc Name:

Plain: ShareLocation
Sha1: 5c741ce050631a3dfd44651c25f948d8a1fa876e
Rpc Call

RPCs can be called by their plain name or their SHA1 representation.

Rpc Parameters:

"userToken" : string,
"sharedSecret" : string,
"lat" : float,
"lon" : float,
"alias" : ?string = null,
"description" : ?string = null,
"building_id" : ?int = null,
"floor" : ?int = null,
"validForMinutes" : int = 60,
"forceRecreate" : bool = ,
"updateOnly" : bool =
Parameter Description

Share a new Location.
@param ?string alias Give the current Alias to Update or Empty Alias (null) to create a new Share.


@param ?string description Set an optional share description to state your reason for sharing the location


@param ?integer building_id The desired guide the share should be bound to.


@param ?integer floor The floor level the share is currently on. If left empty => groundfloor


@param int validForMinutes The time in minutes this share will be valid into for. New Position updates can be posted during this period.


@param bool forceRecreate Will remove the current share with the given alias and recreate a completely new one, with the same alias.


@param bool updateOnly Configure updateOnly to true, if just the location changed, but no metadata.


@return array|null

Requires Login:

true

Requires Context:

Context

The context providing parameter can either be a contagt-id (8-Bytes, Alphaumeric) or an integer as a building id. The context parameter name should make the choice obviouse, the type has not to be defined manually.

false

Requires WriteAccess:

WriteAccess

Only accounts that have an explicit write access to the defined context can execute this RPC, no matter if the authentication level matches or not.

false

Requires AuthenticationLevel:

Context

Authentication levels allow the SuperUser to define a by-RPC granular access configuration. If RPCs are chained in a single unified call and lenient is enabled, all allowed RPCs will be executed, while execution will fail entirely with lenient set to false.

STANDARD_USER

Requires Subbuilding Merge Strategy:

REPLACE

Cache Configuration

Response Cache

All writing RPCs are not Cacheable, also Caching will be disabled by the paramters nocache and readonly.

Cache enabled:

false

Account Method Authentication

This RPC requires Account Method Authenticaton with the following configuration:

Requires Account Login:

tipp

The Account login is not the default api login. See LoginViaUser and LoginViaEmail

true

Account Usertoken Parameter Name:

tipp

This Usertoken is not the same one, as the api login usertoken.

userToken

Account Shared Secret Parameter Name:

sharedSecret

Requires Asset Permission:

false

Sample Request

->

{
"userToken": "MX8Tndlt3Qx5LdSsygHfq8gJd3v5Qdb4HKfuD7qXKo5RFU3fF1W7dQeHvEqg1eBL",
"sharedSecret": "ea75c32046a8be46a47474931df9ffe4",
"lat": 49.87654,
"lon": 8.56789,
"alias": "My_Sharing_Test",
"description": "Der Sharing Test",
"building_id": 131,
"floor": 1
}

<-

{
"pintag": "s0ha8j539g",
"alias": "My_Sharing_Test"
}