Project

General

Profile

Location Management » History » Version 13

Eric Vieillevigne, 07/10/2018 09:05 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 13 Eric Vieillevigne
"address":{
306
        "latitudeE6":"48824623",
307
        "attribute3ZipCode":"92310",
308
        "attribute2Town":"Sèvres",
309
        "attribute0Country":"France",
310
        "attribute4Line":"Chemin de Halage",
311
        "radius":"292",
312
        "formattedAddress":"Chemin de Halage, 92310 Sèvres, France",
313
        "longitudeE6":"2228993",
314
        "accuracy":"5",
315
        "attribute1State":"Île-de-France" 
316
      }
317 2 Eric Vieillevigne
318
The method returns the localarmpanicbutton feed.
319
320
321
*Response*:
322
<pre><code class="javascript">
323
{
324
  "a00": {
325
    "r": {
326
      "r": "true"
327
    },
328
    "cn": "localarmpanicbutton"
329
  }
330
}
331
</code>
332
</pre>
333
334
335
336
*Error*:
337
|*Error Code*|*Type*|*Value*|*Description*|
338
|FizAccountNotFoundInSessionException|un|501|Session is invalid|
339
|FizApiInvalidParameterException|un|502|invalid token|
340
|FizApiModelDoesNotExistException|un|503|Object does not exists|
341
|FizApiModelRightException|un|504|Right exception to use this method|
342 3 Eric Vieillevigne
343
344
h2. Get Geofencing Member lists - _locgetgeofencingsforpublisher_
345
346
The method locgetgeofencingsforpublisherenables to display the list of subscribe Places for geofencing.
347
348
By sending an HTTP request http://devserver/api/loc/getgeofencingsforpublisher
349
350
*Parameters*:
351
No Parameters
352
353
354
The method returns the locgetgeofencingsforpublisher feed.
355
356
357
*Response*:
358
<pre><code class="javascript">
359
{
360
  "a00": {
361
    "r": {
362
      "r": [
363
        {
364
          "familyId": "family/442",
365
          "publisherId": "406",
366
          "in": "true",
367
          "metaId": "placeGeofencing/406_241",
368
          "placeId": "place/442_3525",
369
          "subscriptionStatus": "SUBSCRIBED",
370
          "subscriberId": "7345",
371
          "out": "true"
372
        }
373
      ]
374
    },
375
    "cn": "locgetgeofencingsforpublisher"
376
  }
377
}
378
</code>
379
</pre>
380
381
382
383
*Error*:
384
|*Error Code*|*Type*|*Value*|*Description*|
385
|FizAccountNotFoundInSessionException|un|501|Session is invalid|
386
|FizApiInvalidParameterException|un|502|invalid token|
387
|FizApiModelDoesNotExistException|un|503|Object does not exists|
388
|FizApiModelRightException|un|504|Right exception to use this method|
389 4 Eric Vieillevigne
390
391
h2. Request Geo Tracking - _locrequestautotrack_
392
393
The method locrequestautotrack send a request for geotracking to a family member.
394
395 5 Eric Vieillevigne
By sending an HTTP request http://devserver/api/loc/crequestautotrack?publisherId=19323
396 4 Eric Vieillevigne
397
398
*Parameters*:
399
|*Name*|*Type*|*Description*|
400
|publisherId|Long|Id of the publisher|
401
402
403
404
The method returns the locgetgeofencingsforpublisher feed.
405
406
407
*Response*:
408
<pre><code class="javascript">
409
{
410
  "a00": {
411
    "r": {
412 5 Eric Vieillevigne
      "r": "true"
413 4 Eric Vieillevigne
    },
414 1 Eric Vieillevigne
    "cn": "locrequestautotrack"
415 6 Eric Vieillevigne
  }
416
}
417
</code>
418
</pre>
419
420
421
422
*Error*:
423
|*Error Code*|*Type*|*Value*|*Description*|
424
|FizAccountNotFoundInSessionException|un|501|Session is invalid|
425
|FizApiInvalidParameterException|un|502|invalid token|
426
|FizApiModelDoesNotExistException|un|503|Object does not exists|
427
|FizApiModelRightException|un|504|Right exception to use this method|
428
429 8 Eric Vieillevigne
h2. Get Location history - _lochistory_ (deprecated)
430 6 Eric Vieillevigne
431
The method lochistory display the location history of a certain member from a certain date..
432
433
By sending an HTTP request http://devserver/api/loc/crequestautotrack?publisherId=19323
434
435
436
*Parameters*:
437
|*Name*|*Type*|*Description*|
438
|Date|String|Date format|
439
440
441
442 7 Eric Vieillevigne
The method returns the lochistory feed.
443 6 Eric Vieillevigne
444
445
*Response*:
446
<pre><code class="javascript">
447
{
448
  "a00": {
449
    "r": {
450
      "r": {
451
        "size": "0",
452
        "datas": [],
453
        "remain": "0",
454
        "count": "0",
455
        "start": "0"
456
      }
457
    },
458
    "cn": "lochistory"
459 4 Eric Vieillevigne
  }
460
}
461
</code>
462
</pre>
463
464
465
466
*Error*:
467
|*Error Code*|*Type*|*Value*|*Description*|
468
|FizAccountNotFoundInSessionException|un|501|Session is invalid|
469
|FizApiInvalidParameterException|un|502|invalid token|
470
|FizApiModelDoesNotExistException|un|503|Object does not exists|
471
|FizApiModelRightException|un|504|Right exception to use this method|
472 9 Eric Vieillevigne
473
h2. Get Geofencing Member lists - _locgetgeofencingsforpublisher_
474
475
The method locgetgeofencingsforpublisherenables to display the list of subscribe Places for geofencing.
476
477
By sending an HTTP request http://devserver/api/loc/getgeofencingsforpublisher
478
479
*Parameters*:
480
No Parameters
481
482
483
The method returns the locgetgeofencingsforpublisher feed.
484
485
486
*Response*:
487
<pre><code class="javascript">
488
{
489
  "a00": {
490
    "r": {
491
      "r": [
492
        {
493
          "familyId": "family/442",
494
          "publisherId": "406",
495
          "in": "true",
496
          "metaId": "placeGeofencing/406_241",
497
          "placeId": "place/442_3525",
498
          "subscriptionStatus": "SUBSCRIBED",
499
          "subscriberId": "7345",
500
          "out": "true"
501
        }
502
      ]
503
    },
504
    "cn": "locgetgeofencingsforpublisher"
505
  }
506
}
507
</code>
508
</pre>
509
510
511
512
*Error*:
513
|*Error Code*|*Type*|*Value*|*Description*|
514
|FizAccountNotFoundInSessionException|un|501|Session is invalid|
515
|FizApiInvalidParameterException|un|502|invalid token|
516
|FizApiModelDoesNotExistException|un|503|Object does not exists|
517
|FizApiModelRightException|un|504|Right exception to use this method|
518
519
520
h2. Request Geo Tracking - _locsetgeofencingsettings_
521
522
The method locsetgeofencingsettings set Geofencig request for a certain iPlace and a publisher Id.
523
524
By sending an HTTP request http://devserver/api/loc/setgeofencingsettings&placeId=place%2F442_3526&publisherId=19323&in=true&a00out=true
525
526
*Parameters*:
527
|*Name*|*Type*|*Description*|
528
|publisherId|Long|Id of the publisher|
529
|placeId|Long|PlaceId of Place of the Family|
530
|in|Boolean|set settings to In|
531
|out|Boolean|set settings to out|
532
533
534
535
The method returns the locsetgeofencingsettings feed.
536
537
538
*Response*:
539
<pre><code class="javascript">
540
{
541
  "a00": {
542
    "r": {
543
      "r": {
544
        "familyId": "family/442",
545
        "geolocSharing": "ALWAYS",
546
        "publisherId": "19323",
547
        "in": "true",
548
        "metaId": "placeGeofencing/19323_344",
549
        "placeId": "place/442_3526",
550
        "subscriptionStatus": "SUBSCRIBED",
551
        "subscriberId": "406",
552
        "out": "true"
553
      }
554
    },
555
    "cn": "locsetgeofencingsettings"
556
  }
557
}
558
</code>
559
</pre>
560
561
562
563
*Error*:
564
|*Error Code*|*Type*|*Value*|*Description*|
565
|FizAccountNotFoundInSessionException|un|501|Session is invalid|
566
|FizApiInvalidParameterException|un|502|invalid token|
567
|FizApiModelDoesNotExistException|un|503|Object does not exists|
568
|FizApiModelRightException|un|504|Right exception to use this method|