Location Management » History » Version 1
Eric Vieillevigne, 05/12/2015 01:35 PM
| 1 | 1 | Eric Vieillevigne | {{>toc}} |
|---|---|---|---|
| 2 | |||
| 3 | h1. Location - loc |
||
| 4 | |||
| 5 | 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 |
||
| 6 | |||
| 7 | order to access the API, the client shall be already logged and authenticated with a valid session using the log method detailed above. |
||
| 8 | |||
| 9 | h2. locate by place- _locgetbyplace_ |
||
| 10 | |||
| 11 | The method locgetbyplace enables a logged user to retrieve all the users whom last checked in is defined on a the target placeId. |
||
| 12 | |||
| 13 | By sending an HTTP request http://devserver/api/loc/getbyplace?placeId=144_807 |
||
| 14 | |||
| 15 | *Parameters*: |
||
| 16 | |||
| 17 | |*Name*|*Type*|*Description*| |
||
| 18 | |placeId|String|PlaceId of the Place where you want to list the members who have their last check in in| |
||
| 19 | |||
| 20 | |||
| 21 | The method returns the list of accounts with the information on the place_id. |
||
| 22 | |||
| 23 | |||
| 24 | *Response*: |
||
| 25 | <pre><code class="javascript"> |
||
| 26 | { |
||
| 27 | "cn":"locgetbyplace", |
||
| 28 | "feed":[ |
||
| 29 | { |
||
| 30 | "modifDate":"2011-07-27T09:25:26.000Z", |
||
| 31 | "accountId":"130",/* Match Account Id*/ |
||
| 32 | "placeId":"144_807", |
||
| 33 | "address":{ |
||
| 34 | "latitudeE6":"48824623", |
||
| 35 | "attribute3ZipCode":"92310", |
||
| 36 | "attribute2Town":"Sèvres", |
||
| 37 | "attribute0Country":"France", |
||
| 38 | "attribute4Line":"Chemin de Halage", |
||
| 39 | "radius":"292", |
||
| 40 | "formattedAddress":"Chemin de Halage, 92310 Sèvres, France", |
||
| 41 | "longitudeE6":"2228993", |
||
| 42 | "accuracy":"5", |
||
| 43 | "attribute1State":"Île-de-France" |
||
| 44 | }, |
||
| 45 | "moveType":"IN"/* May be IN or OUT*/ |
||
| 46 | } |
||
| 47 | ] |
||
| 48 | } |
||
| 49 | </code></pre> |
||
| 50 | |||
| 51 | |||
| 52 | *Error*: |
||
| 53 | |*Error Code*|*Type*|*Value*|*Description*| |
||
| 54 | |FizMediaQuotaExceededException|ex|601|Media Quota exceedded| |
||
| 55 | |FizAccountNotFoundInSessionException|un|501|Session is invalid| |
||
| 56 | |FizApiInvalidParameterException|un|502|invalid token| |
||
| 57 | |FizApiModelDoesNotExistException|un|503|Object does not exists| |
||
| 58 | |FizApiModelRightException|un|504|Right exception to use this method| |
||
| 59 | |||
| 60 | h2. Get last positions- _locgetpositions_ |
||
| 61 | |||
| 62 | The method locgetposition enables a logged user to retrieve all the last position of family members. |
||
| 63 | |||
| 64 | By sending an HTTP request http://devserver/api/loc/getpositions? |
||
| 65 | |||
| 66 | *Parameters*: |
||
| 67 | |||
| 68 | No parameters |
||
| 69 | |||
| 70 | |||
| 71 | 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. |
||
| 72 | |||
| 73 | |||
| 74 | *Response*: |
||
| 75 | <pre><code class="javascript"> |
||
| 76 | { |
||
| 77 | "cn":"locgetpositions", |
||
| 78 | "feed":[ |
||
| 79 | { |
||
| 80 | "modifDate":"2011-07-27T09:25:26.000Z", |
||
| 81 | "accountId":"130", |
||
| 82 | "placeId":"144_807", |
||
| 83 | "address":{ |
||
| 84 | "latitudeE6":"48824623", |
||
| 85 | "attribute3ZipCode":"92310", |
||
| 86 | "attribute2Town":"Sèvres", |
||
| 87 | "attribute0Country":"France", |
||
| 88 | "attribute4Line":"Chemin de Halage", |
||
| 89 | "radius":"292", |
||
| 90 | "formattedAddress":"Chemin de Halage, 92310 Sèvres, France", |
||
| 91 | "longitudeE6":"2228993", |
||
| 92 | "accuracy":"5", |
||
| 93 | "attribute1State":"Île-de-France" |
||
| 94 | }, |
||
| 95 | "moveType":"IN" |
||
| 96 | },{ |
||
| 97 | "modifDate":"2011-07-27T07:41:07.000Z", |
||
| 98 | "accountId":"131", |
||
| 99 | "placeId":"144_759", |
||
| 100 | "address":{ |
||
| 101 | "latitudeE6":"24950000", |
||
| 102 | "attribute3ZipCode":"231", |
||
| 103 | "attribute2Town":"Sindian District", |
||
| 104 | "attribute0Country":"Taiwan", |
||
| 105 | "attribute4Line":"", |
||
| 106 | "radius":"5502", |
||
| 107 | "formattedAddress":"Sindian District, Xinbei City, Taiwan 231", |
||
| 108 | "longitudeE6":"121533333", |
||
| 109 | "accuracy":"5", |
||
| 110 | "attribute1State":"" |
||
| 111 | }, |
||
| 112 | "moveType":"IN" |
||
| 113 | },{ |
||
| 114 | "modifDate":"2011-07-27T09:35:57.000Z", |
||
| 115 | "accountId":"133", |
||
| 116 | "placeId":"144_782", |
||
| 117 | "address":{ |
||
| 118 | "latitudeE6":"40759199", |
||
| 119 | "attribute3ZipCode":"10111", |
||
| 120 | "attribute2Town":"New York", |
||
| 121 | "attribute0Country":"United States", |
||
| 122 | "attribute4Line":"16 W 51st St", |
||
| 123 | "radius":"306", |
||
| 124 | "formattedAddress":"16 W 51st St, New York, NY 10111, USA", |
||
| 125 | "longitudeE6":"-73977651", |
||
| 126 | "accuracy":"5", |
||
| 127 | "attribute1State":"New York" |
||
| 128 | }, |
||
| 129 | "moveType":"IN" |
||
| 130 | } |
||
| 131 | ] |
||
| 132 | } |
||
| 133 | </code></pre> |
||
| 134 | |||
| 135 | |||
| 136 | *Error*: |
||
| 137 | |*Error Code*|*Type*|*Value*|*Description*| |
||
| 138 | |FizMediaQuotaExceededException|ex|601|Media Quota exceedded| |
||
| 139 | |FizAccountNotFoundInSessionException|un|501|Session is invalid| |
||
| 140 | |FizApiInvalidParameterException|un|502|invalid token| |
||
| 141 | |FizApiModelDoesNotExistException|un|503|Object does not exists| |
||
| 142 | |FizApiModelRightException|un|504|Right exception to use this method| |
||
| 143 | |||
| 144 | h2. Get last positions- _locpublishaddress_ |
||
| 145 | |||
| 146 | The method locpublishaddress enables a logged user to post a publish by entering an address, a text and a picture. |
||
| 147 | |||
| 148 | By sending an HTTP request http://devserver/api/loc/publishaddress? |
||
| 149 | |||
| 150 | *Parameters*: |
||
| 151 | |*Name*|*Type*|*Description*| |
||
| 152 | |text|String|text of the checkin| |
||
| 153 | |address|string|address of the check in street,city,county,state,country| |
||
| 154 | |file|binary or url|files to attach with the check in| |
||
| 155 | |||
| 156 | |||
| 157 | The method returns the iLocation feed. |
||
| 158 | |||
| 159 | |||
| 160 | *Response*: |
||
| 161 | <pre><code class="javascript"> |
||
| 162 | { |
||
| 163 | "cn":"locpublishaddress", |
||
| 164 | "feed":{ |
||
| 165 | "modifDate":"2011-08-01T15:29:20.396Z", |
||
| 166 | "creationDate":"2011-08-01T15:29:20.395Z", |
||
| 167 | "text":"test",*/text of the publish*/ |
||
| 168 | "accountId":"130",*/Account Id of the Author*/ |
||
| 169 | "refId":"144_1324", |
||
| 170 | "pictureURIs":[ |
||
| 171 | "http:\/\/devserver\/media\/144_4693?"*/Small Google Map centered on the address*/ |
||
| 172 | ], |
||
| 173 | "comments":[], |
||
| 174 | "wallMessageId":"144_6890",*/Reference Id of the wall id*/ |
||
| 175 | "refType":"PLACE_IN"*/Place In Information/* |
||
| 176 | } |
||
| 177 | } |
||
| 178 | </code></pre> |
||
| 179 | |||
| 180 | |||
| 181 | |||
| 182 | *Error*: |
||
| 183 | |*Error Code*|*Type*|*Value*|*Description*| |
||
| 184 | |FizMediaQuotaExceededException|ex|601|Media Quota exceedded| |
||
| 185 | |FizAccountNotFoundInSessionException|un|501|Session is invalid| |
||
| 186 | |FizApiInvalidParameterException|un|502|invalid token| |
||
| 187 | |FizApiModelDoesNotExistException|un|503|Object does not exists| |
||
| 188 | |FizApiModelRightException|un|504|Right exception to use this method| |
||
| 189 | |||
| 190 | h2. Publish a Place Location Event- _locpublishplacelocation_ |
||
| 191 | |||
| 192 | The method locpublishplacelocation publish a check in in a selected location. |
||
| 193 | |||
| 194 | By sending an HTTP request http://devserver/api/loc/publishauto? |
||
| 195 | |||
| 196 | *Parameters*: |
||
| 197 | |*Name*|*Type*|*Description*| |
||
| 198 | |geocodedAddress.accuracy|String|accuracy of the address (0 if a country, 5 if a precise address with street number)| |
||
| 199 | |geocodedAddress.attribute0Country|string|Country where the address is| |
||
| 200 | |geocodedAddress.attribute1State|string|State where the address is| |
||
| 201 | |geocodedAddress.attribute2Town|string|Town where the address is| |
||
| 202 | |geocodedAddress.attribute3ZipCode|string|Zipcode where the address is| |
||
| 203 | |geocodedAddress.attribute4Line|string|line of the address (ex : 3 st-james street)| |
||
| 204 | |geocodedAddress.formattedAddress|string|the well formatted address latitude as an int| |
||
| 205 | |geocodedAddress.latitudeE6|string|the well formatted address latitude as an int (* 1 000 000)| |
||
| 206 | |geocodedAddress.longitudeE6|string|the well formatted address longitude as an int (* 1 000 000)| |
||
| 207 | |geocodedAddress.radius|string|the radius of the place in meter| |
||
| 208 | |file|binary or url|files to attach with the check in| |
||
| 209 | |||
| 210 | |||
| 211 | The method returns the iLocation feed. |
||
| 212 | |||
| 213 | |||
| 214 | *Response*: |
||
| 215 | <pre><code class="javascript"> |
||
| 216 | { |
||
| 217 | TBD |
||
| 218 | } |
||
| 219 | } |
||
| 220 | </code></pre> |
||
| 221 | |||
| 222 | |||
| 223 | |||
| 224 | *Error*: |
||
| 225 | |*Error Code*|*Type*|*Value*|*Description*| |
||
| 226 | |FizMediaQuotaExceededException|ex|601|Media Quota exceedded| |
||
| 227 | |FizAccountNotFoundInSessionException|un|501|Session is invalid| |
||
| 228 | |FizApiInvalidParameterException|un|502|invalid token| |
||
| 229 | |FizApiModelDoesNotExistException|un|503|Object does not exists| |
||
| 230 | |FizApiModelRightException|un|504|Right exception to use this method| |
||
| 231 | |||
| 232 | |||
| 233 | h2. Locate with GPS Position- _locpublishauto_ |
||
| 234 | |||
| 235 | The method locpublishaddress publishes the location without writing anything on the wall |
||
| 236 | it will detect if the position is inside a POI according to radius of the POIe. |
||
| 237 | |||
| 238 | By sending an HTTP request http://devserver/api/loc/publishaddress ? |
||
| 239 | |||
| 240 | *Parameters*: |
||
| 241 | |*Name*|*Type*|*Description*| |
||
| 242 | |text|String|Text associatedto the check in| |
||
| 243 | |placeId|String|PlaceId of the Place where the user wants to check in| |
||
| 244 | |moveType|String|IN,OUT,AUTO action on the place| |
||
| 245 | |file|binary or url|files to attach with the check in| |
||
| 246 | |||
| 247 | |||
| 248 | |||
| 249 | The method returns the iwall feed. |
||
| 250 | |||
| 251 | |||
| 252 | *Response*: |
||
| 253 | <pre><code class="javascript"> |
||
| 254 | { |
||
| 255 | "cn":"locpublishplacelocation", |
||
| 256 | "feed":{ |
||
| 257 | "modifDate":"2011-08-01T16:30:00.629Z", |
||
| 258 | "creationDate":"2011-08-01T16:30:00.629Z", |
||
| 259 | "text":"test checkin from API", |
||
| 260 | "accountId":"130", |
||
| 261 | "refId":"144_807", |
||
| 262 | "pictureURIs":[], |
||
| 263 | "comments":[], |
||
| 264 | "wallMessageId":"144_6926", |
||
| 265 | "refType":"PLACE_IN" |
||
| 266 | } |
||
| 267 | } |
||
| 268 | </code></pre> |
||
| 269 | |||
| 270 | |||
| 271 | |||
| 272 | *Error*: |
||
| 273 | |*Error Code*|*Type*|*Value*|*Description*| |
||
| 274 | |FizMediaQuotaExceededException|ex|601|Media Quota exceedded| |
||
| 275 | |FizAccountNotFoundInSessionException|un|501|Session is invalid| |
||
| 276 | |FizApiInvalidParameterException|un|502|invalid token| |
||
| 277 | |FizApiModelDoesNotExistException|un|503|Object does not exists| |
||
| 278 | |FizApiModelRightException|un|504|Right exception to use this method| |