npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

node-sony-lifelog

v1.1.6

Published

Sony Lifelog API

Downloads

23

Readme

Description

This is a Sony Lifelog API Client Wrapper

Installation

$ npm install node-sony-lifelog

Usage

Application


/** Access Token Retrieved from Login Credential Code **/
var app = require('node-sony-lifelog').app(token);

app
    .activitiesAll({
        start_time: '2014-06-01T09:00:00.000Z',
        end_time: '2014-06-01T19:00:00.000Z'
    })
    .then(function(results){
        // Do something with activities info
    }, function(reason){
        // Error reason
    });

Authentication


var lifelog = require('node-sony-lifelog');

var auth = lifelog.auth({
    client_id: 'CLIENT_KEY',
    client_secret: 'CLIENT_SECRET',
    scope: 'lifelog.profile.read+lifelog.activities.read+lifelog.locations.read'
});

/** Redirect URL for Lifelog API Login **/
var redirectURL = auth.redirectURL(uniqueIdentifier);

/**
 * > Redirect the user to redirectURL
 * > User logs into their account through the URL
 * > Lifelog server redirects user to a callback URL
 * > Callback URL would look like this when success:
 * >>> https://YOUR_CALLBACK_URL?code=someCode&state=uniqueIdentifier&scope=scopeFromAbove
 * > Callback URL would look like this when fails:
 * >>> https://YOUR_CALLBACK_URL?code=someCode&fault=...
 **/

/** insert object directly or input the code retrieved with Lifelog callback **/
var token = auth.getAccessToken(code);

Documentation

User



// get user info
app.user();  // GET /v1/users/me

Activities

Suggested but not required parameters for activities:

start_time Timestamp Ex: '2014-06-01T09:00:00.000Z'

end_time Timestamp Ex: '2014-06-01T19:00:00.000Z'

limit Integer maximum number of entries



// get all activities
app.activitiesAll()  // GET /v1/users/me/activities

// get all applications
app.activities.applicationAll() // GET /v1/users/me/activities?type=application

// get applications -> album
app.activities.application.album() // GET /v1/users/me/activities?type=application:album

// get applications -> books
app.activities.application.books() // GET /v1/users/me/activities?type=application:books

// get applications -> browsing
app.activities.application.browsing() // GET /v1/users/me/activities?type=application:browsing

// get applications -> camera
app.activities.application.camera() // GET /v1/users/me/activities?type=application:camera

// get applications -> communication
app.activities.application.communication() // GET /v1/users/me/activities?type=application:communication

// get applications -> game
app.activities.application.game() // GET /v1/users/me/activities?type=application:game

// get applications -> movie
app.activities.application.movie() // GET /v1/users/me/activities?type=application:movie

// get applications -> other
app.activities.application.other() // GET /v1/users/me/activities?type=application:other

// get applications->tv
app.activities.application.tv() // GET /v1/users/me/activities?type=application:tv

// get camera
app.activities.camera() // GET /v1/users/me/activities?type=camera

// get camera
app.activities.music() // GET /v1/users/me/activities?type=music

// get physical
app.activities.physicalAll() // GET /v1/users/me/activities?type=physical

// get physical -> walk
app.activities.physical.walk() // GET /v1/users/me/activities?type=physical:walk

// get physical -> run
app.activities.physical.run() // GET /v1/users/me/activities?type=physical:run

// get physical -> bicycle
app.activities.physical.bicycle() // GET /v1/users/me/activities?type=physical:bicycle

// get physical -> other
app.activities.physical.other() // GET /v1/users/me/activities?type=physical:other

// get sleep
app.activities.sleep() // GET /v1/users/me/activities?type=sleep

// get transport
app.activities.transport() // GET /v1/users/me/activities?type=transport



Locations

Suggested but not required parameters for activities:

start_time Timestamp Ex: '2014-06-01T09:00:00.000Z'

end_time Timestamp Ex: '2014-06-01T19:00:00.000Z'

limit Integer maximum number of entries



// get one or more locations
app.locations.multiple();  // GET /v1/users/me/locations


// get specific location
app.locations.single({ id: locationId }); // GET /v1/users/me/locations/:id


Test


 // TODO

Development


// TODO