coauth-sdk
Advanced tools
Comparing version 0.1.1 to 0.1.2
{ | ||
"name": "coauth-sdk", | ||
"version": "0.1.1", | ||
"version": "0.1.2", | ||
"description": "", | ||
"main": "sdk.js", | ||
"dependencies": { | ||
"pythonify": "^0.1.8", | ||
"querystring": "^0.2.0", | ||
@@ -9,0 +8,0 @@ "request": "^2.62.0", |
11
sdk.js
var py = require('pythonify'); | ||
py.bind(); | ||
var request = require('request'); | ||
@@ -23,2 +21,9 @@ var querystring = require('querystring'); | ||
function lstrip(str, chars) { | ||
var chars = chars ? chars : " "; | ||
var re = new RegExp( "^["+chars+"]*" ); | ||
return str.replace(re, ""); | ||
} | ||
function connect(app_id, api_key, config) { | ||
@@ -48,3 +53,3 @@ if (! (this instanceof connect)) | ||
var callback = args.callback; | ||
var url = [this.api_url, "v"+this.version, this.app_id, args.path.lstrip('/')].join('/'); | ||
var url = [this.api_url, "v"+this.version, this.app_id, lstrip(args.path, '/')].join('/'); | ||
if (params === undefined) | ||
@@ -51,0 +56,0 @@ var params = { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
17887
3
392
- Removedpythonify@^0.1.8
- Removedpythonify@0.1.8(transitive)