gamewisp-listener
Advanced tools
Comparing version 1.0.6 to 1.0.7
14
index.js
@@ -42,4 +42,4 @@ 'use strict'; | ||
site: 'https://api.gamewisp.com', | ||
clientID: options.clientID, | ||
clientSecret: options.clientSecret, | ||
clientID: this.options.clientID, | ||
clientSecret: this.options.clientSecret, | ||
tokenPath: '/pub/v1/oauth/token', | ||
@@ -53,3 +53,3 @@ authorizationPath: '/pub/v1/oauth/authorize' | ||
var authorization_uri = oauth2.authCode.authorizeURL({ | ||
redirect_uri: options.redirect_uri, | ||
redirect_uri: this.options.redirect_uri, | ||
scope: 'read_only,user_read', | ||
@@ -61,3 +61,3 @@ state: 'nodecg' | ||
var authorization_uri2 = oauth2.authCode.authorizeURL({ | ||
redirect_uri: options.redirect_uri, | ||
redirect_uri: this.options.redirect_uri, | ||
scope: 'user_read', | ||
@@ -85,7 +85,7 @@ state: 'nodecg' | ||
//use this as the redirect_uri for your client credentials. | ||
app.get(options.redirect_path, function(req,res){ | ||
app.get(this.options.redirect_path, function(req,res){ | ||
var code = req.query.code; | ||
var token = oauth2.authCode.getToken({ | ||
code: code, | ||
redirect_uri: (options.redirect_uri) | ||
redirect_uri: (this.options.redirect_uri) | ||
}).then(function saveToken(result){ | ||
@@ -106,3 +106,3 @@ if(result.error == undefined){ | ||
this.io.server.listen(options.nodePort); | ||
this.io.server.listen(this.options.nodePort); | ||
@@ -109,0 +109,0 @@ //------ SINGULARITY ------// |
{ | ||
"name": "gamewisp-listener", | ||
"version": "1.0.6", | ||
"version": "1.0.7", | ||
"description": "Evented wrapper API for GameWisp", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
8227