mckelvey / instagram-node-lib

The Instagram Node Lib is a helper library for node that makes communicating with the Instagram API easy.
http://david.mckelveycreative.com/
Other
303 stars 49 forks source link

Some methods do not pass all params through to API #38

Open samtgarson opened 9 years ago

samtgarson commented 9 years ago

Not all methods pass all the params to the query string.

For example, in users.follows:

InstagramUsers.prototype.follows = function(params) {
      var credentials;
      credentials = this.parent._credentials({}, 'access_token');
      params['path'] = "/" + this.parent._api_version + "/users/" + params['user_id'] + "/follows?" + (this.parent._to_querystring(credentials));
      return this.parent._request(params);
    };

The _credentials function does not get passed the params object as in other methods, but instead gets {}. This can be solved (I think!) replacing {} with params.