Project

General

Profile

Location Management » History » Version 12

Eric Vieillevigne, 07/10/2018 09:03 AM

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 10 jerome bonnet
	  "name":"max",
33
	  "medias": [
34
		{
35
		  "resolutionY": "523",
36
		  "resolutionX": "650",
37
		  "metaId": "media/13062_15722",
38
		  "pointedByWhat": "profile",
39
		  "pictureUrl": "http:\/\/API server\/media\/130_2757?",
40
		  "mimeType": "image/png",
41
		  "creationDate": "2012-12-13T14:00:50.000Z",
42
		  "mediaId": "media/13062_15722",
43
		  "pointedBy": "profile/13062_7542",
44
		  "bestMoment": "false",
45
		  "accountId": "13062",
46
		  "readystate": "READY",
47
		  "name": "mrburns.png",
48
		  "datasize": "26978",
49
		  "moodMap": {}
50
		}
51
	  ],
52
	  "placeId":"144_807",
53 1 Eric Vieillevigne
      "address":{
54
        "latitudeE6":"48824623",
55
        "attribute3ZipCode":"92310",
56
        "attribute2Town":"Sèvres",
57
        "attribute0Country":"France",
58
        "attribute4Line":"Chemin de Halage",
59
        "radius":"292",
60
        "formattedAddress":"Chemin de Halage, 92310 Sèvres, France",
61
        "longitudeE6":"2228993",
62
        "accuracy":"5",
63
        "attribute1State":"Île-de-France"
64
      },
65
      "moveType":"IN"/* May be IN or OUT*/
66
    }
67
  ]
68
}
69
</code></pre>
70
71
72
*Error*:
73
|*Error Code*|*Type*|*Value*|*Description*|
74
|FizMediaQuotaExceededException|ex|601|Media Quota exceedded|
75
|FizAccountNotFoundInSessionException|un|501|Session is invalid|
76
|FizApiInvalidParameterException|un|502|invalid token|
77
|FizApiModelDoesNotExistException|un|503|Object does not exists|
78
|FizApiModelRightException|un|504|Right exception to use this method|
79
80
h2. Get last positions- _locgetpositions_
81
82
The method locgetposition enables a logged user to retrieve all the last position of family members.
83
84
By sending an HTTP request http://devserver/api/loc/getpositions?
85
86
*Parameters*:
87
88
No parameters
89
90
91
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.
92
93
94
*Response*:
95
<pre><code class="javascript">
96
{
97
  "cn":"locgetpositions",
98
  "feed":[
99
    {
100
      "modifDate":"2011-07-27T09:25:26.000Z",
101
      "accountId":"130",
102 10 jerome bonnet
      "name":"toby",
103
  	  "medias": [ ],
104 1 Eric Vieillevigne
      "placeId":"144_807",
105
      "address":{
106
        "latitudeE6":"48824623",
107
        "attribute3ZipCode":"92310",
108
        "attribute2Town":"Sèvres",
109
        "attribute0Country":"France",
110
        "attribute4Line":"Chemin de Halage",
111
        "radius":"292",
112
        "formattedAddress":"Chemin de Halage, 92310 Sèvres, France",
113
        "longitudeE6":"2228993",
114
        "accuracy":"5",
115
        "attribute1State":"Île-de-France"
116
      },
117
      "moveType":"IN"
118
    },{
119
      "modifDate":"2011-07-27T07:41:07.000Z",
120
      "accountId":"131",
121
      "placeId":"144_759",
122
      "address":{
123
        "latitudeE6":"24950000",
124
        "attribute3ZipCode":"231",
125
        "attribute2Town":"Sindian District",
126
        "attribute0Country":"Taiwan",
127
        "attribute4Line":"",
128
        "radius":"5502",
129
        "formattedAddress":"Sindian District, Xinbei City, Taiwan 231",
130
        "longitudeE6":"121533333",
131
        "accuracy":"5",
132
        "attribute1State":""
133
      },
134
      "moveType":"IN"
135
    },{
136
      "modifDate":"2011-07-27T09:35:57.000Z",
137
      "accountId":"133",
138
      "placeId":"144_782",
139
      "address":{
140
        "latitudeE6":"40759199",
141
        "attribute3ZipCode":"10111",
142
        "attribute2Town":"New York",
143
        "attribute0Country":"United States",
144
        "attribute4Line":"16 W 51st St",
145
        "radius":"306",
146
        "formattedAddress":"16 W 51st St, New York, NY 10111, USA",
147
        "longitudeE6":"-73977651",
148
        "accuracy":"5",
149
        "attribute1State":"New York"
150
      },
151
      "moveType":"IN"
152
    }
153
  ]
154
}
155
</code></pre>
156
157
158
*Error*:
159
|*Error Code*|*Type*|*Value*|*Description*|
160
|FizMediaQuotaExceededException|ex|601|Media Quota exceedded|
161
|FizAccountNotFoundInSessionException|un|501|Session is invalid|
162
|FizApiInvalidParameterException|un|502|invalid token|
163
|FizApiModelDoesNotExistException|un|503|Object does not exists|
164
|FizApiModelRightException|un|504|Right exception to use this method|
165
166
h2. Get last positions- _locpublishaddress_
167
168
The method locpublishaddress enables a logged user to post a publish by entering an address, a text and a picture.
169
170
By sending an HTTP request http://devserver/api/loc/publishaddress?
171
172
*Parameters*:
173
|*Name*|*Type*|*Description*|
174
|text|String|text of the checkin|
175 10 jerome bonnet
|authorId|Long|id of the author|
176 1 Eric Vieillevigne
|address|string|address of the check in street,city,county,state,country|
177
|file|binary or url|files to attach with the check in|
178
179
180
The method returns the iLocation feed.
181
182
183
*Response*:
184
<pre><code class="javascript">
185
{
186
  "cn":"locpublishaddress",
187
  "feed":{
188
    "modifDate":"2011-08-01T15:29:20.396Z",
189
    "creationDate":"2011-08-01T15:29:20.395Z",
190
    "text":"test",*/text of the publish*/
191
    "accountId":"130",*/Account Id of the Author*/
192
    "refId":"144_1324",
193
    "pictureURIs":[
194
      "http:\/\/devserver\/media\/144_4693?"*/Small Google Map centered on the address*/
195
    ],
196
    "comments":[],
197
    "wallMessageId":"144_6890",*/Reference Id of the wall id*/
198
    "refType":"PLACE_IN"*/Place In Information/*
199
  }
200
}
201
</code></pre>
202
203
204
205
*Error*:
206
|*Error Code*|*Type*|*Value*|*Description*|
207
|FizMediaQuotaExceededException|ex|601|Media Quota exceedded|
208
|FizAccountNotFoundInSessionException|un|501|Session is invalid|
209
|FizApiInvalidParameterException|un|502|invalid token|
210
|FizApiModelDoesNotExistException|un|503|Object does not exists|
211
|FizApiModelRightException|un|504|Right exception to use this method|
212
213
h2. Publish a Place Location Event- _locpublishplacelocation_
214
215
The method locpublishplacelocation publish a check in in a selected location.
216
217 11 jerome bonnet
By sending an HTTP request http://devserver/api/loc/publishplacelocation?authorId=bot/95_160&placeId=place/445_988&moveType=IN
218 1 Eric Vieillevigne
219
*Parameters*:
220
|*Name*|*Type*|*Description*|
221
|authorId|Long|id of the author|
222 11 jerome bonnet
|placeId|String|id of the place to publish id|
223
|moveType|string|IN or OUT|
224 1 Eric Vieillevigne
|file|binary or url|files to attach with the check in|
225
226
227
The method returns the iLocation feed.
228
229
230
*Response*:
231
<pre><code class="javascript">
232
{
233
  TBD
234
  }
235
}
236
</code></pre>
237
238
239
240
*Error*:
241
|*Error Code*|*Type*|*Value*|*Description*|
242
|FizMediaQuotaExceededException|ex|601|Media Quota exceedded|
243
|FizAccountNotFoundInSessionException|un|501|Session is invalid|
244
|FizApiInvalidParameterException|un|502|invalid token|
245
|FizApiModelDoesNotExistException|un|503|Object does not exists|
246
|FizApiModelRightException|un|504|Right exception to use this method|
247
248
249
h2. Locate with GPS Position- _locpublishauto_
250
251
The method locpublishaddress publishes the location without writing anything on the wall
252
it will detect if the position is inside a POI according to radius of the POIe.
253
254
By sending an HTTP request http://devserver/api/loc/publishaddress ?
255
256
*Parameters*:
257
|*Name*|*Type*|*Description*|
258 10 jerome bonnet
|authorId|Long|id of the author|
259 1 Eric Vieillevigne
|text|String|Text associatedto the check in|
260
|placeId|String|PlaceId of the Place where the user wants to check in|
261
|moveType|String|IN,OUT,AUTO action on the place|
262
|file|binary or url|files to attach with the check in|
263
264
265
266
The method returns the iwall feed.
267
268
269
*Response*:
270
<pre><code class="javascript">
271
{
272
  "cn":"locpublishplacelocation",
273
  "feed":{
274
    "modifDate":"2011-08-01T16:30:00.629Z",
275
    "creationDate":"2011-08-01T16:30:00.629Z",
276
    "text":"test checkin from API",
277
    "accountId":"130",
278
    "refId":"144_807",
279
    "pictureURIs":[],
280
    "comments":[],
281
    "wallMessageId":"144_6926",
282
    "refType":"PLACE_IN"
283
  }
284
}
285
</code></pre>
286
287
288
289
*Error*:
290
|*Error Code*|*Type*|*Value*|*Description*|
291
|FizMediaQuotaExceededException|ex|601|Media Quota exceedded|
292
|FizAccountNotFoundInSessionException|un|501|Session is invalid|
293
|FizApiInvalidParameterException|un|502|invalid token|
294
|FizApiModelDoesNotExistException|un|503|Object does not exists|
295
|FizApiModelRightException|un|504|Right exception to use this method|
296 2 Eric Vieillevigne
297
h2. Post a Panic Alert- _localarmpanicbutton_
298
299
The method localarmpanicbutton enables to post a panic button to all members of the familiy.
300
301
By sending an HTTP request http://devserver/api/loc/alarmpanicbutton
302
303
*Parameters*:
304 12 Eric Vieillevigne
geocodedAddress, GeocodedAddress
305 2 Eric Vieillevigne
306
307
The method returns the localarmpanicbutton feed.
308
309
310
*Response*:
311
<pre><code class="javascript">
312
{
313
  "a00": {
314
    "r": {
315
      "r": "true"
316
    },
317
    "cn": "localarmpanicbutton"
318
  }
319
}
320
</code>
321
</pre>
322
323
324
325
*Error*:
326
|*Error Code*|*Type*|*Value*|*Description*|
327
|FizAccountNotFoundInSessionException|un|501|Session is invalid|
328
|FizApiInvalidParameterException|un|502|invalid token|
329
|FizApiModelDoesNotExistException|un|503|Object does not exists|
330
|FizApiModelRightException|un|504|Right exception to use this method|
331 3 Eric Vieillevigne
332
333
h2. Get Geofencing Member lists - _locgetgeofencingsforpublisher_
334
335
The method locgetgeofencingsforpublisherenables to display the list of subscribe Places for geofencing.
336
337
By sending an HTTP request http://devserver/api/loc/getgeofencingsforpublisher
338
339
*Parameters*:
340
No Parameters
341
342
343
The method returns the locgetgeofencingsforpublisher feed.
344
345
346
*Response*:
347
<pre><code class="javascript">
348
{
349
  "a00": {
350
    "r": {
351
      "r": [
352
        {
353
          "familyId": "family/442",
354
          "publisherId": "406",
355
          "in": "true",
356
          "metaId": "placeGeofencing/406_241",
357
          "placeId": "place/442_3525",
358
          "subscriptionStatus": "SUBSCRIBED",
359
          "subscriberId": "7345",
360
          "out": "true"
361
        }
362
      ]
363
    },
364
    "cn": "locgetgeofencingsforpublisher"
365
  }
366
}
367
</code>
368
</pre>
369
370
371
372
*Error*:
373
|*Error Code*|*Type*|*Value*|*Description*|
374
|FizAccountNotFoundInSessionException|un|501|Session is invalid|
375
|FizApiInvalidParameterException|un|502|invalid token|
376
|FizApiModelDoesNotExistException|un|503|Object does not exists|
377
|FizApiModelRightException|un|504|Right exception to use this method|
378 4 Eric Vieillevigne
379
380
h2. Request Geo Tracking - _locrequestautotrack_
381
382
The method locrequestautotrack send a request for geotracking to a family member.
383
384 5 Eric Vieillevigne
By sending an HTTP request http://devserver/api/loc/crequestautotrack?publisherId=19323
385 4 Eric Vieillevigne
386
387
*Parameters*:
388
|*Name*|*Type*|*Description*|
389
|publisherId|Long|Id of the publisher|
390
391
392
393
The method returns the locgetgeofencingsforpublisher feed.
394
395
396
*Response*:
397
<pre><code class="javascript">
398
{
399
  "a00": {
400
    "r": {
401 5 Eric Vieillevigne
      "r": "true"
402 4 Eric Vieillevigne
    },
403 1 Eric Vieillevigne
    "cn": "locrequestautotrack"
404 6 Eric Vieillevigne
  }
405
}
406
</code>
407
</pre>
408
409
410
411
*Error*:
412
|*Error Code*|*Type*|*Value*|*Description*|
413
|FizAccountNotFoundInSessionException|un|501|Session is invalid|
414
|FizApiInvalidParameterException|un|502|invalid token|
415
|FizApiModelDoesNotExistException|un|503|Object does not exists|
416
|FizApiModelRightException|un|504|Right exception to use this method|
417
418 8 Eric Vieillevigne
h2. Get Location history - _lochistory_ (deprecated)
419 6 Eric Vieillevigne
420
The method lochistory display the location history of a certain member from a certain date..
421
422
By sending an HTTP request http://devserver/api/loc/crequestautotrack?publisherId=19323
423
424
425
*Parameters*:
426
|*Name*|*Type*|*Description*|
427
|Date|String|Date format|
428
429
430
431 7 Eric Vieillevigne
The method returns the lochistory feed.
432 6 Eric Vieillevigne
433
434
*Response*:
435
<pre><code class="javascript">
436
{
437
  "a00": {
438
    "r": {
439
      "r": {
440
        "size": "0",
441
        "datas": [],
442
        "remain": "0",
443
        "count": "0",
444
        "start": "0"
445
      }
446
    },
447
    "cn": "lochistory"
448 4 Eric Vieillevigne
  }
449
}
450
</code>
451
</pre>
452
453
454
455
*Error*:
456
|*Error Code*|*Type*|*Value*|*Description*|
457
|FizAccountNotFoundInSessionException|un|501|Session is invalid|
458
|FizApiInvalidParameterException|un|502|invalid token|
459
|FizApiModelDoesNotExistException|un|503|Object does not exists|
460
|FizApiModelRightException|un|504|Right exception to use this method|
461 9 Eric Vieillevigne
462
h2. Get Geofencing Member lists - _locgetgeofencingsforpublisher_
463
464
The method locgetgeofencingsforpublisherenables to display the list of subscribe Places for geofencing.
465
466
By sending an HTTP request http://devserver/api/loc/getgeofencingsforpublisher
467
468
*Parameters*:
469
No Parameters
470
471
472
The method returns the locgetgeofencingsforpublisher feed.
473
474
475
*Response*:
476
<pre><code class="javascript">
477
{
478
  "a00": {
479
    "r": {
480
      "r": [
481
        {
482
          "familyId": "family/442",
483
          "publisherId": "406",
484
          "in": "true",
485
          "metaId": "placeGeofencing/406_241",
486
          "placeId": "place/442_3525",
487
          "subscriptionStatus": "SUBSCRIBED",
488
          "subscriberId": "7345",
489
          "out": "true"
490
        }
491
      ]
492
    },
493
    "cn": "locgetgeofencingsforpublisher"
494
  }
495
}
496
</code>
497
</pre>
498
499
500
501
*Error*:
502
|*Error Code*|*Type*|*Value*|*Description*|
503
|FizAccountNotFoundInSessionException|un|501|Session is invalid|
504
|FizApiInvalidParameterException|un|502|invalid token|
505
|FizApiModelDoesNotExistException|un|503|Object does not exists|
506
|FizApiModelRightException|un|504|Right exception to use this method|
507
508
509
h2. Request Geo Tracking - _locsetgeofencingsettings_
510
511
The method locsetgeofencingsettings set Geofencig request for a certain iPlace and a publisher Id.
512
513
By sending an HTTP request http://devserver/api/loc/setgeofencingsettings&placeId=place%2F442_3526&publisherId=19323&in=true&a00out=true
514
515
*Parameters*:
516
|*Name*|*Type*|*Description*|
517
|publisherId|Long|Id of the publisher|
518
|placeId|Long|PlaceId of Place of the Family|
519
|in|Boolean|set settings to In|
520
|out|Boolean|set settings to out|
521
522
523
524
The method returns the locsetgeofencingsettings feed.
525
526
527
*Response*:
528
<pre><code class="javascript">
529
{
530
  "a00": {
531
    "r": {
532
      "r": {
533
        "familyId": "family/442",
534
        "geolocSharing": "ALWAYS",
535
        "publisherId": "19323",
536
        "in": "true",
537
        "metaId": "placeGeofencing/19323_344",
538
        "placeId": "place/442_3526",
539
        "subscriptionStatus": "SUBSCRIBED",
540
        "subscriberId": "406",
541
        "out": "true"
542
      }
543
    },
544
    "cn": "locsetgeofencingsettings"
545
  }
546
}
547
</code>
548
</pre>
549
550
551
552
*Error*:
553
|*Error Code*|*Type*|*Value*|*Description*|
554
|FizAccountNotFoundInSessionException|un|501|Session is invalid|
555
|FizApiInvalidParameterException|un|502|invalid token|
556
|FizApiModelDoesNotExistException|un|503|Object does not exists|
557
|FizApiModelRightException|un|504|Right exception to use this method|