From 6dd549a20b730faaeed358ac48db1f1c44a32fb2 Mon Sep 17 00:00:00 2001 From: Swaraj Date: Sun, 18 Apr 2021 12:11:54 +0530 Subject: [PATCH] fix(readme.md): change function calls in README.md for imgur v1 saveClient function expects two arguments and according to the documentation, we were passing only one which resulted in errors. fix #162 --- README.md | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 094cc4bc..abe93838 100644 --- a/README.md +++ b/README.md @@ -99,16 +99,21 @@ const imgur = require('imgur'); #### Dealing with client IDs: ```javascript +// Change this cliend id to your own. +const clientId = 'aCs53GSs4tga0ikp'; + // Setting -imgur.setClientId('aCs53GSs4tga0ikp'); +imgur.setClientId(clientId); // Getting imgur.getClientId(); +// You can specify path or keep it null. Defaults to ~/.imgur +const path = null; + // Saving to disk. Returns a promise. -// NOTE: path is optional. Defaults to ~/.imgur imgur - .saveClientId(path) + .saveClientId(clientId, path) .then(() => { console.log('Saved.'); }) @@ -117,7 +122,6 @@ imgur }); // Loading from disk -// NOTE: path is optional. Defaults to ~/.imgur imgur.loadClientId(path).then(imgur.setClientId); ```