Socket
Socket
Sign inDemoInstall

gigya

Package Overview
Dependencies
Maintainers
1
Versions
46
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gigya

Gigya SDK for NodeJS.


Version published
Weekly downloads
1.8K
increased by16.1%
Maintainers
1
Weekly downloads
 
Created
Source

Unofficial Gigya Node SDK

##Support and Usage This is an unofficial SDK for Gigya's REST API. It is not an officially supported product. Use at your own risk.

##Installation Gigya is listed on NPM. To install, run the following command within your project folder:

npm install gigya

##Usage Guide Please follow these steps to integrate Gigya within your NodeJS application:

  • Install the SDK
  • Obtain an API Key and Secret Key from Gigya
  • Include the Gigya module within your project: var Gigya = require('gigya');
  • Login the user to acquire their UID
  • Use Gigya's API to send requests

##Sending a Request After you have logged in the user, you may use Gigya's API to access the user's profile and perform various activities. The following example demonstrates fetching a user's profile.

// Include Gigya's SDK
var Gigya = require('gigya');

// Initialize SDK with your API Key and Secret Key
var gigya = new Gigya('YOUR_API_KEY', 'YOUR_SECRET_KEY');

// Fetch user's profile with REST API socialize.getUserInfo
// Documentation: http://developers.gigya.com/037_API_reference/010_Socialize/socialize.getUserInfo
gigya.socialize.getUserInfo({
  UID: 'PUT-UID-HERE'
}, function(err, response) {
  if(err) {
    // Request failed, handle error
    return console.error(err);
  }
  
  // Otherwise, print response to console
  console.log(response);
});

##Using EventEmitter style callbacks In addition to node-style callbacks, the SDK also support EventEmitter style callbacks:

gigya.socialize.getUserInfo({
  UID: 'PUT-UID-HERE'
}).on('response', function(response) {
  // Print response to console
  console.log(response);
}).on('err', function(err) {
  // Request failed, handle error
  return console.error(err);
});

Additionally, accounts.search and ds.search have special support for streaming query response data:

gigya.accounts.search({
  query: 'SELECT * FROM accounts'
}).on('record', function(account) {
  // Do something with account...
  console.log(account);
}).on('end', function(summary) {
  // Done streaming
  console.log(summary);
}).on('err', function(err) {
  // Request failed, handle error
  return console.error(err);
});

Keywords

FAQs

Package last updated on 02 Apr 2013

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc