Open urielcastrillon08 opened 8 years ago
Hi Georgi
Usage:
var etsyjs = require('etsy-js'); var client = etsyjs.client('your_api_key');
by i see is that in the file client.js, the constructor receives two params
module.exports = function(apiKey, options) { return new Client(apiKey, options); };
and when create of new client only receive one param
Client = (function() { function Client(options) { this.options = options; this.apiKey = this.options.key; this.apiSecret = this.options.secret; this.callbackURL = this.options.callbackURL; this.request = request; this.etsyOAuth = new OAuth.OAuth('https://openapi.etsy.com/v2/oauth/request_token?scope=email_r%20profile_r%20profile_w%20address_r%20address_w', 'https://openapi.etsy.com/v2/oauth/access_token', "" + this.apiKey, "" + this.apiSecret, '1.0', "" + this.callbackURL, 'HMAC-SHA1'); }
how in the variant options arrives a string, never initializes this variant this.apiKey...
thank you for attention given
Hi Georgi
Usage:
var etsyjs = require('etsy-js'); var client = etsyjs.client('your_api_key');
by i see is that in the file client.js, the constructor receives two params
module.exports = function(apiKey, options) { return new Client(apiKey, options); };
and when create of new client only receive one param
Client = (function() { function Client(options) { this.options = options; this.apiKey = this.options.key; this.apiSecret = this.options.secret; this.callbackURL = this.options.callbackURL; this.request = request; this.etsyOAuth = new OAuth.OAuth('https://openapi.etsy.com/v2/oauth/request_token?scope=email_r%20profile_r%20profile_w%20address_r%20address_w', 'https://openapi.etsy.com/v2/oauth/access_token', "" + this.apiKey, "" + this.apiSecret, '1.0', "" + this.callbackURL, 'HMAC-SHA1'); }
how in the variant options arrives a string, never initializes this variant this.apiKey...
thank you for attention given