Location Management » History » Revision 1
Revision 1/13
| Next »
Eric Vieillevigne, 05/12/2015 01:35 PM
- Table of contents
- Location - loc
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.
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:
{
"cn":"locgetbyplace",
"feed":[
{
"modifDate":"2011-07-27T09:25:26.000Z",
"accountId":"130",/* Match Account Id*/
"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*/
}
]
}
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 |
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:
{
"cn":"locgetpositions",
"feed":[
{
"modifDate":"2011-07-27T09:25:26.000Z",
"accountId":"130",
"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"
}
]
}
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 |
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 |
| 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:
{
"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/*
}
}
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 |
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/publishauto?
Parameters:| Name | Type | Description |
| 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 in meter |
| file | binary or url | files to attach with the check in |
The method returns the iLocation feed.
Response:
{
TBD
}
}
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 |
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 |
| 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:
{
"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"
}
}
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 |
Updated by Eric Vieillevigne over 10 years ago · 1 revisions