Project

General

Profile

Location Management » History » Version 10

jerome bonnet, 05/26/2015 04:05 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 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
By sending an HTTP request http://devserver/api/loc/publishauto?
218
219
*Parameters*:
220
|*Name*|*Type*|*Description*|
221 10 jerome bonnet
|authorId|Long|id of the author|
222 1 Eric Vieillevigne
|geocodedAddress.accuracy|String|accuracy of the address (0 if a country, 5 if a precise address with street number)|
223
|geocodedAddress.attribute0Country|string|Country where the address is|
224
|geocodedAddress.attribute1State|string|State where the address is|
225
|geocodedAddress.attribute2Town|string|Town where the address is|
226
|geocodedAddress.attribute3ZipCode|string|Zipcode where the address is|
227
|geocodedAddress.attribute4Line|string|line of the address (ex : 3 st-james street)|
228
|geocodedAddress.formattedAddress|string|the well formatted address latitude as an int|
229
|geocodedAddress.latitudeE6|string|the well formatted address latitude as an int (* 1 000 000)|
230
|geocodedAddress.longitudeE6|string|the well formatted address longitude as an int (* 1 000 000)|
231
|geocodedAddress.radius|string|the radius of the place in meter|
232
|file|binary or url|files to attach with the check in|
233
234
235
The method returns the iLocation feed.
236
237
238
*Response*:
239
<pre><code class="javascript">
240
{
241
  TBD
242
  }
243
}
244
</code></pre>
245
246
247
248
*Error*:
249
|*Error Code*|*Type*|*Value*|*Description*|
250
|FizMediaQuotaExceededException|ex|601|Media Quota exceedded|
251
|FizAccountNotFoundInSessionException|un|501|Session is invalid|
252
|FizApiInvalidParameterException|un|502|invalid token|
253
|FizApiModelDoesNotExistException|un|503|Object does not exists|
254
|FizApiModelRightException|un|504|Right exception to use this method|
255
256
257
h2. Locate with GPS Position- _locpublishauto_
258
259
The method locpublishaddress publishes the location without writing anything on the wall
260
it will detect if the position is inside a POI according to radius of the POIe.
261
262
By sending an HTTP request http://devserver/api/loc/publishaddress ?
263
264
*Parameters*:
265
|*Name*|*Type*|*Description*|
266 10 jerome bonnet
|authorId|Long|id of the author|
267 1 Eric Vieillevigne
|text|String|Text associatedto the check in|
268
|placeId|String|PlaceId of the Place where the user wants to check in|
269
|moveType|String|IN,OUT,AUTO action on the place|
270
|file|binary or url|files to attach with the check in|
271
272
273
274
The method returns the iwall feed.
275
276
277
*Response*:
278
<pre><code class="javascript">
279
{
280
  "cn":"locpublishplacelocation",
281
  "feed":{
282
    "modifDate":"2011-08-01T16:30:00.629Z",
283
    "creationDate":"2011-08-01T16:30:00.629Z",
284
    "text":"test checkin from API",
285
    "accountId":"130",
286
    "refId":"144_807",
287
    "pictureURIs":[],
288
    "comments":[],
289
    "wallMessageId":"144_6926",
290
    "refType":"PLACE_IN"
291
  }
292
}
293
</code></pre>
294
295
296
297
*Error*:
298
|*Error Code*|*Type*|*Value*|*Description*|
299
|FizMediaQuotaExceededException|ex|601|Media Quota exceedded|
300
|FizAccountNotFoundInSessionException|un|501|Session is invalid|
301
|FizApiInvalidParameterException|un|502|invalid token|
302
|FizApiModelDoesNotExistException|un|503|Object does not exists|
303
|FizApiModelRightException|un|504|Right exception to use this method|
304 2 Eric Vieillevigne
305
h2. Post a Panic Alert- _localarmpanicbutton_
306
307
The method localarmpanicbutton enables to post a panic button to all members of the familiy.
308
309
By sending an HTTP request http://devserver/api/loc/alarmpanicbutton
310
311
*Parameters*:
312
No Parameters
313
314
315
The method returns the localarmpanicbutton feed.
316
317
318
*Response*:
319
<pre><code class="javascript">
320
{
321
  "a00": {
322
    "r": {
323
      "r": "true"
324
    },
325
    "cn": "localarmpanicbutton"
326
  }
327
}
328
</code>
329
</pre>
330
331
332
333
*Error*:
334
|*Error Code*|*Type*|*Value*|*Description*|
335
|FizAccountNotFoundInSessionException|un|501|Session is invalid|
336
|FizApiInvalidParameterException|un|502|invalid token|
337
|FizApiModelDoesNotExistException|un|503|Object does not exists|
338
|FizApiModelRightException|un|504|Right exception to use this method|
339 3 Eric Vieillevigne
340
341
h2. Get Geofencing Member lists - _locgetgeofencingsforpublisher_
342
343
The method locgetgeofencingsforpublisherenables to display the list of subscribe Places for geofencing.
344
345
By sending an HTTP request http://devserver/api/loc/getgeofencingsforpublisher
346
347
*Parameters*:
348
No Parameters
349
350
351
The method returns the locgetgeofencingsforpublisher feed.
352
353
354
*Response*:
355
<pre><code class="javascript">
356
{
357
  "a00": {
358
    "r": {
359
      "r": [
360
        {
361
          "familyId": "family/442",
362
          "publisherId": "406",
363
          "in": "true",
364
          "metaId": "placeGeofencing/406_241",
365
          "placeId": "place/442_3525",
366
          "subscriptionStatus": "SUBSCRIBED",
367
          "subscriberId": "7345",
368
          "out": "true"
369
        }
370
      ]
371
    },
372
    "cn": "locgetgeofencingsforpublisher"
373
  }
374
}
375
</code>
376
</pre>
377
378
379
380
*Error*:
381
|*Error Code*|*Type*|*Value*|*Description*|
382
|FizAccountNotFoundInSessionException|un|501|Session is invalid|
383
|FizApiInvalidParameterException|un|502|invalid token|
384
|FizApiModelDoesNotExistException|un|503|Object does not exists|
385
|FizApiModelRightException|un|504|Right exception to use this method|
386 4 Eric Vieillevigne
387
388
h2. Request Geo Tracking - _locrequestautotrack_
389
390
The method locrequestautotrack send a request for geotracking to a family member.
391
392 5 Eric Vieillevigne
By sending an HTTP request http://devserver/api/loc/crequestautotrack?publisherId=19323
393 4 Eric Vieillevigne
394
395
*Parameters*:
396
|*Name*|*Type*|*Description*|
397
|publisherId|Long|Id of the publisher|
398
399
400
401
The method returns the locgetgeofencingsforpublisher feed.
402
403
404
*Response*:
405
<pre><code class="javascript">
406
{
407
  "a00": {
408
    "r": {
409 5 Eric Vieillevigne
      "r": "true"
410 4 Eric Vieillevigne
    },
411 1 Eric Vieillevigne
    "cn": "locrequestautotrack"
412 6 Eric Vieillevigne
  }
413
}
414
</code>
415
</pre>
416
417
418
419
*Error*:
420
|*Error Code*|*Type*|*Value*|*Description*|
421
|FizAccountNotFoundInSessionException|un|501|Session is invalid|
422
|FizApiInvalidParameterException|un|502|invalid token|
423
|FizApiModelDoesNotExistException|un|503|Object does not exists|
424
|FizApiModelRightException|un|504|Right exception to use this method|
425
426 8 Eric Vieillevigne
h2. Get Location history - _lochistory_ (deprecated)
427 6 Eric Vieillevigne
428
The method lochistory display the location history of a certain member from a certain date..
429
430
By sending an HTTP request http://devserver/api/loc/crequestautotrack?publisherId=19323
431
432
433
*Parameters*:
434
|*Name*|*Type*|*Description*|
435
|Date|String|Date format|
436
437
438
439 7 Eric Vieillevigne
The method returns the lochistory feed.
440 6 Eric Vieillevigne
441
442
*Response*:
443
<pre><code class="javascript">
444
{
445
  "a00": {
446
    "r": {
447
      "r": {
448
        "size": "0",
449
        "datas": [],
450
        "remain": "0",
451
        "count": "0",
452
        "start": "0"
453
      }
454
    },
455
    "cn": "lochistory"
456 4 Eric Vieillevigne
  }
457
}
458
</code>
459
</pre>
460
461
462
463
*Error*:
464
|*Error Code*|*Type*|*Value*|*Description*|
465
|FizAccountNotFoundInSessionException|un|501|Session is invalid|
466
|FizApiInvalidParameterException|un|502|invalid token|
467
|FizApiModelDoesNotExistException|un|503|Object does not exists|
468
|FizApiModelRightException|un|504|Right exception to use this method|
469 9 Eric Vieillevigne
470
h2. Get Geofencing Member lists - _locgetgeofencingsforpublisher_
471
472
The method locgetgeofencingsforpublisherenables to display the list of subscribe Places for geofencing.
473
474
By sending an HTTP request http://devserver/api/loc/getgeofencingsforpublisher
475
476
*Parameters*:
477
No Parameters
478
479
480
The method returns the locgetgeofencingsforpublisher feed.
481
482
483
*Response*:
484
<pre><code class="javascript">
485
{
486
  "a00": {
487
    "r": {
488
      "r": [
489
        {
490
          "familyId": "family/442",
491
          "publisherId": "406",
492
          "in": "true",
493
          "metaId": "placeGeofencing/406_241",
494
          "placeId": "place/442_3525",
495
          "subscriptionStatus": "SUBSCRIBED",
496
          "subscriberId": "7345",
497
          "out": "true"
498
        }
499
      ]
500
    },
501
    "cn": "locgetgeofencingsforpublisher"
502
  }
503
}
504
</code>
505
</pre>
506
507
508
509
*Error*:
510
|*Error Code*|*Type*|*Value*|*Description*|
511
|FizAccountNotFoundInSessionException|un|501|Session is invalid|
512
|FizApiInvalidParameterException|un|502|invalid token|
513
|FizApiModelDoesNotExistException|un|503|Object does not exists|
514
|FizApiModelRightException|un|504|Right exception to use this method|
515
516
517
h2. Request Geo Tracking - _locsetgeofencingsettings_
518
519
The method locsetgeofencingsettings set Geofencig request for a certain iPlace and a publisher Id.
520
521
By sending an HTTP request http://devserver/api/loc/setgeofencingsettings&placeId=place%2F442_3526&publisherId=19323&in=true&a00out=true
522
523
*Parameters*:
524
|*Name*|*Type*|*Description*|
525
|publisherId|Long|Id of the publisher|
526
|placeId|Long|PlaceId of Place of the Family|
527
|in|Boolean|set settings to In|
528
|out|Boolean|set settings to out|
529
530
531
532
The method returns the locsetgeofencingsettings feed.
533
534
535
*Response*:
536
<pre><code class="javascript">
537
{
538
  "a00": {
539
    "r": {
540
      "r": {
541
        "familyId": "family/442",
542
        "geolocSharing": "ALWAYS",
543
        "publisherId": "19323",
544
        "in": "true",
545
        "metaId": "placeGeofencing/19323_344",
546
        "placeId": "place/442_3526",
547
        "subscriptionStatus": "SUBSCRIBED",
548
        "subscriberId": "406",
549
        "out": "true"
550
      }
551
    },
552
    "cn": "locsetgeofencingsettings"
553
  }
554
}
555
</code>
556
</pre>
557
558
559
560
*Error*:
561
|*Error Code*|*Type*|*Value*|*Description*|
562
|FizAccountNotFoundInSessionException|un|501|Session is invalid|
563
|FizApiInvalidParameterException|un|502|invalid token|
564
|FizApiModelDoesNotExistException|un|503|Object does not exists|
565
|FizApiModelRightException|un|504|Right exception to use this method|