Skip to content
Browse files

Changed some double quotes to single qoutes

  • Loading branch information...
1 parent 896a9b3 commit 104cd277b93109e16a22dbb577b11be1418c0e4b @frozzare committed Jul 30, 2013
Showing with 20 additions and 20 deletions.
  1. +20 −20 lib/pinboard.js
View
40 lib/pinboard.js
@@ -7,7 +7,7 @@ var request = require('request'),
init: function (options) {
this.token = options.token || '';
- this.url = "https://" + (!this.token ? (options.username + ":" + options.password + "@") : "") + "api.pinboard.in/v1";
+ this.url = 'https://' + (!this.token ? (options.username + ':' + options.password + '@') : '') + 'api.pinboard.in/v1';
this.format = options.format || 'json';
},
@@ -37,7 +37,7 @@ var request = require('request'),
*/
"posts/all": function (options, callback) {
- pinboard.request("posts/all", options, callback, false);
+ pinboard.request('posts/all', options, callback, false);
},
/*
@@ -56,7 +56,7 @@ var request = require('request'),
*/
"posts/recent": function (options, callback) {
- pinboard.request("posts/recent", options, callback, true);
+ pinboard.request('posts/recent', options, callback, true);
},
/*
@@ -74,7 +74,7 @@ var request = require('request'),
*/
"posts/dates": function (options, callback) {
- pinboard.request("posts/dates", options, callback, true);
+ pinboard.request('posts/dates', options, callback, true);
},
/*
@@ -97,8 +97,8 @@ var request = require('request'),
*/
"posts/delete": function (options, callback) {
- if (options.url === undefined) throw "Delete method require url value to work";
- pinboard.request("posts/delete", options, callback, true);
+ if (options.url === undefined) throw 'Delete method require url value to work';
+ pinboard.request('posts/delete', options, callback, true);
},
/*
@@ -129,8 +129,8 @@ var request = require('request'),
*/
"posts/add": function (options, callback) {
- if (options.url === undefined || options.description === undefined) throw "Add method require url and description value to work";
- pinboard.request("posts/add", options, callback, true);
+ if (options.url === undefined || options.description === undefined) throw 'Add method require url and description value to work';
+ pinboard.request('posts/add', options, callback, true);
},
/*
@@ -152,7 +152,7 @@ var request = require('request'),
*/
"posts/get": function (options, callback) {
- pinboard.request("posts/get", options, callback, false);
+ pinboard.request('posts/get', options, callback, false);
},
/*
@@ -171,8 +171,8 @@ var request = require('request'),
*/
"posts/suggest": function (options, callback) {
- if (options.url === undefined) throw "Suggest method require url value to work";
- pinboard.request("posts/suggest", options, callback, true);
+ if (options.url === undefined) throw 'Suggest method require url value to work';
+ pinboard.request('posts/suggest', options, callback, true);
},
/*
@@ -190,7 +190,7 @@ var request = require('request'),
*/
"posts/update": function (options, callback) {
- pinboard.request("posts/update", options, callback, true);
+ pinboard.request('posts/update', options, callback, true);
},
/*
@@ -212,7 +212,7 @@ var request = require('request'),
*/
"tags/get": function (options, callback) {
- pinboard.request("tags/get", options, callback, true);
+ pinboard.request('tags/get', options, callback, true);
},
/*
@@ -230,8 +230,8 @@ var request = require('request'),
*/
"tags/delete": function (options, callback) {
- if (options.tag === undefined) throw "Delete method require tag value to work";
- pinboard.request("tags/delete", options, callback, true);
+ if (options.tag === undefined) throw 'Delete method require tag value to work';
+ pinboard.request('tags/delete', options, callback, true);
},
/*
@@ -250,8 +250,8 @@ var request = require('request'),
*/
"tags/rename": function (options, callback) {
- if (options.old === undefined) throw "Rename method require old value to work";
- pinboard.request("tags/rename", options, callback, true);
+ if (options.old === undefined) throw 'Rename method require old value to work';
+ pinboard.request('tags/rename', options, callback, true);
}
},
@@ -263,7 +263,7 @@ var request = require('request'),
request: function (method, options, callback) {
request({
- url: pinboard.url + "/" + method + pinboard.formatArguments(options)
+ url: pinboard.url + '/' + method + pinboard.formatArguments(options)
}, function (error, response, body) {
pinboard.callback({
err: error,
@@ -281,11 +281,11 @@ var request = require('request'),
*/
formatArguments: function (obj) {
- var str = pinboard.token ? ("?auth_token=" + pinboard.token + "&") : "?";
+ var str = pinboard.token ? ('?auth_token=' + pinboard.token + '&') : '?';
for (var key in obj) {
if (obj.hasOwnProperty(key)) {
obj[key] = typeof obj[key] === 'string' ? obj[key].replace(/\s+/g, '%20') : obj[key];
- str += key + "=" + obj[key] + "&"
+ str += key + '=' + obj[key] + '&'
}
}
return str[str.length - 1] === '&' ? str.slice(0, -1) : str;

0 comments on commit 104cd27

Please sign in to comment.
Something went wrong with that request. Please try again.