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-gigya

v0.1.4

Published

Node.js wrapper for the Gigya REST API

Downloads

134

Readme

node-gigya

A simple Node.js wrapper for the Gigya REST API. Based on the official Gigya Server Side SDKs

Dependencies

  • node-fetch - ^1.6.0
  • qs - ^6.2.1

Installation

via npm:

npm install node-gigya

Usage

.request(method, params)

The request method that takes an endpoint string and an object with request parameters. A predefined list of endpoints have also been mapped to the instance and are bound to the request method (see the white list below.)

const Gigya = require('node-gigya');

const myGigya = new Gigya(myAPIKey, mySecretKey);

// get a user's account info:
const req = myGigya.request('accounts.getAccountInfo', { uid: 'useridhere' });
// OR by using the mapped method..
// const req = myGigya.accounts.getAccountInfo({ uid: 'useridhere' });

req.then(
	response => {
		// response is the json response object from the api
	},
	err => {
		// err.response contains the original json response object returned by the api.
		// err.status is the error code of the json response..
		// e.g., "errorCode": 401002, err.status will be 401
	}
);

SigUtils

Included static utility methods for calculating and validating signatures in accordance with Gigya's Security Guidelines

const SigUtils = require('node-gigya').SigUtils;

SigUtils.validateUserSignature(UID, timestamp, secret, signature)

Utilitiy method for validating a user signature, pass in the UID, signatureTimesatmp, site secret key, and the UIDSignature. Returns true or false.

SigUtils.calcSignature(baseString, key)

Utility method for creating a Base64 encoded signature. Pass in a base string and the site secret key. User signatures use a base string in the format of %TIMESTAMP%_%UID%. Returns Base64 encoded signature.

Whitelist of API endpoints

See Gigya's REST API docs for a list of all current endpoints and their required parameters. This list has been maintained as of September 2016, so some endpoints may have been deprecated since.

  • accounts.deleteAccount
  • accounts.deleteScreenSet
  • accounts.exchangeUIDSignature
  • accounts.finalizeRegistration
  • accounts.getAccountInfo
  • accounts.getConflictingAccount
  • accounts.getCounters
  • accounts.getPolicies
  • accounts.getRegisteredCounters
  • accounts.getSchema
  • accounts.getScreenSets
  • accounts.importProfilePhoto
  • accounts.incrementCounters
  • accounts.initRegistration
  • accounts.isAvailableLoginID
  • accounts.linkAccounts
  • accounts.login
  • accounts.logout
  • accounts.notifyLogin
  • accounts.publishProfilePhoto
  • accounts.register
  • accounts.registerCounters
  • accounts.resendVerificationCode
  • accounts.resetPassword
  • accounts.search
  • accounts.setAccountInfo
  • accounts.setPolicies
  • accounts.setProfilePhoto
  • accounts.setSchema
  • accounts.setScreenSet
  • ds.delete
  • ds.get
  • ds.getSchema
  • ds.search
  • ds.setSchema
  • ds.store
  • socialize.checkin
  • socialize.deleteAccount
  • socialize.delUserSettings
  • socialize.exchangeUIDSignature
  • socialize.exportUsers
  • socialize.facebookGraphOperation
  • socialize.getAlbums
  • socialize.getContacts
  • socialize.getFeed
  • socialize.getFriendsInfo
  • socialize.getPhotos
  • socialize.getPlaces
  • socialize.getRawData
  • socialize.getReactionsCount
  • socialize.getSessionInfo
  • socialize.getTopShares
  • socialize.getUserInfo
  • socialize.getUserSettings
  • socialize.importIdentities
  • socialize.incrementReactionsCount
  • socialize.logout
  • socialize.notifyLogin
  • socialize.notifyRegistration
  • socialize.publishUserAction
  • socialize.removeConnection
  • socialize.sendNotification
  • socialize.setStatus
  • socialize.setUID
  • socialize.setUserInfo
  • socialize.setUserSettings
  • socialize.shortenURL