Help: Group data API

About

MLC supports (if you paid for the unlocked version) an API to get the location data of your loved ones to other apps or services, for example to create a widget for devices other than Android. You will need to enable API access for the group you want in the MLC app yourself and you can choose any key you like (using HTTP-supported characters).

API

The API can be used in the following manner:

https://us-central1-jrclockwidget.cloudfunctions.net/getGroupData/{ GROUP_ID }/{ peopleWithLocation or locationsWithPeople }?&apiKey={ YOUR_KEY }&type={ json (default), xml or readable }


Examples


Example: 'peopleWithLocation' readable text

Say the API was called like:

https://us-central1-jrclockwidget.cloudfunctions.net/getGroupData/1232/peopleWithLocation?&apiKey=password&type=readable

Then a possible response would look like:

Person A: Home

Person B: Work


Example: 'peopleWithLocation' JSON

Say the API was called like:

https://us-central1-jrclockwidget.cloudfunctions.net/getGroupData/1232/peopleWithLocation?&apiKey=password&type=json

Then a possible response would look like (gps is not included if "People on the map" is turned off for this group):

{

"1234": {

"name": "Person A",

"location": "Home",

"locationId": 1237,

"gps": {

"latitude": 0.0000,

"longitude": 0.0000

}

},

"1235": {

"name": "Person B",

"location": "Work",

"locationId": 1236,

"gps": {

"latitude": 1.0000,

"longitude": 1.0000

}

}

}


Example: 'peopleWithLocation' XML

Say the API was called like:

https://us-central1-jrclockwidget.cloudfunctions.net/getGroupData/1232/peopleWithLocation?&apiKey=password&type=xml

Then a possible response would look like (gps is not included if "People on the map" is turned off for this group):

<peopleWithLocation>

<person id="1234">

<name>Person A</name>

<location>Home</location>

<locationId>1237</locationId>

<gps>

<latitude>0.0000</latitude>

<longitude>0.0000</longitude>

</gps>

</person>

<person id="1235">

<name>Person B</name>

<location>Work</location>

<locationId>1236</locationId>

<gps>

<latitude>1.0000</latitude>

<longitude>1.0000</longitude>

</gps>

</person>

</peopleWithLocation>





Example: 'locationsWithPeople' readable text

Say the API was called like:

https://us-central1-jrclockwidget.cloudfunctions.net/getGroupData/1232/locationsWithPeople?&apiKey=password&type=readable

Then a possible response would look like:

Home: Person A

Work: Person B, Person C

Away:


Example: 'locationsWithPeople' JSON

Say the API was called like:

https://us-central1-jrclockwidget.cloudfunctions.net/getGroupData/1232/locationsWithPeople?&apiKey=password&type=json

Then a possible response would look like (note: gps is not given for "Away" location):

{

"1237": {

"name": "Home",

"people": [

"Person A"

],

"peopleIds": [

1234

],

"gps": {

"latitude": 0.0000,

"longitude": 0.0000

}

},

"1236": {

"name": "Work",

"people": [

"Person B",

"Person C"

],

"peopleIds": [

1235,

1238

],

"gps": {

"latitude": 1.0000,

"longitude": 1.0000

}

},

"0": {

"name": "Away",

"people": [],

"peopleIds": []

}

}


Example: 'locationsWithPeople' XML

Say the API was called like:

https://us-central1-jrclockwidget.cloudfunctions.net/getGroupData/1232/locationsWithPeople?&apiKey=password&type=xml

Then a possible response would look like (note: gps is not given for "Away" location):

<locationsWithPeople>

<location id="1237">

<name>Home</name>

<people>

<person>Person A</person>

</people>

<peopleIds>

<personId>1234</personId>

</peopleIds>

<gps>

<latitude>0.0000</latitude>

<longitude>0.0000</longitude>

</gps>

</location>

<location id="1236">

<name>Work</name>

<people>

<person>Person B</person>

<person>Person C</person>

</people>

<peopleIds>

<personId>1235</personId>

<personId>1238</personId>

<peopleIds/>

<gps>

<latitude>1.0000</latitude>

<longitude>1.0000</longitude>

</gps>

</location>

<location id="0">

<name>Away</name>

<people></people>

<peopleIds><peopleIds/>

</location>

</locationsWithPeople>