From ced26262d710abe462ecc8a8a9ea97aff825e026 Mon Sep 17 00:00:00 2001 From: Aiden Montgomery Date: Tue, 29 Apr 2014 00:04:03 +0100 Subject: [PATCH] Added optional Access Token as third parameter during initialisation --- lib/vimeo.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/vimeo.js b/lib/vimeo.js index 0fdc679..901c721 100644 --- a/lib/vimeo.js +++ b/lib/vimeo.js @@ -45,10 +45,15 @@ var auth_endpoints = module.exports.auth_endpoints = { * * @param {string} client_id OAuth 2 Client Identifier * @param {string} client_secret OAuth 2 Client Secret + * @param (string) access_token OAuth 2 Optional pre-authorized access token */ -var Vimeo = module.exports.Vimeo = function Vimeo (client_id, client_secret) { +var Vimeo = module.exports.Vimeo = function Vimeo (client_id, client_secret, access_token) { this._client_id = client_id; this._client_secret = client_secret; + + if (access_token) { + this.access_token = access_token; + } }; Vimeo.prototype._client_id = null;