Have ideas to improve npm?Join in the discussion! »

    life360-node-api

    0.0.10 • Public • Published

    life360-node-api

    An unofficial implementation of Life360's API in Node.js.

    I am in the progress of dissecting the HTTP api behind Life360.com. This library allows you to login, see information about your family and circles, and locate your family members.

    Disecting the API

    If you are interested in how I'm understanding Life360.com's HTTP api, go to this page at DISECTION.md.

    Install

    $ npm install life360-node-api

    Usage

    const life360 = require('life360-node-api')

    Every function that talks to Life360.com will be asynchronous.

    Login with your username and password. Save the new client to a variable (this holds your authentication tokens).

    client = await life360.login('myusername', 'mySecurePassword123')

    Get a list of your circles and log the names of each of them

    let circles = await client.listCircles()
     
    for (const circle of circles) {
      console.log(circle.name)
    }

    Get a list of your circle's members

    let myCircle = circles[0]
    // alternatively, use the circles.findByName to search for your circle by name.
    // let myCircle = circles.findByName('family')
    let members = await myCircle.listMembers()
     
    for (const member of members) {
      console.log(`${member.firstName} ${member.lastName}`)
      console.log(`${member.location.latitude}${member.location.longitude}`)
    }

    Install

    npm i life360-node-api

    DownloadsWeekly Downloads

    12

    Version

    0.0.10

    License

    ISC

    Unpacked Size

    64.3 kB

    Total Files

    11

    Last publish

    Collaborators

    • avatar