Skip to content

Collection value support #47

@jmnunezizu

Description

@jmnunezizu

Hi,

I forked the project as I'm trying to include the collection value API all (https://www.discogs.com/developers/#page:user-collection,header:user-collection-collection-value).

I made the following change in collection.js:

/**
	 * Gets the colection value for the given user.
	 * @param {string} user - The user name
	 * @returns {DiscogsClient|Promise}
	 */
	collection.getValue = function(user, callback) {
		return client.get({ url: '/users/' + util.escape(user) + '/collection/value', authLevel: 2 }, callback);
	}

I have successfully obtained a token and a tokenSecret using the oath method calls, and I got an object that pretty much looks like this:

{
  "method": "oauth",
  "level": 2,
  "consumerKey": "consumerKey",
  "consumerSecret": "consumerSecret",
  "token": "token",
  "tokenSecret": "tokenSecret"
}

I can use that object to make requests to the user lists, and I do get lists which are marked as private, so in theory, the token+secret are working as expected.

However, when I call the collectionValue method, I get:

DiscogsError: You are not allowed to view this resource. Please authenticate as the owner to view this content.

I don't know if this is an error in my implementation, or if the Discogs API endpoint is bogus.

If you could provide some info, that'd be great.

Thanks,
Jose.-

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions