Project

General

Profile

Location Management » History » Version 6

Eric Vieillevigne, 05/12/2015 02:46 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|
279 2 Eric Vieillevigne
280
h2. Post a Panic Alert- _localarmpanicbutton_
281
282
The method localarmpanicbutton enables to post a panic button to all members of the familiy.
283
284
By sending an HTTP request http://devserver/api/loc/alarmpanicbutton
285
286
*Parameters*:
287
No Parameters
288
289
290
The method returns the localarmpanicbutton feed.
291
292
293
*Response*:
294
<pre><code class="javascript">
295
{
296
  "a00": {
297
    "r": {
298
      "r": "true"
299
    },
300
    "cn": "localarmpanicbutton"
301
  }
302
}
303
</code>
304
</pre>
305
306
307
308
*Error*:
309
|*Error Code*|*Type*|*Value*|*Description*|
310
|FizAccountNotFoundInSessionException|un|501|Session is invalid|
311
|FizApiInvalidParameterException|un|502|invalid token|
312
|FizApiModelDoesNotExistException|un|503|Object does not exists|
313
|FizApiModelRightException|un|504|Right exception to use this method|
314 3 Eric Vieillevigne
315
316
h2. Get Geofencing Member lists - _locgetgeofencingsforpublisher_
317
318
The method locgetgeofencingsforpublisherenables to display the list of subscribe Places for geofencing.
319
320
By sending an HTTP request http://devserver/api/loc/getgeofencingsforpublisher
321
322
*Parameters*:
323
No Parameters
324
325
326
The method returns the locgetgeofencingsforpublisher feed.
327
328
329
*Response*:
330
<pre><code class="javascript">
331
{
332
  "a00": {
333
    "r": {
334
      "r": [
335
        {
336
          "familyId": "family/442",
337
          "publisherId": "406",
338
          "in": "true",
339
          "metaId": "placeGeofencing/406_241",
340
          "placeId": "place/442_3525",
341
          "subscriptionStatus": "SUBSCRIBED",
342
          "subscriberId": "7345",
343
          "out": "true"
344
        }
345
      ]
346
    },
347
    "cn": "locgetgeofencingsforpublisher"
348
  }
349
}
350
</code>
351
</pre>
352
353
354
355
*Error*:
356
|*Error Code*|*Type*|*Value*|*Description*|
357
|FizAccountNotFoundInSessionException|un|501|Session is invalid|
358
|FizApiInvalidParameterException|un|502|invalid token|
359
|FizApiModelDoesNotExistException|un|503|Object does not exists|
360
|FizApiModelRightException|un|504|Right exception to use this method|
361 4 Eric Vieillevigne
362
363
h2. Request Geo Tracking - _locrequestautotrack_
364
365
The method locrequestautotrack send a request for geotracking to a family member.
366
367 5 Eric Vieillevigne
By sending an HTTP request http://devserver/api/loc/crequestautotrack?publisherId=19323
368 4 Eric Vieillevigne
369
370
*Parameters*:
371
|*Name*|*Type*|*Description*|
372
|publisherId|Long|Id of the publisher|
373
374
375
376
The method returns the locgetgeofencingsforpublisher feed.
377
378
379
*Response*:
380
<pre><code class="javascript">
381
{
382
  "a00": {
383
    "r": {
384 5 Eric Vieillevigne
      "r": "true"
385 4 Eric Vieillevigne
    },
386 1 Eric Vieillevigne
    "cn": "locrequestautotrack"
387 6 Eric Vieillevigne
  }
388
}
389
</code>
390
</pre>
391
392
393
394
*Error*:
395
|*Error Code*|*Type*|*Value*|*Description*|
396
|FizAccountNotFoundInSessionException|un|501|Session is invalid|
397
|FizApiInvalidParameterException|un|502|invalid token|
398
|FizApiModelDoesNotExistException|un|503|Object does not exists|
399
|FizApiModelRightException|un|504|Right exception to use this method|
400
401
h2. Get Location history - _lochistory_
402
403
The method lochistory display the location history of a certain member from a certain date..
404
405
By sending an HTTP request http://devserver/api/loc/crequestautotrack?publisherId=19323
406
407
408
*Parameters*:
409
|*Name*|*Type*|*Description*|
410
|Date|String|Date format|
411
412
413
414
The method returns the locgetgeofencingsforpublisher feed.
415
416
417
*Response*:
418
<pre><code class="javascript">
419
{
420
  "a00": {
421
    "r": {
422
      "r": {
423
        "size": "0",
424
        "datas": [],
425
        "remain": "0",
426
        "count": "0",
427
        "start": "0"
428
      }
429
    },
430
    "cn": "lochistory"
431 4 Eric Vieillevigne
  }
432
}
433
</code>
434
</pre>
435
436
437
438
*Error*:
439
|*Error Code*|*Type*|*Value*|*Description*|
440
|FizAccountNotFoundInSessionException|un|501|Session is invalid|
441
|FizApiInvalidParameterException|un|502|invalid token|
442
|FizApiModelDoesNotExistException|un|503|Object does not exists|
443
|FizApiModelRightException|un|504|Right exception to use this method|