vimeo.js icon indicating copy to clipboard operation
vimeo.js copied to clipboard

Correct usage of "params"

Open hoemon opened this issue 6 years ago • 1 comments

Earlier I've created an issue (marked as solved however still unsolved) I believe I can replicate a similar issue on this portion of the API this time

Group creation:

client.request({
	method: "POST",
	path: "/groups",
	params: {
		'name': 'JustATestGrupName123456',
		'description': "This group was created through the Vimeo API's NodeJS SDK."
	}
}, function(error, body, status_code, headers) {
	console.log("status code", status_code)
	if (error) console.log(error);
	console.log(headers)
	console.log(body)
});

The response I get is: {"error":"[name] You must provide a name"}

I believe either I'm doing something completely wrong or the "params" feature is broken?

hoemon avatar Oct 25 '18 19:10 hoemon

@hoemon: Could you try replacing the params with query?

client.request({
	method: "POST",
	path: "/groups",
	query: {
		'name': 'JustATestGrupName123456',
		'description': "This group was created through the Vimeo API's NodeJS SDK."
	}
}, function(error, body, status_code, headers) {
	console.log("status code", status_code)
	if (error) console.log(error);
	console.log(headers)
	console.log(body)
});

mandeldl avatar Dec 19 '18 15:12 mandeldl