psn-live-async

1.0.2 • Public • Published

Asynchronous Node Playstation-Network API

es6 js introduced arrow functions, asynchronous flows and classes. I've written a psn api wrapper in node to be able to use this functionality for a cleaner code in your project.

Requires a valid playstation account.

Instructions:

  1. Get the ticket_uuid(login_token) and code according to these instructions below https://tusticles.com/psn-php/first_login.html

  2. Import the library
    var psn = require('psn-live-async');
    OR if supported
    import psn from 'psn-live-async';

  3. Run getCookie function alone. You will get an npsso token you need to use for the rest of the calls.
    psn.getCookie(ticket_uuid, code_you_got_on_your_mobile_device).then(npsso => console.log(npsso));

  4. Create an object
    const psnObj = new psn.PSNHandler(npsso);

  5. Call endpoint to retreive a user's Playstation Network User Id.
    psnObj.getUserIdPSN('Ninja').then(resp => console.log(resp))

Dependencies (3)

Dev Dependencies (0)

    Package Sidebar

    Install

    npm i psn-live-async

    Weekly Downloads

    0

    Version

    1.0.2

    License

    ISC

    Unpacked Size

    8.25 kB

    Total Files

    4

    Last publish

    Collaborators

    • mostrovsky