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

singly

Package Overview
Dependencies
Maintainers
3
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

singly - npm Package Compare versions

Comparing version 0.2.1 to 0.3.0

.travis.yml

34

lib.js

@@ -10,3 +10,13 @@ var request = require('request');

client.getAuthorizeURL = function(service, options) {
/*
IMPORTANT: getAuthenticateURL replaces getAuthorizeURL
see https://singly.com/docs/authorization
Params:
service: (required) the service to auth
options: a hash of any further options to pass (i.e. scope)
**access_token MUST be passed if you wish to connect an additional profile
instead of creating a new account
*/
client.getAuthenticateURL = function(service, options) {
if (!options) options = {};

@@ -16,6 +26,10 @@ if (!options.client_id) options.client_id = clientId;

options.service = service;
var cbURL = options.callbackURL || redirectURI;
return apiBaseUrl + '/oauth/authorize?' + querystring.stringify(options);
}
return apiBaseUrl + '/oauth/authenticate?' + querystring.stringify(options);
};
client.getAuthorizeURL = function() {
throw "Singly module: getAuthenticateURL replaces" +
"getAuthorizeURL in Singly module";
};
client.getAccessToken = function(code, callback) {

@@ -43,3 +57,3 @@ var data = {

});
}
};

@@ -49,3 +63,3 @@ // build a consistent and clean URI

var uri = apiBaseUrl;
if (path.indexOf(/\/?v[0-9]/) !== 0) uri += '/v' + API_VERSION
if (path.indexOf(/\/?v[0-9]/) !== 0) uri += '/v' + API_VERSION;
if (path.indexOf('/') !== 0) uri += '/';

@@ -66,3 +80,3 @@ return uri + path;

request.post({uri:uri, json:options.body, qs:options.qs}, callback);
}
};

@@ -73,3 +87,3 @@ client.get = function(path, options, callback) {

request.get({uri:uri, json:true, qs:options.qs}, callback);
}
};

@@ -83,5 +97,5 @@ client.apiCall = function(path, params, callback) {

});
}
};
return client;
}
};

@@ -5,3 +5,3 @@ {

"description": "Client library for the Singly API",
"version": "0.2.1",
"version": "0.3.0",
"homepage": "https://singly.com",

@@ -8,0 +8,0 @@ "main" : "lib.js",

singly-js
=========
Singly API client library in Node
Singly API client library in Node
# Version History
## 0.3.0 (11/30/12)
- Deprecate getAuthorizeURL and add getAuthenticateURL
see https://singly.com/docs/authorization
Params:
service: (required) the service to auth
options: a hash of any further options to pass (i.e. scope)
**access_token MUST be passed if you wish to connect an additional profile
instead of creating a new account
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