Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

gosquared

Package Overview
Dependencies
Maintainers
4
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gosquared

GoSquared for your Node.JS application

  • 0.1.4
  • npm
  • Socket score

Version published
Weekly downloads
34
increased by183.33%
Maintainers
4
Weekly downloads
 
Created
Source

node-gosquared

This node module works with the GoSquared API, making it really easy to integrate GoSquared with your node app.

It can be used as an easy proxy for frontend JavaScript so you don't publically expose your API Key.

Installation

npm install --save gosquared

Usage

var gosquared = new GoSquared(opts);
Options
  • api_key: API key from your account. Required for API functions, not required for tracking functions.
  • site_token: Token for the registered site you're working with. Required.
  • requestTimeout: Maximum time in ms an API request can be pending. Default 2000ms
  • debugLevel: One of 'TRACE', 'NOTICE', 'WARNING', 'ALL'. Default 'WARNING'

API

var GoSquared = require('gosquared');

var gosquared = new GoSquared({
  api_key: 'demo',
  site_token: 'GSN-181546-E'
});

gosquared.concurrents(function(e,data) {
  if (e) return console.log(e);
  console.log(data)
});

All functions listed in the API documentation are methods you can call on the gosquared object.

Tracking

Events

Send events to GoSquared:

gosquared.storeEvent('Test Event', {
		its: true,
		'you can': 'store',
		any: 'event',
		properties: 'You Like'
	},
	function(e, res){
		if(e) return console.log(e);
		console.log(res);
	}
);

Run tests

Install all dependencies using npm install then:

make test

Optionally, you can run the tests with a site token and API key of your choice:

SITE_TOKEN=<your token> API_KEY=<your api key> make test

Keywords

FAQs

Package last updated on 12 Feb 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