Socket
Socket
Sign inDemoInstall

personapi

Package Overview
Dependencies
47
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    personapi

NPM module to easily access and use the functions provided by the PersonAPI platform (https://personapi.codevigor.com)


Version published
Maintainers
1
Install size
3.72 MB
Created

Readme

Source

PersonAPI

A simple library that allows you to access the functions provided by the PersonAPI platform.

Installation

npm install personapi

Usage

var personapi = require('personapi');
personapi.init({
    token: "your_user_token",
    app_token: "your_app_token"
});

personapi.registerUser({
    "email": "suyash@codevigor.com",
    "password": "user_password"
})
.then(function(response) {
    console.log(response);
})
.catch(function(err) {
    console.log(err);
});

API Functions

- Login function - creates a new session for a user

personapi.login({
    email: "suyash@codevigor.com",
    password: "user_password"
});

- Check session - checks if a user's session is still active
personapi.checkSession({
    email: "suyash@codevigor.com",
    login_token": "token_received_after_login"
});

- Logout - destroys the current active session for a user
personapi.logout({
    email: "suyash@codevigor.com",
    login_token": "token_received_after_login"
});

- Retrieve user details - queries the service for details of a user
personapi.getUserDetails({
    email: "suyash@codevigor.com",
    login_token": "token_received_after_login"
});

- Update user details - overwrites user details
personapi.saveUserDetails({
    email: "suyash@codevigor.com",
    login_token": "token_received_after_login",
    first_name: "new first name",
    surname: "new last name",
    additional_details: {
        address: "new address",
        mobile: "new mobile"
    }
});

- Update password - updates password of user
personapi.changePassword({
    email: "suyash@codevigor.com",
    login_token": "token_received_after_login",
    old_password: "old user password",
    new_password: "new password"
});

- Get user list - returns list of users
personapi.getUserList({
    email: "suyash@codevigor.com",
    login_token": "token_received_after_login"
});

- Sends email for reset password
personapi.emailForResetPassword({
    email: "suyash@codevigor.com"
});

Keywords

FAQs

Last updated on 02 Aug 2018

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc