Skip to content
This repository was archived by the owner on Dec 30, 2021. It is now read-only.

Commit 84f6f40

Browse files
authored
Merge pull request #173 from swarajpure/fix/saveClient-call
fix(readme.md): change function calls in README.md for imgur v1
2 parents 6ec2fb2 + 6dd549a commit 84f6f40

1 file changed

Lines changed: 8 additions & 4 deletions

File tree

README.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -99,16 +99,21 @@ const imgur = require('imgur');
9999
#### Dealing with client IDs:
100100

101101
```javascript
102+
// Change this cliend id to your own.
103+
const clientId = 'aCs53GSs4tga0ikp';
104+
102105
// Setting
103-
imgur.setClientId('aCs53GSs4tga0ikp');
106+
imgur.setClientId(clientId);
104107

105108
// Getting
106109
imgur.getClientId();
107110

111+
// You can specify path or keep it null. Defaults to ~/.imgur
112+
const path = null;
113+
108114
// Saving to disk. Returns a promise.
109-
// NOTE: path is optional. Defaults to ~/.imgur
110115
imgur
111-
.saveClientId(path)
116+
.saveClientId(clientId, path)
112117
.then(() => {
113118
console.log('Saved.');
114119
})
@@ -117,7 +122,6 @@ imgur
117122
});
118123

119124
// Loading from disk
120-
// NOTE: path is optional. Defaults to ~/.imgur
121125
imgur.loadClientId(path).then(imgur.setClientId);
122126
```
123127

0 commit comments

Comments
 (0)