You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
var url = require('url')
var patreon = require('patreon')
var patreonAPI = patreon.patreon
var patreonOAuth = patreon.oauth
// Use the client id and secret you received when setting up your OAuth account
var CLIENT_ID = 'pppp'
var CLIENT_SECRET = 'pppp'
var patreonOAuthClient = patreonOAuth(CLIENT_ID, CLIENT_SECRET)
Using the example code with the correct CLIENT_ID and CLIENT_SECRET, results in the last line of the above code erroring, with the following error:
var patreonOAuthClient = patreonOAuth(CLIENT_ID, CLIENT_SECRET);
TypeError: patreonOAuth is not a function
According to the documentation, and the example therein, that should be a function, yet it isn't.
The text was updated successfully, but these errors were encountered:
After a bit of digging through the library, I found that the following code seems to work much better:
var URL = require('url');
var { patreon, jsonApiURL, oauth } = require('patreon');
var patreonAPI = patreon
var patreonOAuth = oauth
var CLIENT_ID = 'pppp'
var CLIENT_SECRET = 'pppp'
var patreonOAuthClient = patreonOAuth(CLIENT_ID, CLIENT_SECRET)
Using the example code with the correct CLIENT_ID and CLIENT_SECRET, results in the last line of the above code erroring, with the following error:
According to the documentation, and the example therein, that should be a function, yet it isn't.
The text was updated successfully, but these errors were encountered: