Location Management » History » Revision 11
Revision 10 (jerome bonnet, 05/26/2015 04:05 PM) → Revision 11/13 (jerome bonnet, 05/26/2015 05:01 PM)
{{>toc}}
h1. Location - loc
The location API is used to retrieve and publish a location of a member or multiple member. The API needs to be used in addition to POI which defines the place management.... In
order to access the API, the client shall be already logged and authenticated with a valid session using the log method detailed above.
h2. locate by place- _locgetbyplace_
The method locgetbyplace enables a logged user to retrieve all the users whom last checked in is defined on a the target placeId.
By sending an HTTP request http://devserver/api/loc/getbyplace?placeId=144_807
*Parameters*:
|*Name*|*Type*|*Description*|
|placeId|String|PlaceId of the Place where you want to list the members who have their last check in in|
The method returns the list of accounts with the information on the place_id.
*Response*:
<pre><code class="javascript">
{
"cn":"locgetbyplace",
"feed":[
{
"modifDate":"2011-07-27T09:25:26.000Z",
"accountId":"130",/* Match Account Id*/
"name":"max",
"medias": [
{
"resolutionY": "523",
"resolutionX": "650",
"metaId": "media/13062_15722",
"pointedByWhat": "profile",
"pictureUrl": "http:\/\/API server\/media\/130_2757?",
"mimeType": "image/png",
"creationDate": "2012-12-13T14:00:50.000Z",
"mediaId": "media/13062_15722",
"pointedBy": "profile/13062_7542",
"bestMoment": "false",
"accountId": "13062",
"readystate": "READY",
"name": "mrburns.png",
"datasize": "26978",
"moodMap": {}
}
],
"placeId":"144_807",
"address":{
"latitudeE6":"48824623",
"attribute3ZipCode":"92310",
"attribute2Town":"Sèvres",
"attribute0Country":"France",
"attribute4Line":"Chemin de Halage",
"radius":"292",
"formattedAddress":"Chemin de Halage, 92310 Sèvres, France",
"longitudeE6":"2228993",
"accuracy":"5",
"attribute1State":"Île-de-France"
},
"moveType":"IN"/* May be IN or OUT*/
}
]
}
</code></pre>
*Error*:
|*Error Code*|*Type*|*Value*|*Description*|
|FizMediaQuotaExceededException|ex|601|Media Quota exceedded|
|FizAccountNotFoundInSessionException|un|501|Session is invalid|
|FizApiInvalidParameterException|un|502|invalid token|
|FizApiModelDoesNotExistException|un|503|Object does not exists|
|FizApiModelRightException|un|504|Right exception to use this method|
h2. Get last positions- _locgetpositions_
The method locgetposition enables a logged user to retrieve all the last position of family members.
By sending an HTTP request http://devserver/api/loc/getpositions?
*Parameters*:
No parameters
The method returns the list of accounts with their last location. In case a member is not in the list, this means that he has never checked in.
*Response*:
<pre><code class="javascript">
{
"cn":"locgetpositions",
"feed":[
{
"modifDate":"2011-07-27T09:25:26.000Z",
"accountId":"130",
"name":"toby",
"medias": [ ],
"placeId":"144_807",
"address":{
"latitudeE6":"48824623",
"attribute3ZipCode":"92310",
"attribute2Town":"Sèvres",
"attribute0Country":"France",
"attribute4Line":"Chemin de Halage",
"radius":"292",
"formattedAddress":"Chemin de Halage, 92310 Sèvres, France",
"longitudeE6":"2228993",
"accuracy":"5",
"attribute1State":"Île-de-France"
},
"moveType":"IN"
},{
"modifDate":"2011-07-27T07:41:07.000Z",
"accountId":"131",
"placeId":"144_759",
"address":{
"latitudeE6":"24950000",
"attribute3ZipCode":"231",
"attribute2Town":"Sindian District",
"attribute0Country":"Taiwan",
"attribute4Line":"",
"radius":"5502",
"formattedAddress":"Sindian District, Xinbei City, Taiwan 231",
"longitudeE6":"121533333",
"accuracy":"5",
"attribute1State":""
},
"moveType":"IN"
},{
"modifDate":"2011-07-27T09:35:57.000Z",
"accountId":"133",
"placeId":"144_782",
"address":{
"latitudeE6":"40759199",
"attribute3ZipCode":"10111",
"attribute2Town":"New York",
"attribute0Country":"United States",
"attribute4Line":"16 W 51st St",
"radius":"306",
"formattedAddress":"16 W 51st St, New York, NY 10111, USA",
"longitudeE6":"-73977651",
"accuracy":"5",
"attribute1State":"New York"
},
"moveType":"IN"
}
]
}
</code></pre>
*Error*:
|*Error Code*|*Type*|*Value*|*Description*|
|FizMediaQuotaExceededException|ex|601|Media Quota exceedded|
|FizAccountNotFoundInSessionException|un|501|Session is invalid|
|FizApiInvalidParameterException|un|502|invalid token|
|FizApiModelDoesNotExistException|un|503|Object does not exists|
|FizApiModelRightException|un|504|Right exception to use this method|
h2. Get last positions- _locpublishaddress_
The method locpublishaddress enables a logged user to post a publish by entering an address, a text and a picture.
By sending an HTTP request http://devserver/api/loc/publishaddress?
*Parameters*:
|*Name*|*Type*|*Description*|
|text|String|text of the checkin|
|authorId|Long|id of the author|
|address|string|address of the check in street,city,county,state,country|
|file|binary or url|files to attach with the check in|
The method returns the iLocation feed.
*Response*:
<pre><code class="javascript">
{
"cn":"locpublishaddress",
"feed":{
"modifDate":"2011-08-01T15:29:20.396Z",
"creationDate":"2011-08-01T15:29:20.395Z",
"text":"test",*/text of the publish*/
"accountId":"130",*/Account Id of the Author*/
"refId":"144_1324",
"pictureURIs":[
"http:\/\/devserver\/media\/144_4693?"*/Small Google Map centered on the address*/
],
"comments":[],
"wallMessageId":"144_6890",*/Reference Id of the wall id*/
"refType":"PLACE_IN"*/Place In Information/*
}
}
</code></pre>
*Error*:
|*Error Code*|*Type*|*Value*|*Description*|
|FizMediaQuotaExceededException|ex|601|Media Quota exceedded|
|FizAccountNotFoundInSessionException|un|501|Session is invalid|
|FizApiInvalidParameterException|un|502|invalid token|
|FizApiModelDoesNotExistException|un|503|Object does not exists|
|FizApiModelRightException|un|504|Right exception to use this method|
h2. Publish a Place Location Event- _locpublishplacelocation_
The method locpublishplacelocation publish a check in in a selected location.
By sending an HTTP request http://devserver/api/loc/publishplacelocation?authorId=bot/95_160&placeId=place/445_988&moveType=IN http://devserver/api/loc/publishauto?
*Parameters*:
|*Name*|*Type*|*Description*|
|authorId|Long|id of the author|
|placeId|String|id |geocodedAddress.accuracy|String|accuracy of the address (0 if a country, 5 if a precise address with street number)|
|geocodedAddress.attribute0Country|string|Country where the address is|
|geocodedAddress.attribute1State|string|State where the address is|
|geocodedAddress.attribute2Town|string|Town where the address is|
|geocodedAddress.attribute3ZipCode|string|Zipcode where the address is|
|geocodedAddress.attribute4Line|string|line of the address (ex : 3 st-james street)|
|geocodedAddress.formattedAddress|string|the well formatted address latitude as an int|
|geocodedAddress.latitudeE6|string|the well formatted address latitude as an int (* 1 000 000)|
|geocodedAddress.longitudeE6|string|the well formatted address longitude as an int (* 1 000 000)|
|geocodedAddress.radius|string|the radius of the place to publish id|
|moveType|string|IN or OUT| in meter|
|file|binary or url|files to attach with the check in|
The method returns the iLocation feed.
*Response*:
<pre><code class="javascript">
{
TBD
}
}
</code></pre>
*Error*:
|*Error Code*|*Type*|*Value*|*Description*|
|FizMediaQuotaExceededException|ex|601|Media Quota exceedded|
|FizAccountNotFoundInSessionException|un|501|Session is invalid|
|FizApiInvalidParameterException|un|502|invalid token|
|FizApiModelDoesNotExistException|un|503|Object does not exists|
|FizApiModelRightException|un|504|Right exception to use this method|
h2. Locate with GPS Position- _locpublishauto_
The method locpublishaddress publishes the location without writing anything on the wall
it will detect if the position is inside a POI according to radius of the POIe.
By sending an HTTP request http://devserver/api/loc/publishaddress ?
*Parameters*:
|*Name*|*Type*|*Description*|
|authorId|Long|id of the author|
|text|String|Text associatedto the check in|
|placeId|String|PlaceId of the Place where the user wants to check in|
|moveType|String|IN,OUT,AUTO action on the place|
|file|binary or url|files to attach with the check in|
The method returns the iwall feed.
*Response*:
<pre><code class="javascript">
{
"cn":"locpublishplacelocation",
"feed":{
"modifDate":"2011-08-01T16:30:00.629Z",
"creationDate":"2011-08-01T16:30:00.629Z",
"text":"test checkin from API",
"accountId":"130",
"refId":"144_807",
"pictureURIs":[],
"comments":[],
"wallMessageId":"144_6926",
"refType":"PLACE_IN"
}
}
</code></pre>
*Error*:
|*Error Code*|*Type*|*Value*|*Description*|
|FizMediaQuotaExceededException|ex|601|Media Quota exceedded|
|FizAccountNotFoundInSessionException|un|501|Session is invalid|
|FizApiInvalidParameterException|un|502|invalid token|
|FizApiModelDoesNotExistException|un|503|Object does not exists|
|FizApiModelRightException|un|504|Right exception to use this method|
h2. Post a Panic Alert- _localarmpanicbutton_
The method localarmpanicbutton enables to post a panic button to all members of the familiy.
By sending an HTTP request http://devserver/api/loc/alarmpanicbutton
*Parameters*:
No Parameters
The method returns the localarmpanicbutton feed.
*Response*:
<pre><code class="javascript">
{
"a00": {
"r": {
"r": "true"
},
"cn": "localarmpanicbutton"
}
}
</code>
</pre>
*Error*:
|*Error Code*|*Type*|*Value*|*Description*|
|FizAccountNotFoundInSessionException|un|501|Session is invalid|
|FizApiInvalidParameterException|un|502|invalid token|
|FizApiModelDoesNotExistException|un|503|Object does not exists|
|FizApiModelRightException|un|504|Right exception to use this method|
h2. Get Geofencing Member lists - _locgetgeofencingsforpublisher_
The method locgetgeofencingsforpublisherenables to display the list of subscribe Places for geofencing.
By sending an HTTP request http://devserver/api/loc/getgeofencingsforpublisher
*Parameters*:
No Parameters
The method returns the locgetgeofencingsforpublisher feed.
*Response*:
<pre><code class="javascript">
{
"a00": {
"r": {
"r": [
{
"familyId": "family/442",
"publisherId": "406",
"in": "true",
"metaId": "placeGeofencing/406_241",
"placeId": "place/442_3525",
"subscriptionStatus": "SUBSCRIBED",
"subscriberId": "7345",
"out": "true"
}
]
},
"cn": "locgetgeofencingsforpublisher"
}
}
</code>
</pre>
*Error*:
|*Error Code*|*Type*|*Value*|*Description*|
|FizAccountNotFoundInSessionException|un|501|Session is invalid|
|FizApiInvalidParameterException|un|502|invalid token|
|FizApiModelDoesNotExistException|un|503|Object does not exists|
|FizApiModelRightException|un|504|Right exception to use this method|
h2. Request Geo Tracking - _locrequestautotrack_
The method locrequestautotrack send a request for geotracking to a family member.
By sending an HTTP request http://devserver/api/loc/crequestautotrack?publisherId=19323
*Parameters*:
|*Name*|*Type*|*Description*|
|publisherId|Long|Id of the publisher|
The method returns the locgetgeofencingsforpublisher feed.
*Response*:
<pre><code class="javascript">
{
"a00": {
"r": {
"r": "true"
},
"cn": "locrequestautotrack"
}
}
</code>
</pre>
*Error*:
|*Error Code*|*Type*|*Value*|*Description*|
|FizAccountNotFoundInSessionException|un|501|Session is invalid|
|FizApiInvalidParameterException|un|502|invalid token|
|FizApiModelDoesNotExistException|un|503|Object does not exists|
|FizApiModelRightException|un|504|Right exception to use this method|
h2. Get Location history - _lochistory_ (deprecated)
The method lochistory display the location history of a certain member from a certain date..
By sending an HTTP request http://devserver/api/loc/crequestautotrack?publisherId=19323
*Parameters*:
|*Name*|*Type*|*Description*|
|Date|String|Date format|
The method returns the lochistory feed.
*Response*:
<pre><code class="javascript">
{
"a00": {
"r": {
"r": {
"size": "0",
"datas": [],
"remain": "0",
"count": "0",
"start": "0"
}
},
"cn": "lochistory"
}
}
</code>
</pre>
*Error*:
|*Error Code*|*Type*|*Value*|*Description*|
|FizAccountNotFoundInSessionException|un|501|Session is invalid|
|FizApiInvalidParameterException|un|502|invalid token|
|FizApiModelDoesNotExistException|un|503|Object does not exists|
|FizApiModelRightException|un|504|Right exception to use this method|
h2. Get Geofencing Member lists - _locgetgeofencingsforpublisher_
The method locgetgeofencingsforpublisherenables to display the list of subscribe Places for geofencing.
By sending an HTTP request http://devserver/api/loc/getgeofencingsforpublisher
*Parameters*:
No Parameters
The method returns the locgetgeofencingsforpublisher feed.
*Response*:
<pre><code class="javascript">
{
"a00": {
"r": {
"r": [
{
"familyId": "family/442",
"publisherId": "406",
"in": "true",
"metaId": "placeGeofencing/406_241",
"placeId": "place/442_3525",
"subscriptionStatus": "SUBSCRIBED",
"subscriberId": "7345",
"out": "true"
}
]
},
"cn": "locgetgeofencingsforpublisher"
}
}
</code>
</pre>
*Error*:
|*Error Code*|*Type*|*Value*|*Description*|
|FizAccountNotFoundInSessionException|un|501|Session is invalid|
|FizApiInvalidParameterException|un|502|invalid token|
|FizApiModelDoesNotExistException|un|503|Object does not exists|
|FizApiModelRightException|un|504|Right exception to use this method|
h2. Request Geo Tracking - _locsetgeofencingsettings_
The method locsetgeofencingsettings set Geofencig request for a certain iPlace and a publisher Id.
By sending an HTTP request http://devserver/api/loc/setgeofencingsettings&placeId=place%2F442_3526&publisherId=19323&in=true&a00out=true
*Parameters*:
|*Name*|*Type*|*Description*|
|publisherId|Long|Id of the publisher|
|placeId|Long|PlaceId of Place of the Family|
|in|Boolean|set settings to In|
|out|Boolean|set settings to out|
The method returns the locsetgeofencingsettings feed.
*Response*:
<pre><code class="javascript">
{
"a00": {
"r": {
"r": {
"familyId": "family/442",
"geolocSharing": "ALWAYS",
"publisherId": "19323",
"in": "true",
"metaId": "placeGeofencing/19323_344",
"placeId": "place/442_3526",
"subscriptionStatus": "SUBSCRIBED",
"subscriberId": "406",
"out": "true"
}
},
"cn": "locsetgeofencingsettings"
}
}
</code>
</pre>
*Error*:
|*Error Code*|*Type*|*Value*|*Description*|
|FizAccountNotFoundInSessionException|un|501|Session is invalid|
|FizApiInvalidParameterException|un|502|invalid token|
|FizApiModelDoesNotExistException|un|503|Object does not exists|
|FizApiModelRightException|un|504|Right exception to use this method|